generated-configure.sh revision 862:9e177e7fc438
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.69 for OpenJDK jdk8.
4#
5# Report bugs to <build-dev@openjdk.java.net>.
6#
7#
8# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
9#
10#
11# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
13## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
16
17# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
19if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
20  emulate sh
21  NULLCMD=:
22  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
23  # is contrary to our usage.  Disable this feature.
24  alias -g '${1+"$@"}'='"$@"'
25  setopt NO_GLOB_SUBST
26else
27  case `(set -o) 2>/dev/null` in #(
28  *posix*) :
29    set -o posix ;; #(
30  *) :
31     ;;
32esac
33fi
34
35
36as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47  as_echo='print -r --'
48  as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50  as_echo='printf %s\n'
51  as_echo_n='printf %s'
52else
53  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55    as_echo_n='/usr/ucb/echo -n'
56  else
57    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58    as_echo_n_body='eval
59      arg=$1;
60      case $arg in #(
61      *"$as_nl"*)
62	expr "X$arg" : "X\\(.*\\)$as_nl";
63	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64      esac;
65      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66    '
67    export as_echo_n_body
68    as_echo_n='sh -c $as_echo_n_body as_echo'
69  fi
70  export as_echo_body
71  as_echo='sh -c $as_echo_body as_echo'
72fi
73
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
76  PATH_SEPARATOR=:
77  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79      PATH_SEPARATOR=';'
80  }
81fi
82
83
84# IFS
85# We need space, tab and new line, in precisely that order.  Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
89IFS=" ""	$as_nl"
90
91# Find who we are.  Look in the path if we contain no directory separator.
92as_myself=
93case $0 in #((
94  *[\\/]* ) as_myself=$0 ;;
95  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
96for as_dir in $PATH
97do
98  IFS=$as_save_IFS
99  test -z "$as_dir" && as_dir=.
100    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101  done
102IFS=$as_save_IFS
103
104     ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109  as_myself=$0
110fi
111if test ! -f "$as_myself"; then
112  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113  exit 1
114fi
115
116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there.  '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
133
134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
137# Use a proper internal environment variable to ensure we don't fall
138  # into an infinite loop, continuously re-executing ourselves.
139  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140    _as_can_reexec=no; export _as_can_reexec;
141    # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149  *v*x* | *x*v* ) as_opts=-vx ;;
150  *v* ) as_opts=-v ;;
151  *x* ) as_opts=-x ;;
152  * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159  fi
160  # We don't want this to propagate to other subprocesses.
161          { _as_can_reexec=; unset _as_can_reexec;}
162if test "x$CONFIG_SHELL" = x; then
163  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164  emulate sh
165  NULLCMD=:
166  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167  # is contrary to our usage.  Disable this feature.
168  alias -g '\${1+\"\$@\"}'='\"\$@\"'
169  setopt NO_GLOB_SUBST
170else
171  case \`(set -o) 2>/dev/null\` in #(
172  *posix*) :
173    set -o posix ;; #(
174  *) :
175     ;;
176esac
177fi
178"
179  as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193  exitcode=1; echo positional parameters were not saved.
194fi
195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
197  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202  if (eval "$as_required") 2>/dev/null; then :
203  as_have_required=yes
204else
205  as_have_required=no
206fi
207  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214  IFS=$as_save_IFS
215  test -z "$as_dir" && as_dir=.
216  as_found=:
217  case $as_dir in #(
218	 /*)
219	   for as_base in sh bash ksh sh5; do
220	     # Try only shells that exist, to save several forks.
221	     as_shell=$as_dir/$as_base
222	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224  CONFIG_SHELL=$as_shell as_have_required=yes
225		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226  break 2
227fi
228fi
229	   done;;
230       esac
231  as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235  CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240      if test "x$CONFIG_SHELL" != x; then :
241  export CONFIG_SHELL
242             # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250  *v*x* | *x*v* ) as_opts=-vx ;;
251  *v* ) as_opts=-v ;;
252  *x* ) as_opts=-x ;;
253  * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
260fi
261
262    if test x$as_have_required = xno; then :
263  $as_echo "$0: This script requires a shell more modern than all"
264  $as_echo "$0: the shells that I found on your system."
265  if test x${ZSH_VERSION+set} = xset ; then
266    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268  else
269    $as_echo "$0: Please tell bug-autoconf@gnu.org and
270$0: build-dev@openjdk.java.net about your system, including
271$0: any error possibly output before this message. Then
272$0: install a modern shell, or manually run the script
273$0: under such a shell if you do have one."
274  fi
275  exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293  { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302  return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310  set +e
311  as_fn_set_status $1
312  exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321  case $as_dir in #(
322  -*) as_dir=./$as_dir;;
323  esac
324  test -d "$as_dir" || eval $as_mkdir_p || {
325    as_dirs=
326    while :; do
327      case $as_dir in #(
328      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329      *) as_qdir=$as_dir;;
330      esac
331      as_dirs="'$as_qdir' $as_dirs"
332      as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334	 X"$as_dir" : 'X\(//\)[^/]' \| \
335	 X"$as_dir" : 'X\(//\)$' \| \
336	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339	    s//\1/
340	    q
341	  }
342	  /^X\(\/\/\)[^/].*/{
343	    s//\1/
344	    q
345	  }
346	  /^X\(\/\/\)$/{
347	    s//\1/
348	    q
349	  }
350	  /^X\(\/\).*/{
351	    s//\1/
352	    q
353	  }
354	  s/.*/./; q'`
355      test -d "$as_dir" && break
356    done
357    test -z "$as_dirs" || eval "mkdir $as_dirs"
358  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
359
360
361} # as_fn_mkdir_p
362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368  test -f "$1" && test -x "$1"
369} # as_fn_executable_p
370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377  eval 'as_fn_append ()
378  {
379    eval $1+=\$2
380  }'
381else
382  as_fn_append ()
383  {
384    eval $1=\$$1\$2
385  }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394  eval 'as_fn_arith ()
395  {
396    as_val=$(( $* ))
397  }'
398else
399  as_fn_arith ()
400  {
401    as_val=`expr "$@" || test $? -eq 1`
402  }
403fi # as_fn_arith
404
405
406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
410# script with STATUS, using 1 if that was 0.
411as_fn_error ()
412{
413  as_status=$1; test $as_status -eq 0 && as_status=1
414  if test "$4"; then
415    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
417  fi
418  $as_echo "$as_me: error: $2" >&2
419  as_fn_exit $as_status
420} # as_fn_error
421
422if expr a : '\(a\)' >/dev/null 2>&1 &&
423   test "X`expr 00001 : '.*\(...\)'`" = X001; then
424  as_expr=expr
425else
426  as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430  as_basename=basename
431else
432  as_basename=false
433fi
434
435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436  as_dirname=dirname
437else
438  as_dirname=false
439fi
440
441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443	 X"$0" : 'X\(//\)$' \| \
444	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
445$as_echo X/"$0" |
446    sed '/^.*\/\([^/][^/]*\)\/*$/{
447	    s//\1/
448	    q
449	  }
450	  /^X\/\(\/\/\)$/{
451	    s//\1/
452	    q
453	  }
454	  /^X\/\(\/\).*/{
455	    s//\1/
456	    q
457	  }
458	  s/.*/./; q'`
459
460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
466
467
468  as_lineno_1=$LINENO as_lineno_1a=$LINENO
469  as_lineno_2=$LINENO as_lineno_2a=$LINENO
470  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
473  sed -n '
474    p
475    /[$]LINENO/=
476  ' <$as_myself |
477    sed '
478      s/[$]LINENO.*/&-/
479      t lineno
480      b
481      :lineno
482      N
483      :loop
484      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
485      t loop
486      s/-\n.*//
487    ' >$as_me.lineno &&
488  chmod +x "$as_me.lineno" ||
489    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
490
491  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492  # already done that, so ensure we don't try to do so again and fall
493  # in an infinite loop.  This has already happened in practice.
494  _as_can_reexec=no; export _as_can_reexec
495  # Don't try to exec as it changes $[0], causing all sort of problems
496  # (the dirname of $[0] is not the place where we might find the
497  # original and so on.  Autoconf is especially sensitive to this).
498  . "./$as_me.lineno"
499  # Exit status is that of the last command.
500  exit
501}
502
503ECHO_C= ECHO_N= ECHO_T=
504case `echo -n x` in #(((((
505-n*)
506  case `echo 'xy\c'` in
507  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
508  xy)  ECHO_C='\c';;
509  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
510       ECHO_T='	';;
511  esac;;
512*)
513  ECHO_N='-n';;
514esac
515
516rm -f conf$$ conf$$.exe conf$$.file
517if test -d conf$$.dir; then
518  rm -f conf$$.dir/conf$$.file
519else
520  rm -f conf$$.dir
521  mkdir conf$$.dir 2>/dev/null
522fi
523if (echo >conf$$.file) 2>/dev/null; then
524  if ln -s conf$$.file conf$$ 2>/dev/null; then
525    as_ln_s='ln -s'
526    # ... but there are two gotchas:
527    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
529    # In both cases, we have to default to `cp -pR'.
530    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
531      as_ln_s='cp -pR'
532  elif ln conf$$.file conf$$ 2>/dev/null; then
533    as_ln_s=ln
534  else
535    as_ln_s='cp -pR'
536  fi
537else
538  as_ln_s='cp -pR'
539fi
540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
542
543if mkdir -p . 2>/dev/null; then
544  as_mkdir_p='mkdir -p "$as_dir"'
545else
546  test -d ./-p && rmdir ./-p
547  as_mkdir_p=false
548fi
549
550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
552
553# Sed expression to map a string onto a valid CPP name.
554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
555
556# Sed expression to map a string onto a valid variable name.
557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
558
559
560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
562
563# Name of the host.
564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
568#
569# Initializations.
570#
571ac_default_prefix=/usr/local
572ac_clean_files=
573ac_config_libobj_dir=.
574LIBOBJS=
575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
579
580# Identity of this package.
581PACKAGE_NAME='OpenJDK'
582PACKAGE_TARNAME='openjdk'
583PACKAGE_VERSION='jdk8'
584PACKAGE_STRING='OpenJDK jdk8'
585PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
586PACKAGE_URL='http://openjdk.java.net'
587
588# Factoring default headers for most tests.
589ac_includes_default="\
590#include <stdio.h>
591#ifdef HAVE_SYS_TYPES_H
592# include <sys/types.h>
593#endif
594#ifdef HAVE_SYS_STAT_H
595# include <sys/stat.h>
596#endif
597#ifdef STDC_HEADERS
598# include <stdlib.h>
599# include <stddef.h>
600#else
601# ifdef HAVE_STDLIB_H
602#  include <stdlib.h>
603# endif
604#endif
605#ifdef HAVE_STRING_H
606# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
607#  include <memory.h>
608# endif
609# include <string.h>
610#endif
611#ifdef HAVE_STRINGS_H
612# include <strings.h>
613#endif
614#ifdef HAVE_INTTYPES_H
615# include <inttypes.h>
616#endif
617#ifdef HAVE_STDINT_H
618# include <stdint.h>
619#endif
620#ifdef HAVE_UNISTD_H
621# include <unistd.h>
622#endif"
623
624ac_subst_vars='LTLIBOBJS
625LIBOBJS
626CCACHE
627USE_PRECOMPILED_HEADER
628SJAVAC_SERVER_DIR
629ENABLE_SJAVAC
630SJAVAC_SERVER_JAVA
631JOBS
632MEMORY_SIZE
633NUM_CORES
634ENABLE_INTREE_EC
635SALIB_NAME
636HOTSPOT_MAKE_ARGS
637FIXPATH
638LIBCXX
639LLVM_LIBS
640LLVM_LDFLAGS
641LLVM_CFLAGS
642LLVM_CONFIG
643LIBFFI_LIBS
644LIBFFI_CFLAGS
645STATIC_CXX_SETTING
646LIBDL
647LIBM
648LIBZIP_CAN_USE_MMAP
649USE_EXTERNAL_LIBZ
650USE_EXTERNAL_LIBGIF
651USE_EXTERNAL_LIBJPEG
652ALSA_LIBS
653ALSA_CFLAGS
654FREETYPE2_LIB_PATH
655USING_SYSTEM_FT_LIB
656FREETYPE2_LIBS
657FREETYPE2_CFLAGS
658CUPS_CFLAGS
659OPENWIN_HOME
660X_EXTRA_LIBS
661X_LIBS
662X_PRE_LIBS
663X_CFLAGS
664XMKMF
665CXXFLAGS_DEBUG_SYMBOLS
666CFLAGS_DEBUG_SYMBOLS
667ZIP_DEBUGINFO_FILES
668ENABLE_DEBUG_SYMBOLS
669COMPILER_SUPPORTS_TARGET_BITS_FLAG
670ZERO_ARCHFLAG
671LDFLAGS_CXX_JDK
672LDFLAGS_JDKEXE_SUFFIX
673LDFLAGS_JDKLIB_SUFFIX
674LDFLAGS_JDKEXE
675LDFLAGS_JDKLIB
676CXXFLAGS_JDKEXE
677CXXFLAGS_JDKLIB
678CFLAGS_JDKEXE
679CFLAGS_JDKLIB
680MACOSX_VERSION_MIN
681PACKAGE_PATH
682LEGACY_EXTRA_LDFLAGS
683LEGACY_EXTRA_CXXFLAGS
684LEGACY_EXTRA_CFLAGS
685CXX_FLAG_DEPS
686C_FLAG_DEPS
687CXX_O_FLAG_NONE
688CXX_O_FLAG_NORM
689CXX_O_FLAG_HI
690CXX_O_FLAG_HIGHEST
691C_O_FLAG_NONE
692C_O_FLAG_NORM
693C_O_FLAG_HI
694C_O_FLAG_HIGHEST
695POST_MCS_CMD
696POST_STRIP_CMD
697SET_EXECUTABLE_ORIGIN
698SET_SHARED_LIBRARY_ORIGIN
699CXX_FLAG_REORDER
700C_FLAG_REORDER
701SET_SHARED_LIBRARY_MAPFILE
702SET_SHARED_LIBRARY_NAME
703SHARED_LIBRARY_FLAGS
704EXE_SUFFIX
705STATIC_LIBRARY_SUFFIX
706SHARED_LIBRARY_SUFFIX
707LIBRARY_PREFIX
708STATIC_LIBRARY
709SHARED_LIBRARY
710OBJ_SUFFIX
711COMPILER_NAME
712JT_HOME
713JTREGEXE
714LIPO
715ac_ct_OBJDUMP
716OBJDUMP
717ac_ct_OBJCOPY
718OBJCOPY
719MCS
720STRIP
721GNM
722NM
723AS
724CXXCPP
725CPP
726COMPILER_TYPE
727RC_FLAGS
728DUMPBIN
729WINAR
730HOTSPOT_RC
731HOTSPOT_MT
732RC
733MT
734WINLD
735HOTSPOT_LD
736HOTSPOT_CXX
737ARFLAGS
738AR
739LDEXECXX
740LDCXX
741LDEXE
742LD
743ac_ct_OBJC
744OBJCFLAGS
745OBJC
746ac_ct_CXX
747CXXFLAGS
748CXX
749ac_ct_PROPER_COMPILER_CXX
750PROPER_COMPILER_CXX
751POTENTIAL_CXX
752TOOLS_DIR_CXX
753OBJEXT
754EXEEXT
755ac_ct_CC
756CPPFLAGS
757LDFLAGS
758CFLAGS
759CC
760ac_ct_PROPER_COMPILER_CC
761PROPER_COMPILER_CC
762POTENTIAL_CC
763TOOLS_DIR_CC
764BUILD_LD
765BUILD_CXX
766BUILD_CC
767MSVCR_DLL
768VS_PATH
769VS_LIB
770VS_INCLUDE
771CYGWIN_LINK
772AR_OUT_OPTION
773LD_OUT_OPTION
774EXE_OUT_OPTION
775CC_OUT_OPTION
776BUILD_HOTSPOT
777HOTSPOT_DIST
778BUILD_OUTPUT
779OVERRIDE_SRC_ROOT
780ADD_SRC_ROOT
781JDK_TOPDIR
782NASHORN_TOPDIR
783HOTSPOT_TOPDIR
784JAXWS_TOPDIR
785JAXP_TOPDIR
786CORBA_TOPDIR
787LANGTOOLS_TOPDIR
788BOOT_JDK_JVMARGS
789JAVAC_FLAGS
790BOOT_JDK_SOURCETARGET
791BOOT_JDK
792BOOT_TOOLSJAR
793BOOT_RTJAR
794JAVA_CHECK
795JAVAC_CHECK
796COOKED_BUILD_NUMBER
797JDK_VERSION
798COPYRIGHT_YEAR
799MACOSX_BUNDLE_ID_BASE
800MACOSX_BUNDLE_NAME_BASE
801COMPANY_NAME
802JDK_RC_PLATFORM_NAME
803PRODUCT_SUFFIX
804PRODUCT_NAME
805LAUNCHER_NAME
806MILESTONE
807JDK_BUILD_NUMBER
808JDK_UPDATE_VERSION
809JDK_MICRO_VERSION
810JDK_MINOR_VERSION
811JDK_MAJOR_VERSION
812USER_RELEASE_SUFFIX
813COMPRESS_JARS
814UNLIMITED_CRYPTO
815CACERTS_FILE
816TEST_IN_BUILD
817BUILD_HEADLESS
818SUPPORT_HEADFUL
819SUPPORT_HEADLESS
820BDEPS_FTP
821BDEPS_UNZIP
822OS_VERSION_MICRO
823OS_VERSION_MINOR
824OS_VERSION_MAJOR
825PKG_CONFIG
826CODESIGN
827DSYMUTIL
828XATTR
829IS_GNU_TIME
830TIME
831STAT
832HG
833READELF
834OTOOL
835LDD
836ZIP
837UNZIP
838FIND_DELETE
839MAKE
840CHECK_TOOLSDIR_MAKE
841CHECK_TOOLSDIR_GMAKE
842CHECK_MAKE
843CHECK_GMAKE
844PKGHANDLER
845OUTPUT_ROOT
846CONF_NAME
847SPEC
848BUILD_VARIANT_RELEASE
849DEBUG_CLASSFILES
850FASTDEBUG
851VARIANT
852DEBUG_LEVEL
853MACOSX_UNIVERSAL
854INCLUDE_SA
855JVM_VARIANT_ZEROSHARK
856JVM_VARIANT_ZERO
857JVM_VARIANT_KERNEL
858JVM_VARIANT_MINIMAL1
859JVM_VARIANT_CLIENT
860JVM_VARIANT_SERVER
861JVM_VARIANTS
862JDK_VARIANT
863SET_OPENJDK
864BUILD_LOG_WRAPPER
865BUILD_LOG_PREVIOUS
866BUILD_LOG
867SYS_ROOT
868PATH_SEP
869SRC_ROOT
870ZERO_ARCHDEF
871DEFINE_CROSS_COMPILE_ARCH
872LP64
873OPENJDK_TARGET_OS_API_DIR
874OPENJDK_TARGET_CPU_JLI_CFLAGS
875OPENJDK_TARGET_CPU_OSARCH
876OPENJDK_TARGET_CPU_ISADIR
877OPENJDK_TARGET_CPU_LIBDIR
878OPENJDK_TARGET_CPU_LEGACY_LIB
879OPENJDK_TARGET_CPU_LEGACY
880REQUIRED_OS_VERSION
881REQUIRED_OS_NAME
882COMPILE_TYPE
883OPENJDK_TARGET_CPU_ENDIAN
884OPENJDK_TARGET_CPU_BITS
885OPENJDK_TARGET_CPU_ARCH
886OPENJDK_TARGET_CPU
887OPENJDK_TARGET_OS_API
888OPENJDK_TARGET_OS
889OPENJDK_BUILD_CPU_ENDIAN
890OPENJDK_BUILD_CPU_BITS
891OPENJDK_BUILD_CPU_ARCH
892OPENJDK_BUILD_CPU
893OPENJDK_BUILD_OS_API
894OPENJDK_BUILD_OS
895OPENJDK_BUILD_AUTOCONF_NAME
896OPENJDK_TARGET_AUTOCONF_NAME
897target_os
898target_vendor
899target_cpu
900target
901host_os
902host_vendor
903host_cpu
904host
905build_os
906build_vendor
907build_cpu
908build
909SETFILE
910DF
911READLINK
912CYGPATH
913NAWK
914SED
915FGREP
916EGREP
917GREP
918AWK
919XARGS
920WHICH
921WC
922UNIQ
923UNAME
924TR
925TOUCH
926TEE
927TAR
928TAIL
929SORT
930SH
931RM
932PRINTF
933MV
934MKTEMP
935MKDIR
936LS
937LN
938HEAD
939FIND
940FILE
941EXPR
942ECHO
943DIRNAME
944DIFF
945DATE
946CUT
947CPIO
948CP
949COMM
950CMP
951CHMOD
952CAT
953BASH
954BASENAME
955DATE_WHEN_CONFIGURED
956CONFIGURE_COMMAND_LINE
957CUSTOM_MAKE_DIR
958target_alias
959host_alias
960build_alias
961LIBS
962ECHO_T
963ECHO_N
964ECHO_C
965DEFS
966mandir
967localedir
968libdir
969psdir
970pdfdir
971dvidir
972htmldir
973infodir
974docdir
975oldincludedir
976includedir
977localstatedir
978sharedstatedir
979sysconfdir
980datadir
981datarootdir
982libexecdir
983sbindir
984bindir
985program_transform_name
986prefix
987exec_prefix
988PACKAGE_URL
989PACKAGE_BUGREPORT
990PACKAGE_STRING
991PACKAGE_VERSION
992PACKAGE_TARNAME
993PACKAGE_NAME
994PATH_SEPARATOR
995SHELL'
996ac_subst_files=''
997ac_user_opts='
998enable_option_checking
999with_custom_make_dir
1000with_target_bits
1001with_sys_root
1002with_tools_dir
1003with_devkit
1004enable_openjdk_only
1005with_jdk_variant
1006with_jvm_variants
1007enable_debug
1008with_debug_level
1009with_conf_name
1010with_builddeps_conf
1011with_builddeps_server
1012with_builddeps_dir
1013with_builddeps_group
1014enable_headful
1015enable_hotspot_test_in_build
1016with_cacerts_file
1017enable_unlimited_crypto
1018with_milestone
1019with_update_version
1020with_user_release_suffix
1021with_build_number
1022with_boot_jdk
1023with_boot_jdk_jvmargs
1024with_add_source_root
1025with_override_source_root
1026with_adds_and_overrides
1027with_override_langtools
1028with_override_corba
1029with_override_jaxp
1030with_override_jaxws
1031with_override_hotspot
1032with_override_nashorn
1033with_override_jdk
1034with_import_hotspot
1035with_msvcr_dll
1036with_dxsdk
1037with_dxsdk_lib
1038with_dxsdk_include
1039with_jtreg
1040with_extra_cflags
1041with_extra_cxxflags
1042with_extra_ldflags
1043enable_debug_symbols
1044enable_zip_debug_info
1045enable_macosx_runtime_support
1046with_x
1047with_cups
1048with_cups_include
1049with_freetype
1050with_alsa
1051with_alsa_include
1052with_alsa_lib
1053with_giflib
1054with_zlib
1055with_stdc__lib
1056with_num_cores
1057with_memory_size
1058with_jobs
1059with_sjavac_server_java
1060enable_sjavac
1061enable_precompiled_headers
1062enable_ccache
1063with_ccache_dir
1064'
1065      ac_precious_vars='build_alias
1066host_alias
1067target_alias
1068PKG_CONFIG
1069CC
1070CFLAGS
1071LDFLAGS
1072LIBS
1073CPPFLAGS
1074CXX
1075CXXFLAGS
1076CCC
1077OBJC
1078OBJCFLAGS
1079CPP
1080CXXCPP
1081XMKMF
1082FREETYPE2_CFLAGS
1083FREETYPE2_LIBS
1084ALSA_CFLAGS
1085ALSA_LIBS
1086LIBFFI_CFLAGS
1087LIBFFI_LIBS'
1088
1089
1090# Initialize some variables set by options.
1091ac_init_help=
1092ac_init_version=false
1093ac_unrecognized_opts=
1094ac_unrecognized_sep=
1095# The variables have the same names as the options, with
1096# dashes changed to underlines.
1097cache_file=/dev/null
1098exec_prefix=NONE
1099no_create=
1100no_recursion=
1101prefix=NONE
1102program_prefix=NONE
1103program_suffix=NONE
1104program_transform_name=s,x,x,
1105silent=
1106site=
1107srcdir=
1108verbose=
1109x_includes=NONE
1110x_libraries=NONE
1111
1112# Installation directory options.
1113# These are left unexpanded so users can "make install exec_prefix=/foo"
1114# and all the variables that are supposed to be based on exec_prefix
1115# by default will actually change.
1116# Use braces instead of parens because sh, perl, etc. also accept them.
1117# (The list follows the same order as the GNU Coding Standards.)
1118bindir='${exec_prefix}/bin'
1119sbindir='${exec_prefix}/sbin'
1120libexecdir='${exec_prefix}/libexec'
1121datarootdir='${prefix}/share'
1122datadir='${datarootdir}'
1123sysconfdir='${prefix}/etc'
1124sharedstatedir='${prefix}/com'
1125localstatedir='${prefix}/var'
1126includedir='${prefix}/include'
1127oldincludedir='/usr/include'
1128docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1129infodir='${datarootdir}/info'
1130htmldir='${docdir}'
1131dvidir='${docdir}'
1132pdfdir='${docdir}'
1133psdir='${docdir}'
1134libdir='${exec_prefix}/lib'
1135localedir='${datarootdir}/locale'
1136mandir='${datarootdir}/man'
1137
1138ac_prev=
1139ac_dashdash=
1140for ac_option
1141do
1142  # If the previous option needs an argument, assign it.
1143  if test -n "$ac_prev"; then
1144    eval $ac_prev=\$ac_option
1145    ac_prev=
1146    continue
1147  fi
1148
1149  case $ac_option in
1150  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1151  *=)   ac_optarg= ;;
1152  *)    ac_optarg=yes ;;
1153  esac
1154
1155  # Accept the important Cygnus configure options, so we can diagnose typos.
1156
1157  case $ac_dashdash$ac_option in
1158  --)
1159    ac_dashdash=yes ;;
1160
1161  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1162    ac_prev=bindir ;;
1163  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1164    bindir=$ac_optarg ;;
1165
1166  -build | --build | --buil | --bui | --bu)
1167    ac_prev=build_alias ;;
1168  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1169    build_alias=$ac_optarg ;;
1170
1171  -cache-file | --cache-file | --cache-fil | --cache-fi \
1172  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1173    ac_prev=cache_file ;;
1174  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1175  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1176    cache_file=$ac_optarg ;;
1177
1178  --config-cache | -C)
1179    cache_file=config.cache ;;
1180
1181  -datadir | --datadir | --datadi | --datad)
1182    ac_prev=datadir ;;
1183  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1184    datadir=$ac_optarg ;;
1185
1186  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1187  | --dataroo | --dataro | --datar)
1188    ac_prev=datarootdir ;;
1189  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1190  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1191    datarootdir=$ac_optarg ;;
1192
1193  -disable-* | --disable-*)
1194    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1195    # Reject names that are not valid shell variable names.
1196    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1197      as_fn_error $? "invalid feature name: $ac_useropt"
1198    ac_useropt_orig=$ac_useropt
1199    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1200    case $ac_user_opts in
1201      *"
1202"enable_$ac_useropt"
1203"*) ;;
1204      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1205	 ac_unrecognized_sep=', ';;
1206    esac
1207    eval enable_$ac_useropt=no ;;
1208
1209  -docdir | --docdir | --docdi | --doc | --do)
1210    ac_prev=docdir ;;
1211  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1212    docdir=$ac_optarg ;;
1213
1214  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1215    ac_prev=dvidir ;;
1216  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1217    dvidir=$ac_optarg ;;
1218
1219  -enable-* | --enable-*)
1220    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1221    # Reject names that are not valid shell variable names.
1222    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1223      as_fn_error $? "invalid feature name: $ac_useropt"
1224    ac_useropt_orig=$ac_useropt
1225    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1226    case $ac_user_opts in
1227      *"
1228"enable_$ac_useropt"
1229"*) ;;
1230      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1231	 ac_unrecognized_sep=', ';;
1232    esac
1233    eval enable_$ac_useropt=\$ac_optarg ;;
1234
1235  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1236  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1237  | --exec | --exe | --ex)
1238    ac_prev=exec_prefix ;;
1239  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1240  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1241  | --exec=* | --exe=* | --ex=*)
1242    exec_prefix=$ac_optarg ;;
1243
1244  -gas | --gas | --ga | --g)
1245    # Obsolete; use --with-gas.
1246    with_gas=yes ;;
1247
1248  -help | --help | --hel | --he | -h)
1249    ac_init_help=long ;;
1250  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1251    ac_init_help=recursive ;;
1252  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1253    ac_init_help=short ;;
1254
1255  -host | --host | --hos | --ho)
1256    ac_prev=host_alias ;;
1257  -host=* | --host=* | --hos=* | --ho=*)
1258    host_alias=$ac_optarg ;;
1259
1260  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1261    ac_prev=htmldir ;;
1262  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1263  | --ht=*)
1264    htmldir=$ac_optarg ;;
1265
1266  -includedir | --includedir | --includedi | --included | --include \
1267  | --includ | --inclu | --incl | --inc)
1268    ac_prev=includedir ;;
1269  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1270  | --includ=* | --inclu=* | --incl=* | --inc=*)
1271    includedir=$ac_optarg ;;
1272
1273  -infodir | --infodir | --infodi | --infod | --info | --inf)
1274    ac_prev=infodir ;;
1275  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1276    infodir=$ac_optarg ;;
1277
1278  -libdir | --libdir | --libdi | --libd)
1279    ac_prev=libdir ;;
1280  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1281    libdir=$ac_optarg ;;
1282
1283  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1284  | --libexe | --libex | --libe)
1285    ac_prev=libexecdir ;;
1286  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1287  | --libexe=* | --libex=* | --libe=*)
1288    libexecdir=$ac_optarg ;;
1289
1290  -localedir | --localedir | --localedi | --localed | --locale)
1291    ac_prev=localedir ;;
1292  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1293    localedir=$ac_optarg ;;
1294
1295  -localstatedir | --localstatedir | --localstatedi | --localstated \
1296  | --localstate | --localstat | --localsta | --localst | --locals)
1297    ac_prev=localstatedir ;;
1298  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1299  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1300    localstatedir=$ac_optarg ;;
1301
1302  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1303    ac_prev=mandir ;;
1304  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1305    mandir=$ac_optarg ;;
1306
1307  -nfp | --nfp | --nf)
1308    # Obsolete; use --without-fp.
1309    with_fp=no ;;
1310
1311  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1312  | --no-cr | --no-c | -n)
1313    no_create=yes ;;
1314
1315  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1316  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1317    no_recursion=yes ;;
1318
1319  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1320  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1321  | --oldin | --oldi | --old | --ol | --o)
1322    ac_prev=oldincludedir ;;
1323  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1324  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1325  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1326    oldincludedir=$ac_optarg ;;
1327
1328  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1329    ac_prev=prefix ;;
1330  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1331    prefix=$ac_optarg ;;
1332
1333  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1334  | --program-pre | --program-pr | --program-p)
1335    ac_prev=program_prefix ;;
1336  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1337  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1338    program_prefix=$ac_optarg ;;
1339
1340  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1341  | --program-suf | --program-su | --program-s)
1342    ac_prev=program_suffix ;;
1343  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1344  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1345    program_suffix=$ac_optarg ;;
1346
1347  -program-transform-name | --program-transform-name \
1348  | --program-transform-nam | --program-transform-na \
1349  | --program-transform-n | --program-transform- \
1350  | --program-transform | --program-transfor \
1351  | --program-transfo | --program-transf \
1352  | --program-trans | --program-tran \
1353  | --progr-tra | --program-tr | --program-t)
1354    ac_prev=program_transform_name ;;
1355  -program-transform-name=* | --program-transform-name=* \
1356  | --program-transform-nam=* | --program-transform-na=* \
1357  | --program-transform-n=* | --program-transform-=* \
1358  | --program-transform=* | --program-transfor=* \
1359  | --program-transfo=* | --program-transf=* \
1360  | --program-trans=* | --program-tran=* \
1361  | --progr-tra=* | --program-tr=* | --program-t=*)
1362    program_transform_name=$ac_optarg ;;
1363
1364  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1365    ac_prev=pdfdir ;;
1366  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1367    pdfdir=$ac_optarg ;;
1368
1369  -psdir | --psdir | --psdi | --psd | --ps)
1370    ac_prev=psdir ;;
1371  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1372    psdir=$ac_optarg ;;
1373
1374  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1375  | -silent | --silent | --silen | --sile | --sil)
1376    silent=yes ;;
1377
1378  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1379    ac_prev=sbindir ;;
1380  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1381  | --sbi=* | --sb=*)
1382    sbindir=$ac_optarg ;;
1383
1384  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1385  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1386  | --sharedst | --shareds | --shared | --share | --shar \
1387  | --sha | --sh)
1388    ac_prev=sharedstatedir ;;
1389  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1390  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1391  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1392  | --sha=* | --sh=*)
1393    sharedstatedir=$ac_optarg ;;
1394
1395  -site | --site | --sit)
1396    ac_prev=site ;;
1397  -site=* | --site=* | --sit=*)
1398    site=$ac_optarg ;;
1399
1400  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1401    ac_prev=srcdir ;;
1402  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1403    srcdir=$ac_optarg ;;
1404
1405  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1406  | --syscon | --sysco | --sysc | --sys | --sy)
1407    ac_prev=sysconfdir ;;
1408  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1409  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1410    sysconfdir=$ac_optarg ;;
1411
1412  -target | --target | --targe | --targ | --tar | --ta | --t)
1413    ac_prev=target_alias ;;
1414  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1415    target_alias=$ac_optarg ;;
1416
1417  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1418    verbose=yes ;;
1419
1420  -version | --version | --versio | --versi | --vers | -V)
1421    ac_init_version=: ;;
1422
1423  -with-* | --with-*)
1424    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1425    # Reject names that are not valid shell variable names.
1426    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1427      as_fn_error $? "invalid package name: $ac_useropt"
1428    ac_useropt_orig=$ac_useropt
1429    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1430    case $ac_user_opts in
1431      *"
1432"with_$ac_useropt"
1433"*) ;;
1434      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1435	 ac_unrecognized_sep=', ';;
1436    esac
1437    eval with_$ac_useropt=\$ac_optarg ;;
1438
1439  -without-* | --without-*)
1440    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1441    # Reject names that are not valid shell variable names.
1442    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1443      as_fn_error $? "invalid package name: $ac_useropt"
1444    ac_useropt_orig=$ac_useropt
1445    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1446    case $ac_user_opts in
1447      *"
1448"with_$ac_useropt"
1449"*) ;;
1450      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1451	 ac_unrecognized_sep=', ';;
1452    esac
1453    eval with_$ac_useropt=no ;;
1454
1455  --x)
1456    # Obsolete; use --with-x.
1457    with_x=yes ;;
1458
1459  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1460  | --x-incl | --x-inc | --x-in | --x-i)
1461    ac_prev=x_includes ;;
1462  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1463  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1464    x_includes=$ac_optarg ;;
1465
1466  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1467  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1468    ac_prev=x_libraries ;;
1469  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1470  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1471    x_libraries=$ac_optarg ;;
1472
1473  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1474Try \`$0 --help' for more information"
1475    ;;
1476
1477  *=*)
1478    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1479    # Reject names that are not valid shell variable names.
1480    case $ac_envvar in #(
1481      '' | [0-9]* | *[!_$as_cr_alnum]* )
1482      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1483    esac
1484    eval $ac_envvar=\$ac_optarg
1485    export $ac_envvar ;;
1486
1487  *)
1488    # FIXME: should be removed in autoconf 3.0.
1489    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1490    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1491      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1492    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1493    ;;
1494
1495  esac
1496done
1497
1498if test -n "$ac_prev"; then
1499  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1500  as_fn_error $? "missing argument to $ac_option"
1501fi
1502
1503if test -n "$ac_unrecognized_opts"; then
1504  case $enable_option_checking in
1505    no) ;;
1506    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1507    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1508  esac
1509fi
1510
1511# Check all directory arguments for consistency.
1512for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1513		datadir sysconfdir sharedstatedir localstatedir includedir \
1514		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1515		libdir localedir mandir
1516do
1517  eval ac_val=\$$ac_var
1518  # Remove trailing slashes.
1519  case $ac_val in
1520    */ )
1521      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1522      eval $ac_var=\$ac_val;;
1523  esac
1524  # Be sure to have absolute directory names.
1525  case $ac_val in
1526    [\\/$]* | ?:[\\/]* )  continue;;
1527    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1528  esac
1529  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1530done
1531
1532# There might be people who depend on the old broken behavior: `$host'
1533# used to hold the argument of --host etc.
1534# FIXME: To remove some day.
1535build=$build_alias
1536host=$host_alias
1537target=$target_alias
1538
1539# FIXME: To remove some day.
1540if test "x$host_alias" != x; then
1541  if test "x$build_alias" = x; then
1542    cross_compiling=maybe
1543  elif test "x$build_alias" != "x$host_alias"; then
1544    cross_compiling=yes
1545  fi
1546fi
1547
1548ac_tool_prefix=
1549test -n "$host_alias" && ac_tool_prefix=$host_alias-
1550
1551test "$silent" = yes && exec 6>/dev/null
1552
1553
1554ac_pwd=`pwd` && test -n "$ac_pwd" &&
1555ac_ls_di=`ls -di .` &&
1556ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1557  as_fn_error $? "working directory cannot be determined"
1558test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1559  as_fn_error $? "pwd does not report name of working directory"
1560
1561
1562# Find the source files, if location was not specified.
1563if test -z "$srcdir"; then
1564  ac_srcdir_defaulted=yes
1565  # Try the directory containing this script, then the parent directory.
1566  ac_confdir=`$as_dirname -- "$as_myself" ||
1567$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1568	 X"$as_myself" : 'X\(//\)[^/]' \| \
1569	 X"$as_myself" : 'X\(//\)$' \| \
1570	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1571$as_echo X"$as_myself" |
1572    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1573	    s//\1/
1574	    q
1575	  }
1576	  /^X\(\/\/\)[^/].*/{
1577	    s//\1/
1578	    q
1579	  }
1580	  /^X\(\/\/\)$/{
1581	    s//\1/
1582	    q
1583	  }
1584	  /^X\(\/\).*/{
1585	    s//\1/
1586	    q
1587	  }
1588	  s/.*/./; q'`
1589  srcdir=$ac_confdir
1590  if test ! -r "$srcdir/$ac_unique_file"; then
1591    srcdir=..
1592  fi
1593else
1594  ac_srcdir_defaulted=no
1595fi
1596if test ! -r "$srcdir/$ac_unique_file"; then
1597  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1598  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1599fi
1600ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1601ac_abs_confdir=`(
1602	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1603	pwd)`
1604# When building in place, set srcdir=.
1605if test "$ac_abs_confdir" = "$ac_pwd"; then
1606  srcdir=.
1607fi
1608# Remove unnecessary trailing slashes from srcdir.
1609# Double slashes in file names in object file debugging info
1610# mess up M-x gdb in Emacs.
1611case $srcdir in
1612*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1613esac
1614for ac_var in $ac_precious_vars; do
1615  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1616  eval ac_env_${ac_var}_value=\$${ac_var}
1617  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1618  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1619done
1620
1621#
1622# Report the --help message.
1623#
1624if test "$ac_init_help" = "long"; then
1625  # Omit some internal or obsolete options to make the list less imposing.
1626  # This message is too long to be a string in the A/UX 3.1 sh.
1627  cat <<_ACEOF
1628\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1629
1630Usage: $0 [OPTION]... [VAR=VALUE]...
1631
1632To assign environment variables (e.g., CC, CFLAGS...), specify them as
1633VAR=VALUE.  See below for descriptions of some of the useful variables.
1634
1635Defaults for the options are specified in brackets.
1636
1637Configuration:
1638  -h, --help              display this help and exit
1639      --help=short        display options specific to this package
1640      --help=recursive    display the short help of all the included packages
1641  -V, --version           display version information and exit
1642  -q, --quiet, --silent   do not print \`checking ...' messages
1643      --cache-file=FILE   cache test results in FILE [disabled]
1644  -C, --config-cache      alias for \`--cache-file=config.cache'
1645  -n, --no-create         do not create output files
1646      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1647
1648Installation directories:
1649  --prefix=PREFIX         install architecture-independent files in PREFIX
1650                          [$ac_default_prefix]
1651  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1652                          [PREFIX]
1653
1654By default, \`make install' will install all the files in
1655\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1656an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1657for instance \`--prefix=\$HOME'.
1658
1659For better control, use the options below.
1660
1661Fine tuning of the installation directories:
1662  --bindir=DIR            user executables [EPREFIX/bin]
1663  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1664  --libexecdir=DIR        program executables [EPREFIX/libexec]
1665  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1666  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1667  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1668  --libdir=DIR            object code libraries [EPREFIX/lib]
1669  --includedir=DIR        C header files [PREFIX/include]
1670  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1671  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1672  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1673  --infodir=DIR           info documentation [DATAROOTDIR/info]
1674  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1675  --mandir=DIR            man documentation [DATAROOTDIR/man]
1676  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1677  --htmldir=DIR           html documentation [DOCDIR]
1678  --dvidir=DIR            dvi documentation [DOCDIR]
1679  --pdfdir=DIR            pdf documentation [DOCDIR]
1680  --psdir=DIR             ps documentation [DOCDIR]
1681_ACEOF
1682
1683  cat <<\_ACEOF
1684
1685X features:
1686  --x-includes=DIR    X include files are in DIR
1687  --x-libraries=DIR   X library files are in DIR
1688
1689System types:
1690  --build=BUILD     configure for building on BUILD [guessed]
1691  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1692  --target=TARGET   configure for building compilers for TARGET [HOST]
1693_ACEOF
1694fi
1695
1696if test -n "$ac_init_help"; then
1697  case $ac_init_help in
1698     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1699   esac
1700  cat <<\_ACEOF
1701
1702Optional Features:
1703  --disable-option-checking  ignore unrecognized --enable/--with options
1704  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1705  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1706  --enable-openjdk-only   suppress building custom source even if present
1707                          [disabled]
1708  --enable-debug          set the debug level to fastdebug (shorthand for
1709                          --with-debug-level=fastdebug) [disabled]
1710  --disable-headful       disable building headful support (graphical UI
1711                          support) [enabled]
1712  --enable-hotspot-test-in-build
1713                          run the Queens test after Hotspot build [disabled]
1714  --enable-unlimited-crypto
1715                          Enable unlimited crypto policy [disabled]
1716  --disable-debug-symbols disable generation of debug symbols [enabled]
1717  --disable-zip-debug-info
1718                          disable zipping of debug-info files [enabled]
1719  --enable-macosx-runtime-support
1720                          Deprecated. Option is kept for backwards
1721                          compatibility and is ignored
1722  --enable-sjavac         use sjavac to do fast incremental compiles
1723                          [disabled]
1724  --disable-precompiled-headers
1725                          disable using precompiled headers when compiling C++
1726                          [enabled]
1727  --disable-ccache        disable using ccache to speed up recompilations
1728                          [enabled]
1729
1730Optional Packages:
1731  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1732  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1733  --with-custom-make-dir  use this directory for custom build/make files
1734  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1735                          support it), e.g. --with-target-bits=32 [guessed]
1736  --with-sys-root         pass this sys-root to the compilers and tools (for
1737                          cross-compiling)
1738  --with-tools-dir        search this directory for compilers and tools (for
1739                          cross-compiling)
1740  --with-devkit           use this directory as base for tools-dir and
1741                          sys-root (for cross-compiling)
1742  --with-jdk-variant      JDK variant to build (normal) [normal]
1743  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1744                          client, minimal1, kernel, zero, zeroshark) [server]
1745  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1746                          [release]
1747  --with-conf-name        use this as the name of the configuration [generated
1748                          from important configuration options]
1749  --with-builddeps-conf   use this configuration file for the builddeps
1750  --with-builddeps-server download and use build dependencies from this server
1751                          url
1752  --with-builddeps-dir    store downloaded build dependencies here
1753                          [/localhome/builddeps]
1754  --with-builddeps-group  chgrp the downloaded build dependencies to this
1755                          group
1756  --with-cacerts-file     specify alternative cacerts file
1757  --with-milestone        Set milestone value for build [internal]
1758  --with-update-version   Set update version value for build [b00]
1759  --with-user-release-suffix
1760                          Add a custom string to the version string if build
1761                          number isn't set.[username_builddateb00]
1762  --with-build-number     Set build number value for build [b00]
1763  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1764  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1765                          invocations of the Boot JDK, overriding the default
1766                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1767                          -enableassertions"
1768  --with-add-source-root  for each and every source directory, look in this
1769                          additional source root for the same directory; if it
1770                          exists and have files in it, include it in the build
1771  --with-override-source-root
1772                          for each and every source directory, look in this
1773                          override source root for the same directory; if it
1774                          exists, use that directory instead and ignore the
1775                          directory in the original source root
1776  --with-adds-and-overrides
1777                          use the subdirs 'adds' and 'overrides' in the
1778                          specified directory as add-source-root and
1779                          override-source-root
1780  --with-override-langtools
1781                          use this langtools dir for the build
1782  --with-override-corba   use this corba dir for the build
1783  --with-override-jaxp    use this jaxp dir for the build
1784  --with-override-jaxws   use this jaxws dir for the build
1785  --with-override-hotspot use this hotspot dir for the build
1786  --with-override-nashorn use this nashorn dir for the build
1787  --with-override-jdk     use this jdk dir for the build
1788  --with-import-hotspot   import hotspot binaries from this jdk image or
1789                          hotspot build dist dir instead of building from
1790                          source
1791  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1792                          only) [probed]
1793  --with-dxsdk            Deprecated. Option is kept for backwards
1794                          compatibility and is ignored
1795  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1796                          compatibility and is ignored
1797  --with-dxsdk-include    Deprecated. Option is kept for backwards
1798                          compatibility and is ignored
1799  --with-jtreg            Regression Test Harness [probed]
1800  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1801  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1802  --with-extra-ldflags    extra flags to be used when linking jdk
1803  --with-x                use the X Window System
1804  --with-cups             specify prefix directory for the cups package
1805                          (expecting the headers under PATH/include)
1806  --with-cups-include     specify directory for the cups include files
1807  --with-freetype         specify prefix directory for the freetype2 package
1808                          (expecting the libraries under PATH/lib and the
1809                          headers under PATH/include)
1810  --with-alsa             specify prefix directory for the alsa package
1811                          (expecting the libraries under PATH/lib and the
1812                          headers under PATH/include)
1813  --with-alsa-include     specify directory for the alsa include files
1814  --with-alsa-lib         specify directory for the alsa library
1815  --with-giflib           use giflib from build system or OpenJDK source
1816                          (system, bundled) [bundled]
1817  --with-zlib             use zlib from build system or OpenJDK source
1818                          (system, bundled) [bundled]
1819  --with-stdc++lib=<static>,<dynamic>,<default>
1820                          force linking of the C++ runtime on Linux to either
1821                          static or dynamic, default is static with dynamic as
1822                          fallback
1823  --with-num-cores        number of cores in the build system, e.g.
1824                          --with-num-cores=8 [probed]
1825  --with-memory-size      memory (in MB) available in the build system, e.g.
1826                          --with-memory-size=1024 [probed]
1827  --with-jobs             number of parallel jobs to let make run [calculated
1828                          based on cores and memory]
1829  --with-sjavac-server-java
1830                          use this java binary for running the sjavac
1831                          background server [Boot JDK java]
1832  --with-ccache-dir       where to store ccache files [~/.ccache]
1833
1834Some influential environment variables:
1835  PKG_CONFIG  path to pkg-config utility
1836  CC          C compiler command
1837  CFLAGS      C compiler flags
1838  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1839              nonstandard directory <lib dir>
1840  LIBS        libraries to pass to the linker, e.g. -l<library>
1841  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1842              you have headers in a nonstandard directory <include dir>
1843  CXX         C++ compiler command
1844  CXXFLAGS    C++ compiler flags
1845  OBJC        Objective C compiler command
1846  OBJCFLAGS   Objective C compiler flags
1847  CPP         C preprocessor
1848  CXXCPP      C++ preprocessor
1849  XMKMF       Path to xmkmf, Makefile generator for X Window System
1850  FREETYPE2_CFLAGS
1851              C compiler flags for FREETYPE2, overriding pkg-config
1852  FREETYPE2_LIBS
1853              linker flags for FREETYPE2, overriding pkg-config
1854  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1855  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1856  LIBFFI_CFLAGS
1857              C compiler flags for LIBFFI, overriding pkg-config
1858  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
1859
1860Use these variables to override the choices made by `configure' or to help
1861it to find libraries and programs with nonstandard names/locations.
1862
1863Report bugs to <build-dev@openjdk.java.net>.
1864OpenJDK home page: <http://openjdk.java.net>.
1865_ACEOF
1866ac_status=$?
1867fi
1868
1869if test "$ac_init_help" = "recursive"; then
1870  # If there are subdirs, report their specific --help.
1871  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1872    test -d "$ac_dir" ||
1873      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1874      continue
1875    ac_builddir=.
1876
1877case "$ac_dir" in
1878.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1879*)
1880  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1881  # A ".." for each directory in $ac_dir_suffix.
1882  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1883  case $ac_top_builddir_sub in
1884  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1885  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1886  esac ;;
1887esac
1888ac_abs_top_builddir=$ac_pwd
1889ac_abs_builddir=$ac_pwd$ac_dir_suffix
1890# for backward compatibility:
1891ac_top_builddir=$ac_top_build_prefix
1892
1893case $srcdir in
1894  .)  # We are building in place.
1895    ac_srcdir=.
1896    ac_top_srcdir=$ac_top_builddir_sub
1897    ac_abs_top_srcdir=$ac_pwd ;;
1898  [\\/]* | ?:[\\/]* )  # Absolute name.
1899    ac_srcdir=$srcdir$ac_dir_suffix;
1900    ac_top_srcdir=$srcdir
1901    ac_abs_top_srcdir=$srcdir ;;
1902  *) # Relative name.
1903    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1904    ac_top_srcdir=$ac_top_build_prefix$srcdir
1905    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1906esac
1907ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1908
1909    cd "$ac_dir" || { ac_status=$?; continue; }
1910    # Check for guested configure.
1911    if test -f "$ac_srcdir/configure.gnu"; then
1912      echo &&
1913      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1914    elif test -f "$ac_srcdir/configure"; then
1915      echo &&
1916      $SHELL "$ac_srcdir/configure" --help=recursive
1917    else
1918      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1919    fi || ac_status=$?
1920    cd "$ac_pwd" || { ac_status=$?; break; }
1921  done
1922fi
1923
1924test -n "$ac_init_help" && exit $ac_status
1925if $ac_init_version; then
1926  cat <<\_ACEOF
1927OpenJDK configure jdk8
1928generated by GNU Autoconf 2.69
1929
1930Copyright (C) 2012 Free Software Foundation, Inc.
1931This configure script is free software; the Free Software Foundation
1932gives unlimited permission to copy, distribute and modify it.
1933_ACEOF
1934  exit
1935fi
1936
1937## ------------------------ ##
1938## Autoconf initialization. ##
1939## ------------------------ ##
1940
1941# ac_fn_c_try_compile LINENO
1942# --------------------------
1943# Try to compile conftest.$ac_ext, and return whether this succeeded.
1944ac_fn_c_try_compile ()
1945{
1946  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1947  rm -f conftest.$ac_objext
1948  if { { ac_try="$ac_compile"
1949case "(($ac_try" in
1950  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1951  *) ac_try_echo=$ac_try;;
1952esac
1953eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1954$as_echo "$ac_try_echo"; } >&5
1955  (eval "$ac_compile") 2>conftest.err
1956  ac_status=$?
1957  if test -s conftest.err; then
1958    grep -v '^ *+' conftest.err >conftest.er1
1959    cat conftest.er1 >&5
1960    mv -f conftest.er1 conftest.err
1961  fi
1962  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1963  test $ac_status = 0; } && {
1964	 test -z "$ac_c_werror_flag" ||
1965	 test ! -s conftest.err
1966       } && test -s conftest.$ac_objext; then :
1967  ac_retval=0
1968else
1969  $as_echo "$as_me: failed program was:" >&5
1970sed 's/^/| /' conftest.$ac_ext >&5
1971
1972	ac_retval=1
1973fi
1974  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1975  as_fn_set_status $ac_retval
1976
1977} # ac_fn_c_try_compile
1978
1979# ac_fn_cxx_try_compile LINENO
1980# ----------------------------
1981# Try to compile conftest.$ac_ext, and return whether this succeeded.
1982ac_fn_cxx_try_compile ()
1983{
1984  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1985  rm -f conftest.$ac_objext
1986  if { { ac_try="$ac_compile"
1987case "(($ac_try" in
1988  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1989  *) ac_try_echo=$ac_try;;
1990esac
1991eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1992$as_echo "$ac_try_echo"; } >&5
1993  (eval "$ac_compile") 2>conftest.err
1994  ac_status=$?
1995  if test -s conftest.err; then
1996    grep -v '^ *+' conftest.err >conftest.er1
1997    cat conftest.er1 >&5
1998    mv -f conftest.er1 conftest.err
1999  fi
2000  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2001  test $ac_status = 0; } && {
2002	 test -z "$ac_cxx_werror_flag" ||
2003	 test ! -s conftest.err
2004       } && test -s conftest.$ac_objext; then :
2005  ac_retval=0
2006else
2007  $as_echo "$as_me: failed program was:" >&5
2008sed 's/^/| /' conftest.$ac_ext >&5
2009
2010	ac_retval=1
2011fi
2012  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2013  as_fn_set_status $ac_retval
2014
2015} # ac_fn_cxx_try_compile
2016
2017# ac_fn_objc_try_compile LINENO
2018# -----------------------------
2019# Try to compile conftest.$ac_ext, and return whether this succeeded.
2020ac_fn_objc_try_compile ()
2021{
2022  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2023  rm -f conftest.$ac_objext
2024  if { { ac_try="$ac_compile"
2025case "(($ac_try" in
2026  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2027  *) ac_try_echo=$ac_try;;
2028esac
2029eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2030$as_echo "$ac_try_echo"; } >&5
2031  (eval "$ac_compile") 2>conftest.err
2032  ac_status=$?
2033  if test -s conftest.err; then
2034    grep -v '^ *+' conftest.err >conftest.er1
2035    cat conftest.er1 >&5
2036    mv -f conftest.er1 conftest.err
2037  fi
2038  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2039  test $ac_status = 0; } && {
2040	 test -z "$ac_objc_werror_flag" ||
2041	 test ! -s conftest.err
2042       } && test -s conftest.$ac_objext; then :
2043  ac_retval=0
2044else
2045  $as_echo "$as_me: failed program was:" >&5
2046sed 's/^/| /' conftest.$ac_ext >&5
2047
2048	ac_retval=1
2049fi
2050  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2051  as_fn_set_status $ac_retval
2052
2053} # ac_fn_objc_try_compile
2054
2055# ac_fn_c_try_cpp LINENO
2056# ----------------------
2057# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2058ac_fn_c_try_cpp ()
2059{
2060  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2061  if { { ac_try="$ac_cpp conftest.$ac_ext"
2062case "(($ac_try" in
2063  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2064  *) ac_try_echo=$ac_try;;
2065esac
2066eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2067$as_echo "$ac_try_echo"; } >&5
2068  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2069  ac_status=$?
2070  if test -s conftest.err; then
2071    grep -v '^ *+' conftest.err >conftest.er1
2072    cat conftest.er1 >&5
2073    mv -f conftest.er1 conftest.err
2074  fi
2075  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2076  test $ac_status = 0; } > conftest.i && {
2077	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2078	 test ! -s conftest.err
2079       }; then :
2080  ac_retval=0
2081else
2082  $as_echo "$as_me: failed program was:" >&5
2083sed 's/^/| /' conftest.$ac_ext >&5
2084
2085    ac_retval=1
2086fi
2087  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2088  as_fn_set_status $ac_retval
2089
2090} # ac_fn_c_try_cpp
2091
2092# ac_fn_cxx_try_cpp LINENO
2093# ------------------------
2094# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2095ac_fn_cxx_try_cpp ()
2096{
2097  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2098  if { { ac_try="$ac_cpp conftest.$ac_ext"
2099case "(($ac_try" in
2100  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2101  *) ac_try_echo=$ac_try;;
2102esac
2103eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2104$as_echo "$ac_try_echo"; } >&5
2105  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2106  ac_status=$?
2107  if test -s conftest.err; then
2108    grep -v '^ *+' conftest.err >conftest.er1
2109    cat conftest.er1 >&5
2110    mv -f conftest.er1 conftest.err
2111  fi
2112  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2113  test $ac_status = 0; } > conftest.i && {
2114	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2115	 test ! -s conftest.err
2116       }; then :
2117  ac_retval=0
2118else
2119  $as_echo "$as_me: failed program was:" >&5
2120sed 's/^/| /' conftest.$ac_ext >&5
2121
2122    ac_retval=1
2123fi
2124  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2125  as_fn_set_status $ac_retval
2126
2127} # ac_fn_cxx_try_cpp
2128
2129# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2130# ---------------------------------------------------------
2131# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2132# the include files in INCLUDES and setting the cache variable VAR
2133# accordingly.
2134ac_fn_cxx_check_header_mongrel ()
2135{
2136  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2137  if eval \${$3+:} false; then :
2138  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2139$as_echo_n "checking for $2... " >&6; }
2140if eval \${$3+:} false; then :
2141  $as_echo_n "(cached) " >&6
2142fi
2143eval ac_res=\$$3
2144	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2145$as_echo "$ac_res" >&6; }
2146else
2147  # Is the header compilable?
2148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2149$as_echo_n "checking $2 usability... " >&6; }
2150cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2151/* end confdefs.h.  */
2152$4
2153#include <$2>
2154_ACEOF
2155if ac_fn_cxx_try_compile "$LINENO"; then :
2156  ac_header_compiler=yes
2157else
2158  ac_header_compiler=no
2159fi
2160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2162$as_echo "$ac_header_compiler" >&6; }
2163
2164# Is the header present?
2165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2166$as_echo_n "checking $2 presence... " >&6; }
2167cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2168/* end confdefs.h.  */
2169#include <$2>
2170_ACEOF
2171if ac_fn_cxx_try_cpp "$LINENO"; then :
2172  ac_header_preproc=yes
2173else
2174  ac_header_preproc=no
2175fi
2176rm -f conftest.err conftest.i conftest.$ac_ext
2177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2178$as_echo "$ac_header_preproc" >&6; }
2179
2180# So?  What about this header?
2181case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2182  yes:no: )
2183    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2184$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2185    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2186$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2187    ;;
2188  no:yes:* )
2189    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2190$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2191    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2192$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2193    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2194$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2195    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2196$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2197    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2198$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2199( $as_echo "## ----------------------------------------- ##
2200## Report this to build-dev@openjdk.java.net ##
2201## ----------------------------------------- ##"
2202     ) | sed "s/^/$as_me: WARNING:     /" >&2
2203    ;;
2204esac
2205  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2206$as_echo_n "checking for $2... " >&6; }
2207if eval \${$3+:} false; then :
2208  $as_echo_n "(cached) " >&6
2209else
2210  eval "$3=\$ac_header_compiler"
2211fi
2212eval ac_res=\$$3
2213	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2214$as_echo "$ac_res" >&6; }
2215fi
2216  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2217
2218} # ac_fn_cxx_check_header_mongrel
2219
2220# ac_fn_cxx_try_run LINENO
2221# ------------------------
2222# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2223# that executables *can* be run.
2224ac_fn_cxx_try_run ()
2225{
2226  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2227  if { { ac_try="$ac_link"
2228case "(($ac_try" in
2229  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2230  *) ac_try_echo=$ac_try;;
2231esac
2232eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2233$as_echo "$ac_try_echo"; } >&5
2234  (eval "$ac_link") 2>&5
2235  ac_status=$?
2236  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2237  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2238  { { case "(($ac_try" in
2239  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2240  *) ac_try_echo=$ac_try;;
2241esac
2242eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2243$as_echo "$ac_try_echo"; } >&5
2244  (eval "$ac_try") 2>&5
2245  ac_status=$?
2246  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2247  test $ac_status = 0; }; }; then :
2248  ac_retval=0
2249else
2250  $as_echo "$as_me: program exited with status $ac_status" >&5
2251       $as_echo "$as_me: failed program was:" >&5
2252sed 's/^/| /' conftest.$ac_ext >&5
2253
2254       ac_retval=$ac_status
2255fi
2256  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2257  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2258  as_fn_set_status $ac_retval
2259
2260} # ac_fn_cxx_try_run
2261
2262# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2263# ---------------------------------------------------------
2264# Tests whether HEADER exists and can be compiled using the include files in
2265# INCLUDES, setting the cache variable VAR accordingly.
2266ac_fn_cxx_check_header_compile ()
2267{
2268  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2269  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2270$as_echo_n "checking for $2... " >&6; }
2271if eval \${$3+:} false; then :
2272  $as_echo_n "(cached) " >&6
2273else
2274  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2275/* end confdefs.h.  */
2276$4
2277#include <$2>
2278_ACEOF
2279if ac_fn_cxx_try_compile "$LINENO"; then :
2280  eval "$3=yes"
2281else
2282  eval "$3=no"
2283fi
2284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2285fi
2286eval ac_res=\$$3
2287	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2288$as_echo "$ac_res" >&6; }
2289  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2290
2291} # ac_fn_cxx_check_header_compile
2292
2293# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2294# ----------------------------------------------
2295# Tries to find the compile-time value of EXPR in a program that includes
2296# INCLUDES, setting VAR accordingly. Returns whether the value could be
2297# computed
2298ac_fn_cxx_compute_int ()
2299{
2300  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2301  if test "$cross_compiling" = yes; then
2302    # Depending upon the size, compute the lo and hi bounds.
2303cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2304/* end confdefs.h.  */
2305$4
2306int
2307main ()
2308{
2309static int test_array [1 - 2 * !(($2) >= 0)];
2310test_array [0] = 0;
2311return test_array [0];
2312
2313  ;
2314  return 0;
2315}
2316_ACEOF
2317if ac_fn_cxx_try_compile "$LINENO"; then :
2318  ac_lo=0 ac_mid=0
2319  while :; do
2320    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2321/* end confdefs.h.  */
2322$4
2323int
2324main ()
2325{
2326static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2327test_array [0] = 0;
2328return test_array [0];
2329
2330  ;
2331  return 0;
2332}
2333_ACEOF
2334if ac_fn_cxx_try_compile "$LINENO"; then :
2335  ac_hi=$ac_mid; break
2336else
2337  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2338			if test $ac_lo -le $ac_mid; then
2339			  ac_lo= ac_hi=
2340			  break
2341			fi
2342			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2343fi
2344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2345  done
2346else
2347  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2348/* end confdefs.h.  */
2349$4
2350int
2351main ()
2352{
2353static int test_array [1 - 2 * !(($2) < 0)];
2354test_array [0] = 0;
2355return test_array [0];
2356
2357  ;
2358  return 0;
2359}
2360_ACEOF
2361if ac_fn_cxx_try_compile "$LINENO"; then :
2362  ac_hi=-1 ac_mid=-1
2363  while :; do
2364    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2365/* end confdefs.h.  */
2366$4
2367int
2368main ()
2369{
2370static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2371test_array [0] = 0;
2372return test_array [0];
2373
2374  ;
2375  return 0;
2376}
2377_ACEOF
2378if ac_fn_cxx_try_compile "$LINENO"; then :
2379  ac_lo=$ac_mid; break
2380else
2381  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2382			if test $ac_mid -le $ac_hi; then
2383			  ac_lo= ac_hi=
2384			  break
2385			fi
2386			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2387fi
2388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2389  done
2390else
2391  ac_lo= ac_hi=
2392fi
2393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2394fi
2395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2396# Binary search between lo and hi bounds.
2397while test "x$ac_lo" != "x$ac_hi"; do
2398  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2399  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2400/* end confdefs.h.  */
2401$4
2402int
2403main ()
2404{
2405static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2406test_array [0] = 0;
2407return test_array [0];
2408
2409  ;
2410  return 0;
2411}
2412_ACEOF
2413if ac_fn_cxx_try_compile "$LINENO"; then :
2414  ac_hi=$ac_mid
2415else
2416  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2417fi
2418rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2419done
2420case $ac_lo in #((
2421?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2422'') ac_retval=1 ;;
2423esac
2424  else
2425    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2426/* end confdefs.h.  */
2427$4
2428static long int longval () { return $2; }
2429static unsigned long int ulongval () { return $2; }
2430#include <stdio.h>
2431#include <stdlib.h>
2432int
2433main ()
2434{
2435
2436  FILE *f = fopen ("conftest.val", "w");
2437  if (! f)
2438    return 1;
2439  if (($2) < 0)
2440    {
2441      long int i = longval ();
2442      if (i != ($2))
2443	return 1;
2444      fprintf (f, "%ld", i);
2445    }
2446  else
2447    {
2448      unsigned long int i = ulongval ();
2449      if (i != ($2))
2450	return 1;
2451      fprintf (f, "%lu", i);
2452    }
2453  /* Do not output a trailing newline, as this causes \r\n confusion
2454     on some platforms.  */
2455  return ferror (f) || fclose (f) != 0;
2456
2457  ;
2458  return 0;
2459}
2460_ACEOF
2461if ac_fn_cxx_try_run "$LINENO"; then :
2462  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2463else
2464  ac_retval=1
2465fi
2466rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2467  conftest.$ac_objext conftest.beam conftest.$ac_ext
2468rm -f conftest.val
2469
2470  fi
2471  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2472  as_fn_set_status $ac_retval
2473
2474} # ac_fn_cxx_compute_int
2475
2476# ac_fn_cxx_try_link LINENO
2477# -------------------------
2478# Try to link conftest.$ac_ext, and return whether this succeeded.
2479ac_fn_cxx_try_link ()
2480{
2481  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2482  rm -f conftest.$ac_objext conftest$ac_exeext
2483  if { { ac_try="$ac_link"
2484case "(($ac_try" in
2485  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2486  *) ac_try_echo=$ac_try;;
2487esac
2488eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2489$as_echo "$ac_try_echo"; } >&5
2490  (eval "$ac_link") 2>conftest.err
2491  ac_status=$?
2492  if test -s conftest.err; then
2493    grep -v '^ *+' conftest.err >conftest.er1
2494    cat conftest.er1 >&5
2495    mv -f conftest.er1 conftest.err
2496  fi
2497  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2498  test $ac_status = 0; } && {
2499	 test -z "$ac_cxx_werror_flag" ||
2500	 test ! -s conftest.err
2501       } && test -s conftest$ac_exeext && {
2502	 test "$cross_compiling" = yes ||
2503	 test -x conftest$ac_exeext
2504       }; then :
2505  ac_retval=0
2506else
2507  $as_echo "$as_me: failed program was:" >&5
2508sed 's/^/| /' conftest.$ac_ext >&5
2509
2510	ac_retval=1
2511fi
2512  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2513  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2514  # interfere with the next link command; also delete a directory that is
2515  # left behind by Apple's compiler.  We do this before executing the actions.
2516  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2517  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2518  as_fn_set_status $ac_retval
2519
2520} # ac_fn_cxx_try_link
2521
2522# ac_fn_cxx_check_func LINENO FUNC VAR
2523# ------------------------------------
2524# Tests whether FUNC exists, setting the cache variable VAR accordingly
2525ac_fn_cxx_check_func ()
2526{
2527  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2528  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2529$as_echo_n "checking for $2... " >&6; }
2530if eval \${$3+:} false; then :
2531  $as_echo_n "(cached) " >&6
2532else
2533  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2534/* end confdefs.h.  */
2535/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2536   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2537#define $2 innocuous_$2
2538
2539/* System header to define __stub macros and hopefully few prototypes,
2540    which can conflict with char $2 (); below.
2541    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2542    <limits.h> exists even on freestanding compilers.  */
2543
2544#ifdef __STDC__
2545# include <limits.h>
2546#else
2547# include <assert.h>
2548#endif
2549
2550#undef $2
2551
2552/* Override any GCC internal prototype to avoid an error.
2553   Use char because int might match the return type of a GCC
2554   builtin and then its argument prototype would still apply.  */
2555#ifdef __cplusplus
2556extern "C"
2557#endif
2558char $2 ();
2559/* The GNU C library defines this for functions which it implements
2560    to always fail with ENOSYS.  Some functions are actually named
2561    something starting with __ and the normal name is an alias.  */
2562#if defined __stub_$2 || defined __stub___$2
2563choke me
2564#endif
2565
2566int
2567main ()
2568{
2569return $2 ();
2570  ;
2571  return 0;
2572}
2573_ACEOF
2574if ac_fn_cxx_try_link "$LINENO"; then :
2575  eval "$3=yes"
2576else
2577  eval "$3=no"
2578fi
2579rm -f core conftest.err conftest.$ac_objext \
2580    conftest$ac_exeext conftest.$ac_ext
2581fi
2582eval ac_res=\$$3
2583	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2584$as_echo "$ac_res" >&6; }
2585  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2586
2587} # ac_fn_cxx_check_func
2588
2589# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2590# -------------------------------------------------------
2591# Tests whether HEADER exists and can be compiled using the include files in
2592# INCLUDES, setting the cache variable VAR accordingly.
2593ac_fn_c_check_header_compile ()
2594{
2595  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2596  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2597$as_echo_n "checking for $2... " >&6; }
2598if eval \${$3+:} false; then :
2599  $as_echo_n "(cached) " >&6
2600else
2601  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2602/* end confdefs.h.  */
2603$4
2604#include <$2>
2605_ACEOF
2606if ac_fn_c_try_compile "$LINENO"; then :
2607  eval "$3=yes"
2608else
2609  eval "$3=no"
2610fi
2611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2612fi
2613eval ac_res=\$$3
2614	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2615$as_echo "$ac_res" >&6; }
2616  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2617
2618} # ac_fn_c_check_header_compile
2619cat >config.log <<_ACEOF
2620This file contains any messages produced by compilers while
2621running configure, to aid debugging if configure makes a mistake.
2622
2623It was created by OpenJDK $as_me jdk8, which was
2624generated by GNU Autoconf 2.69.  Invocation command line was
2625
2626  $ $0 $@
2627
2628_ACEOF
2629exec 5>>config.log
2630{
2631cat <<_ASUNAME
2632## --------- ##
2633## Platform. ##
2634## --------- ##
2635
2636hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2637uname -m = `(uname -m) 2>/dev/null || echo unknown`
2638uname -r = `(uname -r) 2>/dev/null || echo unknown`
2639uname -s = `(uname -s) 2>/dev/null || echo unknown`
2640uname -v = `(uname -v) 2>/dev/null || echo unknown`
2641
2642/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2643/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2644
2645/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2646/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2647/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2648/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2649/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2650/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2651/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2652
2653_ASUNAME
2654
2655as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2656for as_dir in $PATH
2657do
2658  IFS=$as_save_IFS
2659  test -z "$as_dir" && as_dir=.
2660    $as_echo "PATH: $as_dir"
2661  done
2662IFS=$as_save_IFS
2663
2664} >&5
2665
2666cat >&5 <<_ACEOF
2667
2668
2669## ----------- ##
2670## Core tests. ##
2671## ----------- ##
2672
2673_ACEOF
2674
2675
2676# Keep a trace of the command line.
2677# Strip out --no-create and --no-recursion so they do not pile up.
2678# Strip out --silent because we don't want to record it for future runs.
2679# Also quote any args containing shell meta-characters.
2680# Make two passes to allow for proper duplicate-argument suppression.
2681ac_configure_args=
2682ac_configure_args0=
2683ac_configure_args1=
2684ac_must_keep_next=false
2685for ac_pass in 1 2
2686do
2687  for ac_arg
2688  do
2689    case $ac_arg in
2690    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2691    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2692    | -silent | --silent | --silen | --sile | --sil)
2693      continue ;;
2694    *\'*)
2695      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2696    esac
2697    case $ac_pass in
2698    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2699    2)
2700      as_fn_append ac_configure_args1 " '$ac_arg'"
2701      if test $ac_must_keep_next = true; then
2702	ac_must_keep_next=false # Got value, back to normal.
2703      else
2704	case $ac_arg in
2705	  *=* | --config-cache | -C | -disable-* | --disable-* \
2706	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2707	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2708	  | -with-* | --with-* | -without-* | --without-* | --x)
2709	    case "$ac_configure_args0 " in
2710	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2711	    esac
2712	    ;;
2713	  -* ) ac_must_keep_next=true ;;
2714	esac
2715      fi
2716      as_fn_append ac_configure_args " '$ac_arg'"
2717      ;;
2718    esac
2719  done
2720done
2721{ ac_configure_args0=; unset ac_configure_args0;}
2722{ ac_configure_args1=; unset ac_configure_args1;}
2723
2724# When interrupted or exit'd, cleanup temporary files, and complete
2725# config.log.  We remove comments because anyway the quotes in there
2726# would cause problems or look ugly.
2727# WARNING: Use '\'' to represent an apostrophe within the trap.
2728# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2729trap 'exit_status=$?
2730  # Save into config.log some information that might help in debugging.
2731  {
2732    echo
2733
2734    $as_echo "## ---------------- ##
2735## Cache variables. ##
2736## ---------------- ##"
2737    echo
2738    # The following way of writing the cache mishandles newlines in values,
2739(
2740  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2741    eval ac_val=\$$ac_var
2742    case $ac_val in #(
2743    *${as_nl}*)
2744      case $ac_var in #(
2745      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2746$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2747      esac
2748      case $ac_var in #(
2749      _ | IFS | as_nl) ;; #(
2750      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2751      *) { eval $ac_var=; unset $ac_var;} ;;
2752      esac ;;
2753    esac
2754  done
2755  (set) 2>&1 |
2756    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2757    *${as_nl}ac_space=\ *)
2758      sed -n \
2759	"s/'\''/'\''\\\\'\'''\''/g;
2760	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2761      ;; #(
2762    *)
2763      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2764      ;;
2765    esac |
2766    sort
2767)
2768    echo
2769
2770    $as_echo "## ----------------- ##
2771## Output variables. ##
2772## ----------------- ##"
2773    echo
2774    for ac_var in $ac_subst_vars
2775    do
2776      eval ac_val=\$$ac_var
2777      case $ac_val in
2778      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2779      esac
2780      $as_echo "$ac_var='\''$ac_val'\''"
2781    done | sort
2782    echo
2783
2784    if test -n "$ac_subst_files"; then
2785      $as_echo "## ------------------- ##
2786## File substitutions. ##
2787## ------------------- ##"
2788      echo
2789      for ac_var in $ac_subst_files
2790      do
2791	eval ac_val=\$$ac_var
2792	case $ac_val in
2793	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2794	esac
2795	$as_echo "$ac_var='\''$ac_val'\''"
2796      done | sort
2797      echo
2798    fi
2799
2800    if test -s confdefs.h; then
2801      $as_echo "## ----------- ##
2802## confdefs.h. ##
2803## ----------- ##"
2804      echo
2805      cat confdefs.h
2806      echo
2807    fi
2808    test "$ac_signal" != 0 &&
2809      $as_echo "$as_me: caught signal $ac_signal"
2810    $as_echo "$as_me: exit $exit_status"
2811  } >&5
2812  rm -f core *.core core.conftest.* &&
2813    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2814    exit $exit_status
2815' 0
2816for ac_signal in 1 2 13 15; do
2817  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2818done
2819ac_signal=0
2820
2821# confdefs.h avoids OS command line length limits that DEFS can exceed.
2822rm -f -r conftest* confdefs.h
2823
2824$as_echo "/* confdefs.h */" > confdefs.h
2825
2826# Predefined preprocessor variables.
2827
2828cat >>confdefs.h <<_ACEOF
2829#define PACKAGE_NAME "$PACKAGE_NAME"
2830_ACEOF
2831
2832cat >>confdefs.h <<_ACEOF
2833#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2834_ACEOF
2835
2836cat >>confdefs.h <<_ACEOF
2837#define PACKAGE_VERSION "$PACKAGE_VERSION"
2838_ACEOF
2839
2840cat >>confdefs.h <<_ACEOF
2841#define PACKAGE_STRING "$PACKAGE_STRING"
2842_ACEOF
2843
2844cat >>confdefs.h <<_ACEOF
2845#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2846_ACEOF
2847
2848cat >>confdefs.h <<_ACEOF
2849#define PACKAGE_URL "$PACKAGE_URL"
2850_ACEOF
2851
2852
2853# Let the site file select an alternate cache file if it wants to.
2854# Prefer an explicitly selected file to automatically selected ones.
2855ac_site_file1=NONE
2856ac_site_file2=NONE
2857if test -n "$CONFIG_SITE"; then
2858  # We do not want a PATH search for config.site.
2859  case $CONFIG_SITE in #((
2860    -*)  ac_site_file1=./$CONFIG_SITE;;
2861    */*) ac_site_file1=$CONFIG_SITE;;
2862    *)   ac_site_file1=./$CONFIG_SITE;;
2863  esac
2864elif test "x$prefix" != xNONE; then
2865  ac_site_file1=$prefix/share/config.site
2866  ac_site_file2=$prefix/etc/config.site
2867else
2868  ac_site_file1=$ac_default_prefix/share/config.site
2869  ac_site_file2=$ac_default_prefix/etc/config.site
2870fi
2871for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2872do
2873  test "x$ac_site_file" = xNONE && continue
2874  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2875    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2876$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2877    sed 's/^/| /' "$ac_site_file" >&5
2878    . "$ac_site_file" \
2879      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2880$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2881as_fn_error $? "failed to load site script $ac_site_file
2882See \`config.log' for more details" "$LINENO" 5; }
2883  fi
2884done
2885
2886if test -r "$cache_file"; then
2887  # Some versions of bash will fail to source /dev/null (special files
2888  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2889  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2890    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2891$as_echo "$as_me: loading cache $cache_file" >&6;}
2892    case $cache_file in
2893      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2894      *)                      . "./$cache_file";;
2895    esac
2896  fi
2897else
2898  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2899$as_echo "$as_me: creating cache $cache_file" >&6;}
2900  >$cache_file
2901fi
2902
2903# Check that the precious variables saved in the cache have kept the same
2904# value.
2905ac_cache_corrupted=false
2906for ac_var in $ac_precious_vars; do
2907  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2908  eval ac_new_set=\$ac_env_${ac_var}_set
2909  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2910  eval ac_new_val=\$ac_env_${ac_var}_value
2911  case $ac_old_set,$ac_new_set in
2912    set,)
2913      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2914$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2915      ac_cache_corrupted=: ;;
2916    ,set)
2917      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2918$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2919      ac_cache_corrupted=: ;;
2920    ,);;
2921    *)
2922      if test "x$ac_old_val" != "x$ac_new_val"; then
2923	# differences in whitespace do not lead to failure.
2924	ac_old_val_w=`echo x $ac_old_val`
2925	ac_new_val_w=`echo x $ac_new_val`
2926	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2927	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2928$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2929	  ac_cache_corrupted=:
2930	else
2931	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2932$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2933	  eval $ac_var=\$ac_old_val
2934	fi
2935	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2936$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2937	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2938$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2939      fi;;
2940  esac
2941  # Pass precious variables to config.status.
2942  if test "$ac_new_set" = set; then
2943    case $ac_new_val in
2944    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2945    *) ac_arg=$ac_var=$ac_new_val ;;
2946    esac
2947    case " $ac_configure_args " in
2948      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2949      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2950    esac
2951  fi
2952done
2953if $ac_cache_corrupted; then
2954  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2955$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2956  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2957$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2958  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2959fi
2960## -------------------- ##
2961## Main body of script. ##
2962## -------------------- ##
2963
2964ac_ext=c
2965ac_cpp='$CPP $CPPFLAGS'
2966ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2967ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2968ac_compiler_gnu=$ac_cv_c_compiler_gnu
2969
2970
2971
2972ac_aux_dir=
2973for ac_dir in build-aux "$srcdir"/build-aux; do
2974  if test -f "$ac_dir/install-sh"; then
2975    ac_aux_dir=$ac_dir
2976    ac_install_sh="$ac_aux_dir/install-sh -c"
2977    break
2978  elif test -f "$ac_dir/install.sh"; then
2979    ac_aux_dir=$ac_dir
2980    ac_install_sh="$ac_aux_dir/install.sh -c"
2981    break
2982  elif test -f "$ac_dir/shtool"; then
2983    ac_aux_dir=$ac_dir
2984    ac_install_sh="$ac_aux_dir/shtool install -c"
2985    break
2986  fi
2987done
2988if test -z "$ac_aux_dir"; then
2989  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2990fi
2991
2992# These three variables are undocumented and unsupported,
2993# and are intended to be withdrawn in a future Autoconf release.
2994# They can cause serious problems if a builder's source tree is in a directory
2995# whose full name contains unusual characters.
2996ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2997ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2998ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2999
3000
3001# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3002
3003#
3004# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3005# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3006#
3007# This code is free software; you can redistribute it and/or modify it
3008# under the terms of the GNU General Public License version 2 only, as
3009# published by the Free Software Foundation.  Oracle designates this
3010# particular file as subject to the "Classpath" exception as provided
3011# by Oracle in the LICENSE file that accompanied this code.
3012#
3013# This code is distributed in the hope that it will be useful, but WITHOUT
3014# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3015# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3016# version 2 for more details (a copy is included in the LICENSE file that
3017# accompanied this code).
3018#
3019# You should have received a copy of the GNU General Public License version
3020# 2 along with this work; if not, write to the Free Software Foundation,
3021# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3022#
3023# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3024# or visit www.oracle.com if you need additional information or have any
3025# questions.
3026#
3027
3028#
3029# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3030#
3031# This program is free software; you can redistribute it and/or modify
3032# it under the terms of the GNU General Public License as published by
3033# the Free Software Foundation; either version 2 of the License, or
3034# (at your option) any later version.
3035#
3036# This program is distributed in the hope that it will be useful, but
3037# WITHOUT ANY WARRANTY; without even the implied warranty of
3038# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3039# General Public License for more details.
3040#
3041# You should have received a copy of the GNU General Public License
3042# along with this program; if not, write to the Free Software
3043# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3044#
3045# As a special exception to the GNU General Public License, if you
3046# distribute this file as part of a program that contains a
3047# configuration script generated by Autoconf, you may include it under
3048# the same distribution terms that you use for the rest of that program.
3049
3050# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3051# ----------------------------------
3052# PKG_PROG_PKG_CONFIG
3053
3054# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3055#
3056# Check to see whether a particular set of modules exists.  Similar
3057# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3058#
3059#
3060# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3061# this or PKG_CHECK_MODULES is called, or make sure to call
3062# PKG_CHECK_EXISTS manually
3063# --------------------------------------------------------------
3064
3065
3066
3067# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3068# ---------------------------------------------
3069# _PKG_CONFIG
3070
3071# _PKG_SHORT_ERRORS_SUPPORTED
3072# -----------------------------
3073# _PKG_SHORT_ERRORS_SUPPORTED
3074
3075
3076# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3077# [ACTION-IF-NOT-FOUND])
3078#
3079#
3080# Note that if there is a possibility the first call to
3081# PKG_CHECK_MODULES might not happen, you should be sure to include an
3082# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3083#
3084#
3085# --------------------------------------------------------------
3086# PKG_CHECK_MODULES
3087
3088
3089# Include these first...
3090#
3091# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3092# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3093#
3094# This code is free software; you can redistribute it and/or modify it
3095# under the terms of the GNU General Public License version 2 only, as
3096# published by the Free Software Foundation.  Oracle designates this
3097# particular file as subject to the "Classpath" exception as provided
3098# by Oracle in the LICENSE file that accompanied this code.
3099#
3100# This code is distributed in the hope that it will be useful, but WITHOUT
3101# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3102# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3103# version 2 for more details (a copy is included in the LICENSE file that
3104# accompanied this code).
3105#
3106# You should have received a copy of the GNU General Public License version
3107# 2 along with this work; if not, write to the Free Software Foundation,
3108# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3109#
3110# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3111# or visit www.oracle.com if you need additional information or have any
3112# questions.
3113#
3114
3115# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3116# If so, then append $1 to $2 \
3117# Also set JVM_ARG_OK to true/false depending on outcome.
3118
3119
3120# Appends a string to a path variable, only adding the : when needed.
3121
3122
3123# This will make sure the given variable points to a full and proper
3124# path. This means:
3125# 1) There will be no spaces in the path. On posix platforms,
3126#    spaces in the path will result in an error. On Windows,
3127#    the path will be rewritten using short-style to be space-free.
3128# 2) The path will be absolute, and it will be in unix-style (on
3129#     cygwin).
3130# $1: The name of the variable to fix
3131
3132
3133# This will make sure the given variable points to a executable
3134# with a full and proper path. This means:
3135# 1) There will be no spaces in the path. On posix platforms,
3136#    spaces in the path will result in an error. On Windows,
3137#    the path will be rewritten using short-style to be space-free.
3138# 2) The path will be absolute, and it will be in unix-style (on
3139#     cygwin).
3140# Any arguments given to the executable is preserved.
3141# If the input variable does not have a directory specification, then
3142# it need to be in the PATH.
3143# $1: The name of the variable to fix
3144
3145
3146
3147
3148# Register a --with argument but mark it as deprecated
3149# $1: The name of the with argument to deprecate, not including --with-
3150
3151
3152# Register a --enable argument but mark it as deprecated
3153# $1: The name of the with argument to deprecate, not including --enable-
3154# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3155
3156
3157
3158
3159# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3160# $1: variable to check
3161# $2: executable name to print in warning (optional)
3162
3163
3164# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3165# Arguments as AC_PATH_PROG:
3166# $1: variable to set
3167# $2: executable name to look for
3168
3169
3170# Setup the most fundamental tools that relies on not much else to set up,
3171# but is used by much of the early bootstrap code.
3172
3173
3174# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3175
3176
3177
3178
3179
3180
3181
3182#%%% Simple tools %%%
3183
3184# Check if we have found a usable version of make
3185# $1: the path to a potential make binary (or empty)
3186# $2: the description on how we found this
3187
3188
3189# Goes looking for a usable version of GNU make.
3190
3191
3192
3193
3194
3195
3196# Check if build directory is on local disk. If not possible to determine,
3197# we prefer to claim it's local.
3198# Argument 1: directory to test
3199# Argument 2: what to do if it is on local disk
3200# Argument 3: what to do otherwise (remote disk or failure)
3201
3202
3203# Check that source files have basic read permissions set. This might
3204# not be the case in cygwin in certain conditions.
3205
3206
3207
3208
3209#
3210# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3211# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3212#
3213# This code is free software; you can redistribute it and/or modify it
3214# under the terms of the GNU General Public License version 2 only, as
3215# published by the Free Software Foundation.  Oracle designates this
3216# particular file as subject to the "Classpath" exception as provided
3217# by Oracle in the LICENSE file that accompanied this code.
3218#
3219# This code is distributed in the hope that it will be useful, but WITHOUT
3220# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3221# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3222# version 2 for more details (a copy is included in the LICENSE file that
3223# accompanied this code).
3224#
3225# You should have received a copy of the GNU General Public License version
3226# 2 along with this work; if not, write to the Free Software Foundation,
3227# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3228#
3229# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3230# or visit www.oracle.com if you need additional information or have any
3231# questions.
3232#
3233
3234
3235
3236
3237
3238# Helper function which possibly converts a path using DOS-style short mode.
3239# If so, the updated path is stored in $new_path.
3240# $1: The path to check
3241
3242
3243# Helper function which possibly converts a path using DOS-style short mode.
3244# If so, the updated path is stored in $new_path.
3245# $1: The path to check
3246
3247
3248# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3249# and could probably be heavily simplified. However, all changes in this
3250# area tend to need lot of testing in different scenarios, and in lack of
3251# proper unit testing, cleaning this up has not been deemed worth the effort
3252# at the moment.
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3263
3264
3265
3266
3267#
3268# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3269# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3270#
3271# This code is free software; you can redistribute it and/or modify it
3272# under the terms of the GNU General Public License version 2 only, as
3273# published by the Free Software Foundation.  Oracle designates this
3274# particular file as subject to the "Classpath" exception as provided
3275# by Oracle in the LICENSE file that accompanied this code.
3276#
3277# This code is distributed in the hope that it will be useful, but WITHOUT
3278# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3279# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3280# version 2 for more details (a copy is included in the LICENSE file that
3281# accompanied this code).
3282#
3283# You should have received a copy of the GNU General Public License version
3284# 2 along with this work; if not, write to the Free Software Foundation,
3285# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3286#
3287# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3288# or visit www.oracle.com if you need additional information or have any
3289# questions.
3290#
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302# ... then the rest
3303#
3304# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3305# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3306#
3307# This code is free software; you can redistribute it and/or modify it
3308# under the terms of the GNU General Public License version 2 only, as
3309# published by the Free Software Foundation.  Oracle designates this
3310# particular file as subject to the "Classpath" exception as provided
3311# by Oracle in the LICENSE file that accompanied this code.
3312#
3313# This code is distributed in the hope that it will be useful, but WITHOUT
3314# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3315# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3316# version 2 for more details (a copy is included in the LICENSE file that
3317# accompanied this code).
3318#
3319# You should have received a copy of the GNU General Public License version
3320# 2 along with this work; if not, write to the Free Software Foundation,
3321# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3322#
3323# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3324# or visit www.oracle.com if you need additional information or have any
3325# questions.
3326#
3327
3328# Execute the check given as argument, and verify the result
3329# If the Boot JDK was previously found, do nothing
3330# $1 A command line (typically autoconf macro) to execute
3331
3332
3333# Test: Is bootjdk explicitely set by command line arguments?
3334
3335
3336# Test: Is bootjdk available from builddeps?
3337
3338
3339# Test: Is $JAVA_HOME set?
3340
3341
3342# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3343
3344
3345# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3346
3347
3348# Look for a jdk in the given path. If there are multiple, try to select the newest.
3349# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3350# $1 = Path to directory containing jdk installations.
3351# $2 = String to append to the found JDK directory to get the proper JDK home
3352
3353
3354# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3355# environmental variable as base for where to look.
3356# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3357
3358
3359# Test: Is there a JDK installed in default, well-known locations?
3360
3361
3362# Check that a command-line tool in the Boot JDK is correct
3363# $1 = name of variable to assign
3364# $2 = name of binary
3365
3366
3367###############################################################################
3368#
3369# We need a Boot JDK to bootstrap the build.
3370#
3371
3372
3373
3374
3375
3376#
3377# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3378# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3379#
3380# This code is free software; you can redistribute it and/or modify it
3381# under the terms of the GNU General Public License version 2 only, as
3382# published by the Free Software Foundation.  Oracle designates this
3383# particular file as subject to the "Classpath" exception as provided
3384# by Oracle in the LICENSE file that accompanied this code.
3385#
3386# This code is distributed in the hope that it will be useful, but WITHOUT
3387# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3388# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3389# version 2 for more details (a copy is included in the LICENSE file that
3390# accompanied this code).
3391#
3392# You should have received a copy of the GNU General Public License version
3393# 2 along with this work; if not, write to the Free Software Foundation,
3394# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3395#
3396# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3397# or visit www.oracle.com if you need additional information or have any
3398# questions.
3399#
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420#
3421# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3422# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3423#
3424# This code is free software; you can redistribute it and/or modify it
3425# under the terms of the GNU General Public License version 2 only, as
3426# published by the Free Software Foundation.  Oracle designates this
3427# particular file as subject to the "Classpath" exception as provided
3428# by Oracle in the LICENSE file that accompanied this code.
3429#
3430# This code is distributed in the hope that it will be useful, but WITHOUT
3431# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3432# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3433# version 2 for more details (a copy is included in the LICENSE file that
3434# accompanied this code).
3435#
3436# You should have received a copy of the GNU General Public License version
3437# 2 along with this work; if not, write to the Free Software Foundation,
3438# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3439#
3440# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3441# or visit www.oracle.com if you need additional information or have any
3442# questions.
3443#
3444
3445
3446
3447
3448
3449cygwin_help() {
3450  case $1 in
3451    unzip)
3452      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3453      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3454      ;;
3455    zip)
3456      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3457      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3458      ;;
3459    make)
3460      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3461      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3462      ;;
3463    freetype2)
3464      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
3465        HELP_MSG="To install freetype, run:
3466wget \"http://gnuwin32.sourceforge.net/downlinks/freetype.php\" -O /tmp/freetype-setup.exe
3467chmod +x /tmp/freetype-setup.exe
3468/tmp/freetype-setup.exe
3469Follow GUI prompts, and install to default directory \"C:\Program Files (x86)\GnuWin32\".
3470After installation, locate lib/libfreetype.dll.a and make a copy with the name freetype.dll."
3471      else
3472        HELP_MSG="You need to build a 64-bit version of freetype.
3473This is not readily available.
3474You can find source code and build instructions on
3475http://www.freetype.org/
3476If you put the resulting build in \"C:\Program Files\GnuWin32\", it will be found automatically."
3477      fi
3478      ;;
3479    * )
3480      break ;;
3481  esac
3482}
3483
3484msys_help() {
3485  PKGHANDLER_COMMAND=""
3486}
3487
3488apt_help() {
3489  case $1 in
3490    devkit)
3491      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3492    openjdk)
3493      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3494    alsa)
3495      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3496    cups)
3497      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3498    freetype2)
3499      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3500    pulse)
3501      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3502    x11)
3503      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3504    ccache)
3505      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3506    * )
3507      break ;;
3508  esac
3509}
3510
3511yum_help() {
3512  case $1 in
3513    devkit)
3514      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3515    openjdk)
3516      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3517    alsa)
3518      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3519    cups)
3520      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3521    freetype2)
3522      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3523    pulse)
3524      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3525    x11)
3526      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
3527    ccache)
3528      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3529    * )
3530      break ;;
3531  esac
3532}
3533
3534port_help() {
3535  PKGHANDLER_COMMAND=""
3536}
3537
3538pkgutil_help() {
3539  PKGHANDLER_COMMAND=""
3540}
3541
3542pkgadd_help() {
3543  PKGHANDLER_COMMAND=""
3544}
3545
3546
3547
3548#
3549# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3550# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3551#
3552# This code is free software; you can redistribute it and/or modify it
3553# under the terms of the GNU General Public License version 2 only, as
3554# published by the Free Software Foundation.  Oracle designates this
3555# particular file as subject to the "Classpath" exception as provided
3556# by Oracle in the LICENSE file that accompanied this code.
3557#
3558# This code is distributed in the hope that it will be useful, but WITHOUT
3559# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3560# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3561# version 2 for more details (a copy is included in the LICENSE file that
3562# accompanied this code).
3563#
3564# You should have received a copy of the GNU General Public License version
3565# 2 along with this work; if not, write to the Free Software Foundation,
3566# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3567#
3568# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3569# or visit www.oracle.com if you need additional information or have any
3570# questions.
3571#
3572
3573
3574
3575
3576
3577
3578
3579
3580###############################################################################
3581#
3582# Should we build only OpenJDK even if closed sources are present?
3583#
3584
3585
3586
3587
3588###############################################################################
3589#
3590# Setup version numbers
3591#
3592
3593
3594
3595
3596
3597
3598# Support for customization of the build process. Some build files
3599# will include counterparts from this location, if they exist. This allows
3600# for a degree of customization of the build targets and the rules/recipes
3601# to create them
3602
3603# Check whether --with-custom-make-dir was given.
3604if test "${with_custom_make_dir+set}" = set; then :
3605  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3606fi
3607
3608
3609
3610#
3611# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3612# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3613#
3614# This code is free software; you can redistribute it and/or modify it
3615# under the terms of the GNU General Public License version 2 only, as
3616# published by the Free Software Foundation.  Oracle designates this
3617# particular file as subject to the "Classpath" exception as provided
3618# by Oracle in the LICENSE file that accompanied this code.
3619#
3620# This code is distributed in the hope that it will be useful, but WITHOUT
3621# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3622# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3623# version 2 for more details (a copy is included in the LICENSE file that
3624# accompanied this code).
3625#
3626# You should have received a copy of the GNU General Public License version
3627# 2 along with this work; if not, write to the Free Software Foundation,
3628# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3629#
3630# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3631# or visit www.oracle.com if you need additional information or have any
3632# questions.
3633#
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649#
3650# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3651# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3652#
3653# This code is free software; you can redistribute it and/or modify it
3654# under the terms of the GNU General Public License version 2 only, as
3655# published by the Free Software Foundation.  Oracle designates this
3656# particular file as subject to the "Classpath" exception as provided
3657# by Oracle in the LICENSE file that accompanied this code.
3658#
3659# This code is distributed in the hope that it will be useful, but WITHOUT
3660# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3661# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3662# version 2 for more details (a copy is included in the LICENSE file that
3663# accompanied this code).
3664#
3665# You should have received a copy of the GNU General Public License version
3666# 2 along with this work; if not, write to the Free Software Foundation,
3667# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3668#
3669# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3670# or visit www.oracle.com if you need additional information or have any
3671# questions.
3672#
3673
3674# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3675# Converts autoconf style CPU name to OpenJDK style, into
3676# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3677
3678
3679# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3680# Converts autoconf style OS name to OpenJDK style, into
3681# VAR_OS and VAR_OS_API.
3682
3683
3684# Expects $host_os $host_cpu $build_os and $build_cpu
3685# and $with_target_bits to have been setup!
3686#
3687# Translate the standard triplet(quadruplet) definition
3688# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3689# OPENJDK_BUILD_OS, etc.
3690
3691
3692# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3693# accordingly. Must be done after setting up build and target system, but before
3694# doing anything else with these values.
3695
3696
3697# Setup the legacy variables, for controlling the old makefiles.
3698#
3699
3700
3701
3702
3703#%%% Build and target systems %%%
3704
3705
3706
3707
3708# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3709# Add -mX to various FLAGS variables.
3710
3711
3712
3713
3714
3715
3716#
3717# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3718# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3719#
3720# This code is free software; you can redistribute it and/or modify it
3721# under the terms of the GNU General Public License version 2 only, as
3722# published by the Free Software Foundation.  Oracle designates this
3723# particular file as subject to the "Classpath" exception as provided
3724# by Oracle in the LICENSE file that accompanied this code.
3725#
3726# This code is distributed in the hope that it will be useful, but WITHOUT
3727# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3728# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3729# version 2 for more details (a copy is included in the LICENSE file that
3730# accompanied this code).
3731#
3732# You should have received a copy of the GNU General Public License version
3733# 2 along with this work; if not, write to the Free Software Foundation,
3734# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3735#
3736# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3737# or visit www.oracle.com if you need additional information or have any
3738# questions.
3739#
3740
3741
3742
3743
3744
3745
3746
3747
3748#
3749# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3750# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3751#
3752# This code is free software; you can redistribute it and/or modify it
3753# under the terms of the GNU General Public License version 2 only, as
3754# published by the Free Software Foundation.  Oracle designates this
3755# particular file as subject to the "Classpath" exception as provided
3756# by Oracle in the LICENSE file that accompanied this code.
3757#
3758# This code is distributed in the hope that it will be useful, but WITHOUT
3759# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3760# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3761# version 2 for more details (a copy is included in the LICENSE file that
3762# accompanied this code).
3763#
3764# You should have received a copy of the GNU General Public License version
3765# 2 along with this work; if not, write to the Free Software Foundation,
3766# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3767#
3768# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3769# or visit www.oracle.com if you need additional information or have any
3770# questions.
3771#
3772
3773# $1 = compiler to test (CC or CXX)
3774# $2 = human readable name of compiler (C or C++)
3775
3776
3777
3778
3779
3780# $1 = compiler to test (CC or CXX)
3781# $2 = human readable name of compiler (C or C++)
3782# $3 = list of compiler names to search for
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796# TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3797#                                   [RUN-IF-FALSE])
3798# ------------------------------------------------------------
3799# Check that the c and c++ compilers support an argument
3800
3801
3802
3803
3804# Setup the JTREG paths
3805
3806
3807#
3808# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3809# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3810#
3811# This code is free software; you can redistribute it and/or modify it
3812# under the terms of the GNU General Public License version 2 only, as
3813# published by the Free Software Foundation.  Oracle designates this
3814# particular file as subject to the "Classpath" exception as provided
3815# by Oracle in the LICENSE file that accompanied this code.
3816#
3817# This code is distributed in the hope that it will be useful, but WITHOUT
3818# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3819# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3820# version 2 for more details (a copy is included in the LICENSE file that
3821# accompanied this code).
3822#
3823# You should have received a copy of the GNU General Public License version
3824# 2 along with this work; if not, write to the Free Software Foundation,
3825# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3826#
3827# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3828# or visit www.oracle.com if you need additional information or have any
3829# questions.
3830#
3831
3832
3833
3834
3835
3836
3837
3838# Check if the VS env variables were setup prior to running configure.
3839# If not, then find vcvarsall.bat and run it automatically, and integrate
3840# the set env variables into the spec file.
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851# This line needs to be here, verbatim, after all includes and the dummy hook
3852# definitions. It is replaced with custom functionality when building
3853# custom sources.
3854#CUSTOM_AUTOCONF_INCLUDE
3855
3856# Do not change or remove the following line, it is needed for consistency checks:
3857DATE_WHEN_GENERATED=1382437436
3858
3859###############################################################################
3860#
3861# Initialization / Boot-strapping
3862#
3863# The bootstrapping process needs to solve the "chicken or the egg" problem,
3864# thus it jumps back and forth, each time gaining something needed later on.
3865#
3866###############################################################################
3867
3868# Basic initialization that must happen first of all
3869
3870  # Save the original command line. This is passed to us by the wrapper configure script.
3871
3872  DATE_WHEN_CONFIGURED=`LANG=C date`
3873
3874  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3875$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3876  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3877$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3878
3879
3880
3881  # Start with tools that do not need have cross compilation support
3882  # and can be expected to be found in the default PATH. These tools are
3883  # used by configure. Nor are these tools expected to be found in the
3884  # devkit from the builddeps server either, since they are
3885  # needed to download the devkit.
3886
3887  # First are all the simple required tools.
3888
3889  for ac_prog in basename
3890do
3891  # Extract the first word of "$ac_prog", so it can be a program name with args.
3892set dummy $ac_prog; ac_word=$2
3893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3894$as_echo_n "checking for $ac_word... " >&6; }
3895if ${ac_cv_path_BASENAME+:} false; then :
3896  $as_echo_n "(cached) " >&6
3897else
3898  case $BASENAME in
3899  [\\/]* | ?:[\\/]*)
3900  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3901  ;;
3902  *)
3903  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3904for as_dir in $PATH
3905do
3906  IFS=$as_save_IFS
3907  test -z "$as_dir" && as_dir=.
3908    for ac_exec_ext in '' $ac_executable_extensions; do
3909  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3910    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3911    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3912    break 2
3913  fi
3914done
3915  done
3916IFS=$as_save_IFS
3917
3918  ;;
3919esac
3920fi
3921BASENAME=$ac_cv_path_BASENAME
3922if test -n "$BASENAME"; then
3923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3924$as_echo "$BASENAME" >&6; }
3925else
3926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3927$as_echo "no" >&6; }
3928fi
3929
3930
3931  test -n "$BASENAME" && break
3932done
3933
3934
3935  if test "x$BASENAME" = x; then
3936    if test "xbasename" = x; then
3937      PROG_NAME=basename
3938    else
3939      PROG_NAME=basename
3940    fi
3941    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3942$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3943    as_fn_error $? "Cannot continue" "$LINENO" 5
3944  fi
3945
3946
3947
3948  for ac_prog in bash
3949do
3950  # Extract the first word of "$ac_prog", so it can be a program name with args.
3951set dummy $ac_prog; ac_word=$2
3952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3953$as_echo_n "checking for $ac_word... " >&6; }
3954if ${ac_cv_path_BASH+:} false; then :
3955  $as_echo_n "(cached) " >&6
3956else
3957  case $BASH in
3958  [\\/]* | ?:[\\/]*)
3959  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3960  ;;
3961  *)
3962  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3963for as_dir in $PATH
3964do
3965  IFS=$as_save_IFS
3966  test -z "$as_dir" && as_dir=.
3967    for ac_exec_ext in '' $ac_executable_extensions; do
3968  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3969    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3970    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3971    break 2
3972  fi
3973done
3974  done
3975IFS=$as_save_IFS
3976
3977  ;;
3978esac
3979fi
3980BASH=$ac_cv_path_BASH
3981if test -n "$BASH"; then
3982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3983$as_echo "$BASH" >&6; }
3984else
3985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3986$as_echo "no" >&6; }
3987fi
3988
3989
3990  test -n "$BASH" && break
3991done
3992
3993
3994  if test "x$BASH" = x; then
3995    if test "xbash" = x; then
3996      PROG_NAME=bash
3997    else
3998      PROG_NAME=bash
3999    fi
4000    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4001$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4002    as_fn_error $? "Cannot continue" "$LINENO" 5
4003  fi
4004
4005
4006
4007  for ac_prog in cat
4008do
4009  # Extract the first word of "$ac_prog", so it can be a program name with args.
4010set dummy $ac_prog; ac_word=$2
4011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4012$as_echo_n "checking for $ac_word... " >&6; }
4013if ${ac_cv_path_CAT+:} false; then :
4014  $as_echo_n "(cached) " >&6
4015else
4016  case $CAT in
4017  [\\/]* | ?:[\\/]*)
4018  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4019  ;;
4020  *)
4021  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4022for as_dir in $PATH
4023do
4024  IFS=$as_save_IFS
4025  test -z "$as_dir" && as_dir=.
4026    for ac_exec_ext in '' $ac_executable_extensions; do
4027  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4028    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4029    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4030    break 2
4031  fi
4032done
4033  done
4034IFS=$as_save_IFS
4035
4036  ;;
4037esac
4038fi
4039CAT=$ac_cv_path_CAT
4040if test -n "$CAT"; then
4041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4042$as_echo "$CAT" >&6; }
4043else
4044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4045$as_echo "no" >&6; }
4046fi
4047
4048
4049  test -n "$CAT" && break
4050done
4051
4052
4053  if test "x$CAT" = x; then
4054    if test "xcat" = x; then
4055      PROG_NAME=cat
4056    else
4057      PROG_NAME=cat
4058    fi
4059    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4060$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4061    as_fn_error $? "Cannot continue" "$LINENO" 5
4062  fi
4063
4064
4065
4066  for ac_prog in chmod
4067do
4068  # Extract the first word of "$ac_prog", so it can be a program name with args.
4069set dummy $ac_prog; ac_word=$2
4070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4071$as_echo_n "checking for $ac_word... " >&6; }
4072if ${ac_cv_path_CHMOD+:} false; then :
4073  $as_echo_n "(cached) " >&6
4074else
4075  case $CHMOD in
4076  [\\/]* | ?:[\\/]*)
4077  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4078  ;;
4079  *)
4080  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4081for as_dir in $PATH
4082do
4083  IFS=$as_save_IFS
4084  test -z "$as_dir" && as_dir=.
4085    for ac_exec_ext in '' $ac_executable_extensions; do
4086  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4087    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4088    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4089    break 2
4090  fi
4091done
4092  done
4093IFS=$as_save_IFS
4094
4095  ;;
4096esac
4097fi
4098CHMOD=$ac_cv_path_CHMOD
4099if test -n "$CHMOD"; then
4100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4101$as_echo "$CHMOD" >&6; }
4102else
4103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4104$as_echo "no" >&6; }
4105fi
4106
4107
4108  test -n "$CHMOD" && break
4109done
4110
4111
4112  if test "x$CHMOD" = x; then
4113    if test "xchmod" = x; then
4114      PROG_NAME=chmod
4115    else
4116      PROG_NAME=chmod
4117    fi
4118    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4119$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4120    as_fn_error $? "Cannot continue" "$LINENO" 5
4121  fi
4122
4123
4124
4125  for ac_prog in cmp
4126do
4127  # Extract the first word of "$ac_prog", so it can be a program name with args.
4128set dummy $ac_prog; ac_word=$2
4129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4130$as_echo_n "checking for $ac_word... " >&6; }
4131if ${ac_cv_path_CMP+:} false; then :
4132  $as_echo_n "(cached) " >&6
4133else
4134  case $CMP in
4135  [\\/]* | ?:[\\/]*)
4136  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4137  ;;
4138  *)
4139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4140for as_dir in $PATH
4141do
4142  IFS=$as_save_IFS
4143  test -z "$as_dir" && as_dir=.
4144    for ac_exec_ext in '' $ac_executable_extensions; do
4145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4146    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4148    break 2
4149  fi
4150done
4151  done
4152IFS=$as_save_IFS
4153
4154  ;;
4155esac
4156fi
4157CMP=$ac_cv_path_CMP
4158if test -n "$CMP"; then
4159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4160$as_echo "$CMP" >&6; }
4161else
4162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4163$as_echo "no" >&6; }
4164fi
4165
4166
4167  test -n "$CMP" && break
4168done
4169
4170
4171  if test "x$CMP" = x; then
4172    if test "xcmp" = x; then
4173      PROG_NAME=cmp
4174    else
4175      PROG_NAME=cmp
4176    fi
4177    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4178$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4179    as_fn_error $? "Cannot continue" "$LINENO" 5
4180  fi
4181
4182
4183
4184  for ac_prog in comm
4185do
4186  # Extract the first word of "$ac_prog", so it can be a program name with args.
4187set dummy $ac_prog; ac_word=$2
4188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4189$as_echo_n "checking for $ac_word... " >&6; }
4190if ${ac_cv_path_COMM+:} false; then :
4191  $as_echo_n "(cached) " >&6
4192else
4193  case $COMM in
4194  [\\/]* | ?:[\\/]*)
4195  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4196  ;;
4197  *)
4198  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4199for as_dir in $PATH
4200do
4201  IFS=$as_save_IFS
4202  test -z "$as_dir" && as_dir=.
4203    for ac_exec_ext in '' $ac_executable_extensions; do
4204  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4205    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4206    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4207    break 2
4208  fi
4209done
4210  done
4211IFS=$as_save_IFS
4212
4213  ;;
4214esac
4215fi
4216COMM=$ac_cv_path_COMM
4217if test -n "$COMM"; then
4218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4219$as_echo "$COMM" >&6; }
4220else
4221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4222$as_echo "no" >&6; }
4223fi
4224
4225
4226  test -n "$COMM" && break
4227done
4228
4229
4230  if test "x$COMM" = x; then
4231    if test "xcomm" = x; then
4232      PROG_NAME=comm
4233    else
4234      PROG_NAME=comm
4235    fi
4236    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4237$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4238    as_fn_error $? "Cannot continue" "$LINENO" 5
4239  fi
4240
4241
4242
4243  for ac_prog in cp
4244do
4245  # Extract the first word of "$ac_prog", so it can be a program name with args.
4246set dummy $ac_prog; ac_word=$2
4247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4248$as_echo_n "checking for $ac_word... " >&6; }
4249if ${ac_cv_path_CP+:} false; then :
4250  $as_echo_n "(cached) " >&6
4251else
4252  case $CP in
4253  [\\/]* | ?:[\\/]*)
4254  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4255  ;;
4256  *)
4257  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4258for as_dir in $PATH
4259do
4260  IFS=$as_save_IFS
4261  test -z "$as_dir" && as_dir=.
4262    for ac_exec_ext in '' $ac_executable_extensions; do
4263  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4264    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4265    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4266    break 2
4267  fi
4268done
4269  done
4270IFS=$as_save_IFS
4271
4272  ;;
4273esac
4274fi
4275CP=$ac_cv_path_CP
4276if test -n "$CP"; then
4277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4278$as_echo "$CP" >&6; }
4279else
4280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4281$as_echo "no" >&6; }
4282fi
4283
4284
4285  test -n "$CP" && break
4286done
4287
4288
4289  if test "x$CP" = x; then
4290    if test "xcp" = x; then
4291      PROG_NAME=cp
4292    else
4293      PROG_NAME=cp
4294    fi
4295    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4296$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4297    as_fn_error $? "Cannot continue" "$LINENO" 5
4298  fi
4299
4300
4301
4302  for ac_prog in cpio
4303do
4304  # Extract the first word of "$ac_prog", so it can be a program name with args.
4305set dummy $ac_prog; ac_word=$2
4306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4307$as_echo_n "checking for $ac_word... " >&6; }
4308if ${ac_cv_path_CPIO+:} false; then :
4309  $as_echo_n "(cached) " >&6
4310else
4311  case $CPIO in
4312  [\\/]* | ?:[\\/]*)
4313  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4314  ;;
4315  *)
4316  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4317for as_dir in $PATH
4318do
4319  IFS=$as_save_IFS
4320  test -z "$as_dir" && as_dir=.
4321    for ac_exec_ext in '' $ac_executable_extensions; do
4322  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4323    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4324    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4325    break 2
4326  fi
4327done
4328  done
4329IFS=$as_save_IFS
4330
4331  ;;
4332esac
4333fi
4334CPIO=$ac_cv_path_CPIO
4335if test -n "$CPIO"; then
4336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4337$as_echo "$CPIO" >&6; }
4338else
4339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4340$as_echo "no" >&6; }
4341fi
4342
4343
4344  test -n "$CPIO" && break
4345done
4346
4347
4348  if test "x$CPIO" = x; then
4349    if test "xcpio" = x; then
4350      PROG_NAME=cpio
4351    else
4352      PROG_NAME=cpio
4353    fi
4354    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4355$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4356    as_fn_error $? "Cannot continue" "$LINENO" 5
4357  fi
4358
4359
4360
4361  for ac_prog in cut
4362do
4363  # Extract the first word of "$ac_prog", so it can be a program name with args.
4364set dummy $ac_prog; ac_word=$2
4365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4366$as_echo_n "checking for $ac_word... " >&6; }
4367if ${ac_cv_path_CUT+:} false; then :
4368  $as_echo_n "(cached) " >&6
4369else
4370  case $CUT in
4371  [\\/]* | ?:[\\/]*)
4372  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4373  ;;
4374  *)
4375  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4376for as_dir in $PATH
4377do
4378  IFS=$as_save_IFS
4379  test -z "$as_dir" && as_dir=.
4380    for ac_exec_ext in '' $ac_executable_extensions; do
4381  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4382    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4383    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4384    break 2
4385  fi
4386done
4387  done
4388IFS=$as_save_IFS
4389
4390  ;;
4391esac
4392fi
4393CUT=$ac_cv_path_CUT
4394if test -n "$CUT"; then
4395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4396$as_echo "$CUT" >&6; }
4397else
4398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4399$as_echo "no" >&6; }
4400fi
4401
4402
4403  test -n "$CUT" && break
4404done
4405
4406
4407  if test "x$CUT" = x; then
4408    if test "xcut" = x; then
4409      PROG_NAME=cut
4410    else
4411      PROG_NAME=cut
4412    fi
4413    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4414$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4415    as_fn_error $? "Cannot continue" "$LINENO" 5
4416  fi
4417
4418
4419
4420  for ac_prog in date
4421do
4422  # Extract the first word of "$ac_prog", so it can be a program name with args.
4423set dummy $ac_prog; ac_word=$2
4424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4425$as_echo_n "checking for $ac_word... " >&6; }
4426if ${ac_cv_path_DATE+:} false; then :
4427  $as_echo_n "(cached) " >&6
4428else
4429  case $DATE in
4430  [\\/]* | ?:[\\/]*)
4431  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4432  ;;
4433  *)
4434  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4435for as_dir in $PATH
4436do
4437  IFS=$as_save_IFS
4438  test -z "$as_dir" && as_dir=.
4439    for ac_exec_ext in '' $ac_executable_extensions; do
4440  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4441    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4442    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4443    break 2
4444  fi
4445done
4446  done
4447IFS=$as_save_IFS
4448
4449  ;;
4450esac
4451fi
4452DATE=$ac_cv_path_DATE
4453if test -n "$DATE"; then
4454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4455$as_echo "$DATE" >&6; }
4456else
4457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4458$as_echo "no" >&6; }
4459fi
4460
4461
4462  test -n "$DATE" && break
4463done
4464
4465
4466  if test "x$DATE" = x; then
4467    if test "xdate" = x; then
4468      PROG_NAME=date
4469    else
4470      PROG_NAME=date
4471    fi
4472    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4473$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4474    as_fn_error $? "Cannot continue" "$LINENO" 5
4475  fi
4476
4477
4478
4479  for ac_prog in gdiff diff
4480do
4481  # Extract the first word of "$ac_prog", so it can be a program name with args.
4482set dummy $ac_prog; ac_word=$2
4483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4484$as_echo_n "checking for $ac_word... " >&6; }
4485if ${ac_cv_path_DIFF+:} false; then :
4486  $as_echo_n "(cached) " >&6
4487else
4488  case $DIFF in
4489  [\\/]* | ?:[\\/]*)
4490  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4491  ;;
4492  *)
4493  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4494for as_dir in $PATH
4495do
4496  IFS=$as_save_IFS
4497  test -z "$as_dir" && as_dir=.
4498    for ac_exec_ext in '' $ac_executable_extensions; do
4499  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4500    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4501    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4502    break 2
4503  fi
4504done
4505  done
4506IFS=$as_save_IFS
4507
4508  ;;
4509esac
4510fi
4511DIFF=$ac_cv_path_DIFF
4512if test -n "$DIFF"; then
4513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4514$as_echo "$DIFF" >&6; }
4515else
4516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4517$as_echo "no" >&6; }
4518fi
4519
4520
4521  test -n "$DIFF" && break
4522done
4523
4524
4525  if test "x$DIFF" = x; then
4526    if test "xgdiff diff" = x; then
4527      PROG_NAME=diff
4528    else
4529      PROG_NAME=gdiff diff
4530    fi
4531    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4532$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4533    as_fn_error $? "Cannot continue" "$LINENO" 5
4534  fi
4535
4536
4537
4538  for ac_prog in dirname
4539do
4540  # Extract the first word of "$ac_prog", so it can be a program name with args.
4541set dummy $ac_prog; ac_word=$2
4542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4543$as_echo_n "checking for $ac_word... " >&6; }
4544if ${ac_cv_path_DIRNAME+:} false; then :
4545  $as_echo_n "(cached) " >&6
4546else
4547  case $DIRNAME in
4548  [\\/]* | ?:[\\/]*)
4549  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4550  ;;
4551  *)
4552  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4553for as_dir in $PATH
4554do
4555  IFS=$as_save_IFS
4556  test -z "$as_dir" && as_dir=.
4557    for ac_exec_ext in '' $ac_executable_extensions; do
4558  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4559    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4561    break 2
4562  fi
4563done
4564  done
4565IFS=$as_save_IFS
4566
4567  ;;
4568esac
4569fi
4570DIRNAME=$ac_cv_path_DIRNAME
4571if test -n "$DIRNAME"; then
4572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4573$as_echo "$DIRNAME" >&6; }
4574else
4575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4576$as_echo "no" >&6; }
4577fi
4578
4579
4580  test -n "$DIRNAME" && break
4581done
4582
4583
4584  if test "x$DIRNAME" = x; then
4585    if test "xdirname" = x; then
4586      PROG_NAME=dirname
4587    else
4588      PROG_NAME=dirname
4589    fi
4590    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4591$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4592    as_fn_error $? "Cannot continue" "$LINENO" 5
4593  fi
4594
4595
4596
4597  for ac_prog in echo
4598do
4599  # Extract the first word of "$ac_prog", so it can be a program name with args.
4600set dummy $ac_prog; ac_word=$2
4601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4602$as_echo_n "checking for $ac_word... " >&6; }
4603if ${ac_cv_path_ECHO+:} false; then :
4604  $as_echo_n "(cached) " >&6
4605else
4606  case $ECHO in
4607  [\\/]* | ?:[\\/]*)
4608  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4609  ;;
4610  *)
4611  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4612for as_dir in $PATH
4613do
4614  IFS=$as_save_IFS
4615  test -z "$as_dir" && as_dir=.
4616    for ac_exec_ext in '' $ac_executable_extensions; do
4617  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4618    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4619    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4620    break 2
4621  fi
4622done
4623  done
4624IFS=$as_save_IFS
4625
4626  ;;
4627esac
4628fi
4629ECHO=$ac_cv_path_ECHO
4630if test -n "$ECHO"; then
4631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4632$as_echo "$ECHO" >&6; }
4633else
4634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4635$as_echo "no" >&6; }
4636fi
4637
4638
4639  test -n "$ECHO" && break
4640done
4641
4642
4643  if test "x$ECHO" = x; then
4644    if test "xecho" = x; then
4645      PROG_NAME=echo
4646    else
4647      PROG_NAME=echo
4648    fi
4649    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4650$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4651    as_fn_error $? "Cannot continue" "$LINENO" 5
4652  fi
4653
4654
4655
4656  for ac_prog in expr
4657do
4658  # Extract the first word of "$ac_prog", so it can be a program name with args.
4659set dummy $ac_prog; ac_word=$2
4660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4661$as_echo_n "checking for $ac_word... " >&6; }
4662if ${ac_cv_path_EXPR+:} false; then :
4663  $as_echo_n "(cached) " >&6
4664else
4665  case $EXPR in
4666  [\\/]* | ?:[\\/]*)
4667  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4668  ;;
4669  *)
4670  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4671for as_dir in $PATH
4672do
4673  IFS=$as_save_IFS
4674  test -z "$as_dir" && as_dir=.
4675    for ac_exec_ext in '' $ac_executable_extensions; do
4676  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4677    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4678    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4679    break 2
4680  fi
4681done
4682  done
4683IFS=$as_save_IFS
4684
4685  ;;
4686esac
4687fi
4688EXPR=$ac_cv_path_EXPR
4689if test -n "$EXPR"; then
4690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4691$as_echo "$EXPR" >&6; }
4692else
4693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4694$as_echo "no" >&6; }
4695fi
4696
4697
4698  test -n "$EXPR" && break
4699done
4700
4701
4702  if test "x$EXPR" = x; then
4703    if test "xexpr" = x; then
4704      PROG_NAME=expr
4705    else
4706      PROG_NAME=expr
4707    fi
4708    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4709$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4710    as_fn_error $? "Cannot continue" "$LINENO" 5
4711  fi
4712
4713
4714
4715  for ac_prog in file
4716do
4717  # Extract the first word of "$ac_prog", so it can be a program name with args.
4718set dummy $ac_prog; ac_word=$2
4719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4720$as_echo_n "checking for $ac_word... " >&6; }
4721if ${ac_cv_path_FILE+:} false; then :
4722  $as_echo_n "(cached) " >&6
4723else
4724  case $FILE in
4725  [\\/]* | ?:[\\/]*)
4726  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4727  ;;
4728  *)
4729  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4730for as_dir in $PATH
4731do
4732  IFS=$as_save_IFS
4733  test -z "$as_dir" && as_dir=.
4734    for ac_exec_ext in '' $ac_executable_extensions; do
4735  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4736    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4737    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4738    break 2
4739  fi
4740done
4741  done
4742IFS=$as_save_IFS
4743
4744  ;;
4745esac
4746fi
4747FILE=$ac_cv_path_FILE
4748if test -n "$FILE"; then
4749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4750$as_echo "$FILE" >&6; }
4751else
4752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4753$as_echo "no" >&6; }
4754fi
4755
4756
4757  test -n "$FILE" && break
4758done
4759
4760
4761  if test "x$FILE" = x; then
4762    if test "xfile" = x; then
4763      PROG_NAME=file
4764    else
4765      PROG_NAME=file
4766    fi
4767    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4768$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4769    as_fn_error $? "Cannot continue" "$LINENO" 5
4770  fi
4771
4772
4773
4774  for ac_prog in find
4775do
4776  # Extract the first word of "$ac_prog", so it can be a program name with args.
4777set dummy $ac_prog; ac_word=$2
4778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4779$as_echo_n "checking for $ac_word... " >&6; }
4780if ${ac_cv_path_FIND+:} false; then :
4781  $as_echo_n "(cached) " >&6
4782else
4783  case $FIND in
4784  [\\/]* | ?:[\\/]*)
4785  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4786  ;;
4787  *)
4788  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4789for as_dir in $PATH
4790do
4791  IFS=$as_save_IFS
4792  test -z "$as_dir" && as_dir=.
4793    for ac_exec_ext in '' $ac_executable_extensions; do
4794  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4795    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4796    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4797    break 2
4798  fi
4799done
4800  done
4801IFS=$as_save_IFS
4802
4803  ;;
4804esac
4805fi
4806FIND=$ac_cv_path_FIND
4807if test -n "$FIND"; then
4808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4809$as_echo "$FIND" >&6; }
4810else
4811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4812$as_echo "no" >&6; }
4813fi
4814
4815
4816  test -n "$FIND" && break
4817done
4818
4819
4820  if test "x$FIND" = x; then
4821    if test "xfind" = x; then
4822      PROG_NAME=find
4823    else
4824      PROG_NAME=find
4825    fi
4826    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4827$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4828    as_fn_error $? "Cannot continue" "$LINENO" 5
4829  fi
4830
4831
4832
4833  for ac_prog in head
4834do
4835  # Extract the first word of "$ac_prog", so it can be a program name with args.
4836set dummy $ac_prog; ac_word=$2
4837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4838$as_echo_n "checking for $ac_word... " >&6; }
4839if ${ac_cv_path_HEAD+:} false; then :
4840  $as_echo_n "(cached) " >&6
4841else
4842  case $HEAD in
4843  [\\/]* | ?:[\\/]*)
4844  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4845  ;;
4846  *)
4847  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4848for as_dir in $PATH
4849do
4850  IFS=$as_save_IFS
4851  test -z "$as_dir" && as_dir=.
4852    for ac_exec_ext in '' $ac_executable_extensions; do
4853  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4854    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4855    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4856    break 2
4857  fi
4858done
4859  done
4860IFS=$as_save_IFS
4861
4862  ;;
4863esac
4864fi
4865HEAD=$ac_cv_path_HEAD
4866if test -n "$HEAD"; then
4867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4868$as_echo "$HEAD" >&6; }
4869else
4870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4871$as_echo "no" >&6; }
4872fi
4873
4874
4875  test -n "$HEAD" && break
4876done
4877
4878
4879  if test "x$HEAD" = x; then
4880    if test "xhead" = x; then
4881      PROG_NAME=head
4882    else
4883      PROG_NAME=head
4884    fi
4885    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4886$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4887    as_fn_error $? "Cannot continue" "$LINENO" 5
4888  fi
4889
4890
4891
4892  for ac_prog in ln
4893do
4894  # Extract the first word of "$ac_prog", so it can be a program name with args.
4895set dummy $ac_prog; ac_word=$2
4896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4897$as_echo_n "checking for $ac_word... " >&6; }
4898if ${ac_cv_path_LN+:} false; then :
4899  $as_echo_n "(cached) " >&6
4900else
4901  case $LN in
4902  [\\/]* | ?:[\\/]*)
4903  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4904  ;;
4905  *)
4906  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4907for as_dir in $PATH
4908do
4909  IFS=$as_save_IFS
4910  test -z "$as_dir" && as_dir=.
4911    for ac_exec_ext in '' $ac_executable_extensions; do
4912  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4913    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4914    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4915    break 2
4916  fi
4917done
4918  done
4919IFS=$as_save_IFS
4920
4921  ;;
4922esac
4923fi
4924LN=$ac_cv_path_LN
4925if test -n "$LN"; then
4926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4927$as_echo "$LN" >&6; }
4928else
4929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4930$as_echo "no" >&6; }
4931fi
4932
4933
4934  test -n "$LN" && break
4935done
4936
4937
4938  if test "x$LN" = x; then
4939    if test "xln" = x; then
4940      PROG_NAME=ln
4941    else
4942      PROG_NAME=ln
4943    fi
4944    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4945$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4946    as_fn_error $? "Cannot continue" "$LINENO" 5
4947  fi
4948
4949
4950
4951  for ac_prog in ls
4952do
4953  # Extract the first word of "$ac_prog", so it can be a program name with args.
4954set dummy $ac_prog; ac_word=$2
4955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4956$as_echo_n "checking for $ac_word... " >&6; }
4957if ${ac_cv_path_LS+:} false; then :
4958  $as_echo_n "(cached) " >&6
4959else
4960  case $LS in
4961  [\\/]* | ?:[\\/]*)
4962  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4963  ;;
4964  *)
4965  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4966for as_dir in $PATH
4967do
4968  IFS=$as_save_IFS
4969  test -z "$as_dir" && as_dir=.
4970    for ac_exec_ext in '' $ac_executable_extensions; do
4971  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4972    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4973    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4974    break 2
4975  fi
4976done
4977  done
4978IFS=$as_save_IFS
4979
4980  ;;
4981esac
4982fi
4983LS=$ac_cv_path_LS
4984if test -n "$LS"; then
4985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4986$as_echo "$LS" >&6; }
4987else
4988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4989$as_echo "no" >&6; }
4990fi
4991
4992
4993  test -n "$LS" && break
4994done
4995
4996
4997  if test "x$LS" = x; then
4998    if test "xls" = x; then
4999      PROG_NAME=ls
5000    else
5001      PROG_NAME=ls
5002    fi
5003    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5004$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5005    as_fn_error $? "Cannot continue" "$LINENO" 5
5006  fi
5007
5008
5009
5010  for ac_prog in mkdir
5011do
5012  # Extract the first word of "$ac_prog", so it can be a program name with args.
5013set dummy $ac_prog; ac_word=$2
5014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5015$as_echo_n "checking for $ac_word... " >&6; }
5016if ${ac_cv_path_MKDIR+:} false; then :
5017  $as_echo_n "(cached) " >&6
5018else
5019  case $MKDIR in
5020  [\\/]* | ?:[\\/]*)
5021  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
5022  ;;
5023  *)
5024  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5025for as_dir in $PATH
5026do
5027  IFS=$as_save_IFS
5028  test -z "$as_dir" && as_dir=.
5029    for ac_exec_ext in '' $ac_executable_extensions; do
5030  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5031    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
5032    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5033    break 2
5034  fi
5035done
5036  done
5037IFS=$as_save_IFS
5038
5039  ;;
5040esac
5041fi
5042MKDIR=$ac_cv_path_MKDIR
5043if test -n "$MKDIR"; then
5044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
5045$as_echo "$MKDIR" >&6; }
5046else
5047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5048$as_echo "no" >&6; }
5049fi
5050
5051
5052  test -n "$MKDIR" && break
5053done
5054
5055
5056  if test "x$MKDIR" = x; then
5057    if test "xmkdir" = x; then
5058      PROG_NAME=mkdir
5059    else
5060      PROG_NAME=mkdir
5061    fi
5062    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5063$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5064    as_fn_error $? "Cannot continue" "$LINENO" 5
5065  fi
5066
5067
5068
5069  for ac_prog in mktemp
5070do
5071  # Extract the first word of "$ac_prog", so it can be a program name with args.
5072set dummy $ac_prog; ac_word=$2
5073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5074$as_echo_n "checking for $ac_word... " >&6; }
5075if ${ac_cv_path_MKTEMP+:} false; then :
5076  $as_echo_n "(cached) " >&6
5077else
5078  case $MKTEMP in
5079  [\\/]* | ?:[\\/]*)
5080  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
5081  ;;
5082  *)
5083  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5084for as_dir in $PATH
5085do
5086  IFS=$as_save_IFS
5087  test -z "$as_dir" && as_dir=.
5088    for ac_exec_ext in '' $ac_executable_extensions; do
5089  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5090    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
5091    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5092    break 2
5093  fi
5094done
5095  done
5096IFS=$as_save_IFS
5097
5098  ;;
5099esac
5100fi
5101MKTEMP=$ac_cv_path_MKTEMP
5102if test -n "$MKTEMP"; then
5103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
5104$as_echo "$MKTEMP" >&6; }
5105else
5106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5107$as_echo "no" >&6; }
5108fi
5109
5110
5111  test -n "$MKTEMP" && break
5112done
5113
5114
5115  if test "x$MKTEMP" = x; then
5116    if test "xmktemp" = x; then
5117      PROG_NAME=mktemp
5118    else
5119      PROG_NAME=mktemp
5120    fi
5121    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5122$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5123    as_fn_error $? "Cannot continue" "$LINENO" 5
5124  fi
5125
5126
5127
5128  for ac_prog in mv
5129do
5130  # Extract the first word of "$ac_prog", so it can be a program name with args.
5131set dummy $ac_prog; ac_word=$2
5132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5133$as_echo_n "checking for $ac_word... " >&6; }
5134if ${ac_cv_path_MV+:} false; then :
5135  $as_echo_n "(cached) " >&6
5136else
5137  case $MV in
5138  [\\/]* | ?:[\\/]*)
5139  ac_cv_path_MV="$MV" # Let the user override the test with a path.
5140  ;;
5141  *)
5142  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5143for as_dir in $PATH
5144do
5145  IFS=$as_save_IFS
5146  test -z "$as_dir" && as_dir=.
5147    for ac_exec_ext in '' $ac_executable_extensions; do
5148  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5149    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5150    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5151    break 2
5152  fi
5153done
5154  done
5155IFS=$as_save_IFS
5156
5157  ;;
5158esac
5159fi
5160MV=$ac_cv_path_MV
5161if test -n "$MV"; then
5162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5163$as_echo "$MV" >&6; }
5164else
5165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5166$as_echo "no" >&6; }
5167fi
5168
5169
5170  test -n "$MV" && break
5171done
5172
5173
5174  if test "x$MV" = x; then
5175    if test "xmv" = x; then
5176      PROG_NAME=mv
5177    else
5178      PROG_NAME=mv
5179    fi
5180    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5181$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5182    as_fn_error $? "Cannot continue" "$LINENO" 5
5183  fi
5184
5185
5186
5187  for ac_prog in printf
5188do
5189  # Extract the first word of "$ac_prog", so it can be a program name with args.
5190set dummy $ac_prog; ac_word=$2
5191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5192$as_echo_n "checking for $ac_word... " >&6; }
5193if ${ac_cv_path_PRINTF+:} false; then :
5194  $as_echo_n "(cached) " >&6
5195else
5196  case $PRINTF in
5197  [\\/]* | ?:[\\/]*)
5198  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5199  ;;
5200  *)
5201  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5202for as_dir in $PATH
5203do
5204  IFS=$as_save_IFS
5205  test -z "$as_dir" && as_dir=.
5206    for ac_exec_ext in '' $ac_executable_extensions; do
5207  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5208    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5209    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5210    break 2
5211  fi
5212done
5213  done
5214IFS=$as_save_IFS
5215
5216  ;;
5217esac
5218fi
5219PRINTF=$ac_cv_path_PRINTF
5220if test -n "$PRINTF"; then
5221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5222$as_echo "$PRINTF" >&6; }
5223else
5224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5225$as_echo "no" >&6; }
5226fi
5227
5228
5229  test -n "$PRINTF" && break
5230done
5231
5232
5233  if test "x$PRINTF" = x; then
5234    if test "xprintf" = x; then
5235      PROG_NAME=printf
5236    else
5237      PROG_NAME=printf
5238    fi
5239    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5240$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5241    as_fn_error $? "Cannot continue" "$LINENO" 5
5242  fi
5243
5244
5245
5246  for ac_prog in rm
5247do
5248  # Extract the first word of "$ac_prog", so it can be a program name with args.
5249set dummy $ac_prog; ac_word=$2
5250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5251$as_echo_n "checking for $ac_word... " >&6; }
5252if ${ac_cv_path_RM+:} false; then :
5253  $as_echo_n "(cached) " >&6
5254else
5255  case $RM in
5256  [\\/]* | ?:[\\/]*)
5257  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5258  ;;
5259  *)
5260  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5261for as_dir in $PATH
5262do
5263  IFS=$as_save_IFS
5264  test -z "$as_dir" && as_dir=.
5265    for ac_exec_ext in '' $ac_executable_extensions; do
5266  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5267    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5268    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5269    break 2
5270  fi
5271done
5272  done
5273IFS=$as_save_IFS
5274
5275  ;;
5276esac
5277fi
5278RM=$ac_cv_path_RM
5279if test -n "$RM"; then
5280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5281$as_echo "$RM" >&6; }
5282else
5283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5284$as_echo "no" >&6; }
5285fi
5286
5287
5288  test -n "$RM" && break
5289done
5290
5291
5292  if test "x$RM" = x; then
5293    if test "xrm" = x; then
5294      PROG_NAME=rm
5295    else
5296      PROG_NAME=rm
5297    fi
5298    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5299$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5300    as_fn_error $? "Cannot continue" "$LINENO" 5
5301  fi
5302
5303
5304
5305  for ac_prog in sh
5306do
5307  # Extract the first word of "$ac_prog", so it can be a program name with args.
5308set dummy $ac_prog; ac_word=$2
5309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5310$as_echo_n "checking for $ac_word... " >&6; }
5311if ${ac_cv_path_SH+:} false; then :
5312  $as_echo_n "(cached) " >&6
5313else
5314  case $SH in
5315  [\\/]* | ?:[\\/]*)
5316  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5317  ;;
5318  *)
5319  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5320for as_dir in $PATH
5321do
5322  IFS=$as_save_IFS
5323  test -z "$as_dir" && as_dir=.
5324    for ac_exec_ext in '' $ac_executable_extensions; do
5325  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5326    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5327    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5328    break 2
5329  fi
5330done
5331  done
5332IFS=$as_save_IFS
5333
5334  ;;
5335esac
5336fi
5337SH=$ac_cv_path_SH
5338if test -n "$SH"; then
5339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5340$as_echo "$SH" >&6; }
5341else
5342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5343$as_echo "no" >&6; }
5344fi
5345
5346
5347  test -n "$SH" && break
5348done
5349
5350
5351  if test "x$SH" = x; then
5352    if test "xsh" = x; then
5353      PROG_NAME=sh
5354    else
5355      PROG_NAME=sh
5356    fi
5357    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5358$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5359    as_fn_error $? "Cannot continue" "$LINENO" 5
5360  fi
5361
5362
5363
5364  for ac_prog in sort
5365do
5366  # Extract the first word of "$ac_prog", so it can be a program name with args.
5367set dummy $ac_prog; ac_word=$2
5368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5369$as_echo_n "checking for $ac_word... " >&6; }
5370if ${ac_cv_path_SORT+:} false; then :
5371  $as_echo_n "(cached) " >&6
5372else
5373  case $SORT in
5374  [\\/]* | ?:[\\/]*)
5375  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5376  ;;
5377  *)
5378  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5379for as_dir in $PATH
5380do
5381  IFS=$as_save_IFS
5382  test -z "$as_dir" && as_dir=.
5383    for ac_exec_ext in '' $ac_executable_extensions; do
5384  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5385    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5386    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5387    break 2
5388  fi
5389done
5390  done
5391IFS=$as_save_IFS
5392
5393  ;;
5394esac
5395fi
5396SORT=$ac_cv_path_SORT
5397if test -n "$SORT"; then
5398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5399$as_echo "$SORT" >&6; }
5400else
5401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5402$as_echo "no" >&6; }
5403fi
5404
5405
5406  test -n "$SORT" && break
5407done
5408
5409
5410  if test "x$SORT" = x; then
5411    if test "xsort" = x; then
5412      PROG_NAME=sort
5413    else
5414      PROG_NAME=sort
5415    fi
5416    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5417$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5418    as_fn_error $? "Cannot continue" "$LINENO" 5
5419  fi
5420
5421
5422
5423  for ac_prog in tail
5424do
5425  # Extract the first word of "$ac_prog", so it can be a program name with args.
5426set dummy $ac_prog; ac_word=$2
5427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5428$as_echo_n "checking for $ac_word... " >&6; }
5429if ${ac_cv_path_TAIL+:} false; then :
5430  $as_echo_n "(cached) " >&6
5431else
5432  case $TAIL in
5433  [\\/]* | ?:[\\/]*)
5434  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5435  ;;
5436  *)
5437  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5438for as_dir in $PATH
5439do
5440  IFS=$as_save_IFS
5441  test -z "$as_dir" && as_dir=.
5442    for ac_exec_ext in '' $ac_executable_extensions; do
5443  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5444    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5445    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5446    break 2
5447  fi
5448done
5449  done
5450IFS=$as_save_IFS
5451
5452  ;;
5453esac
5454fi
5455TAIL=$ac_cv_path_TAIL
5456if test -n "$TAIL"; then
5457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5458$as_echo "$TAIL" >&6; }
5459else
5460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5461$as_echo "no" >&6; }
5462fi
5463
5464
5465  test -n "$TAIL" && break
5466done
5467
5468
5469  if test "x$TAIL" = x; then
5470    if test "xtail" = x; then
5471      PROG_NAME=tail
5472    else
5473      PROG_NAME=tail
5474    fi
5475    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5476$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5477    as_fn_error $? "Cannot continue" "$LINENO" 5
5478  fi
5479
5480
5481
5482  for ac_prog in tar
5483do
5484  # Extract the first word of "$ac_prog", so it can be a program name with args.
5485set dummy $ac_prog; ac_word=$2
5486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5487$as_echo_n "checking for $ac_word... " >&6; }
5488if ${ac_cv_path_TAR+:} false; then :
5489  $as_echo_n "(cached) " >&6
5490else
5491  case $TAR in
5492  [\\/]* | ?:[\\/]*)
5493  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5494  ;;
5495  *)
5496  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5497for as_dir in $PATH
5498do
5499  IFS=$as_save_IFS
5500  test -z "$as_dir" && as_dir=.
5501    for ac_exec_ext in '' $ac_executable_extensions; do
5502  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5503    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5504    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5505    break 2
5506  fi
5507done
5508  done
5509IFS=$as_save_IFS
5510
5511  ;;
5512esac
5513fi
5514TAR=$ac_cv_path_TAR
5515if test -n "$TAR"; then
5516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5517$as_echo "$TAR" >&6; }
5518else
5519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5520$as_echo "no" >&6; }
5521fi
5522
5523
5524  test -n "$TAR" && break
5525done
5526
5527
5528  if test "x$TAR" = x; then
5529    if test "xtar" = x; then
5530      PROG_NAME=tar
5531    else
5532      PROG_NAME=tar
5533    fi
5534    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5535$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5536    as_fn_error $? "Cannot continue" "$LINENO" 5
5537  fi
5538
5539
5540
5541  for ac_prog in tee
5542do
5543  # Extract the first word of "$ac_prog", so it can be a program name with args.
5544set dummy $ac_prog; ac_word=$2
5545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5546$as_echo_n "checking for $ac_word... " >&6; }
5547if ${ac_cv_path_TEE+:} false; then :
5548  $as_echo_n "(cached) " >&6
5549else
5550  case $TEE in
5551  [\\/]* | ?:[\\/]*)
5552  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5553  ;;
5554  *)
5555  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5556for as_dir in $PATH
5557do
5558  IFS=$as_save_IFS
5559  test -z "$as_dir" && as_dir=.
5560    for ac_exec_ext in '' $ac_executable_extensions; do
5561  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5562    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5563    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5564    break 2
5565  fi
5566done
5567  done
5568IFS=$as_save_IFS
5569
5570  ;;
5571esac
5572fi
5573TEE=$ac_cv_path_TEE
5574if test -n "$TEE"; then
5575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5576$as_echo "$TEE" >&6; }
5577else
5578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5579$as_echo "no" >&6; }
5580fi
5581
5582
5583  test -n "$TEE" && break
5584done
5585
5586
5587  if test "x$TEE" = x; then
5588    if test "xtee" = x; then
5589      PROG_NAME=tee
5590    else
5591      PROG_NAME=tee
5592    fi
5593    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5594$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5595    as_fn_error $? "Cannot continue" "$LINENO" 5
5596  fi
5597
5598
5599
5600  for ac_prog in touch
5601do
5602  # Extract the first word of "$ac_prog", so it can be a program name with args.
5603set dummy $ac_prog; ac_word=$2
5604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5605$as_echo_n "checking for $ac_word... " >&6; }
5606if ${ac_cv_path_TOUCH+:} false; then :
5607  $as_echo_n "(cached) " >&6
5608else
5609  case $TOUCH in
5610  [\\/]* | ?:[\\/]*)
5611  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5612  ;;
5613  *)
5614  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5615for as_dir in $PATH
5616do
5617  IFS=$as_save_IFS
5618  test -z "$as_dir" && as_dir=.
5619    for ac_exec_ext in '' $ac_executable_extensions; do
5620  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5621    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5622    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5623    break 2
5624  fi
5625done
5626  done
5627IFS=$as_save_IFS
5628
5629  ;;
5630esac
5631fi
5632TOUCH=$ac_cv_path_TOUCH
5633if test -n "$TOUCH"; then
5634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5635$as_echo "$TOUCH" >&6; }
5636else
5637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5638$as_echo "no" >&6; }
5639fi
5640
5641
5642  test -n "$TOUCH" && break
5643done
5644
5645
5646  if test "x$TOUCH" = x; then
5647    if test "xtouch" = x; then
5648      PROG_NAME=touch
5649    else
5650      PROG_NAME=touch
5651    fi
5652    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5653$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5654    as_fn_error $? "Cannot continue" "$LINENO" 5
5655  fi
5656
5657
5658
5659  for ac_prog in tr
5660do
5661  # Extract the first word of "$ac_prog", so it can be a program name with args.
5662set dummy $ac_prog; ac_word=$2
5663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5664$as_echo_n "checking for $ac_word... " >&6; }
5665if ${ac_cv_path_TR+:} false; then :
5666  $as_echo_n "(cached) " >&6
5667else
5668  case $TR in
5669  [\\/]* | ?:[\\/]*)
5670  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5671  ;;
5672  *)
5673  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5674for as_dir in $PATH
5675do
5676  IFS=$as_save_IFS
5677  test -z "$as_dir" && as_dir=.
5678    for ac_exec_ext in '' $ac_executable_extensions; do
5679  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5680    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5681    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5682    break 2
5683  fi
5684done
5685  done
5686IFS=$as_save_IFS
5687
5688  ;;
5689esac
5690fi
5691TR=$ac_cv_path_TR
5692if test -n "$TR"; then
5693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5694$as_echo "$TR" >&6; }
5695else
5696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5697$as_echo "no" >&6; }
5698fi
5699
5700
5701  test -n "$TR" && break
5702done
5703
5704
5705  if test "x$TR" = x; then
5706    if test "xtr" = x; then
5707      PROG_NAME=tr
5708    else
5709      PROG_NAME=tr
5710    fi
5711    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5712$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5713    as_fn_error $? "Cannot continue" "$LINENO" 5
5714  fi
5715
5716
5717
5718  for ac_prog in uname
5719do
5720  # Extract the first word of "$ac_prog", so it can be a program name with args.
5721set dummy $ac_prog; ac_word=$2
5722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5723$as_echo_n "checking for $ac_word... " >&6; }
5724if ${ac_cv_path_UNAME+:} false; then :
5725  $as_echo_n "(cached) " >&6
5726else
5727  case $UNAME in
5728  [\\/]* | ?:[\\/]*)
5729  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5730  ;;
5731  *)
5732  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5733for as_dir in $PATH
5734do
5735  IFS=$as_save_IFS
5736  test -z "$as_dir" && as_dir=.
5737    for ac_exec_ext in '' $ac_executable_extensions; do
5738  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5739    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5740    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5741    break 2
5742  fi
5743done
5744  done
5745IFS=$as_save_IFS
5746
5747  ;;
5748esac
5749fi
5750UNAME=$ac_cv_path_UNAME
5751if test -n "$UNAME"; then
5752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5753$as_echo "$UNAME" >&6; }
5754else
5755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5756$as_echo "no" >&6; }
5757fi
5758
5759
5760  test -n "$UNAME" && break
5761done
5762
5763
5764  if test "x$UNAME" = x; then
5765    if test "xuname" = x; then
5766      PROG_NAME=uname
5767    else
5768      PROG_NAME=uname
5769    fi
5770    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5771$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5772    as_fn_error $? "Cannot continue" "$LINENO" 5
5773  fi
5774
5775
5776
5777  for ac_prog in uniq
5778do
5779  # Extract the first word of "$ac_prog", so it can be a program name with args.
5780set dummy $ac_prog; ac_word=$2
5781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5782$as_echo_n "checking for $ac_word... " >&6; }
5783if ${ac_cv_path_UNIQ+:} false; then :
5784  $as_echo_n "(cached) " >&6
5785else
5786  case $UNIQ in
5787  [\\/]* | ?:[\\/]*)
5788  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5789  ;;
5790  *)
5791  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5792for as_dir in $PATH
5793do
5794  IFS=$as_save_IFS
5795  test -z "$as_dir" && as_dir=.
5796    for ac_exec_ext in '' $ac_executable_extensions; do
5797  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5798    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5799    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5800    break 2
5801  fi
5802done
5803  done
5804IFS=$as_save_IFS
5805
5806  ;;
5807esac
5808fi
5809UNIQ=$ac_cv_path_UNIQ
5810if test -n "$UNIQ"; then
5811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5812$as_echo "$UNIQ" >&6; }
5813else
5814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5815$as_echo "no" >&6; }
5816fi
5817
5818
5819  test -n "$UNIQ" && break
5820done
5821
5822
5823  if test "x$UNIQ" = x; then
5824    if test "xuniq" = x; then
5825      PROG_NAME=uniq
5826    else
5827      PROG_NAME=uniq
5828    fi
5829    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5830$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5831    as_fn_error $? "Cannot continue" "$LINENO" 5
5832  fi
5833
5834
5835
5836  for ac_prog in wc
5837do
5838  # Extract the first word of "$ac_prog", so it can be a program name with args.
5839set dummy $ac_prog; ac_word=$2
5840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5841$as_echo_n "checking for $ac_word... " >&6; }
5842if ${ac_cv_path_WC+:} false; then :
5843  $as_echo_n "(cached) " >&6
5844else
5845  case $WC in
5846  [\\/]* | ?:[\\/]*)
5847  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5848  ;;
5849  *)
5850  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5851for as_dir in $PATH
5852do
5853  IFS=$as_save_IFS
5854  test -z "$as_dir" && as_dir=.
5855    for ac_exec_ext in '' $ac_executable_extensions; do
5856  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5857    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5858    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5859    break 2
5860  fi
5861done
5862  done
5863IFS=$as_save_IFS
5864
5865  ;;
5866esac
5867fi
5868WC=$ac_cv_path_WC
5869if test -n "$WC"; then
5870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5871$as_echo "$WC" >&6; }
5872else
5873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5874$as_echo "no" >&6; }
5875fi
5876
5877
5878  test -n "$WC" && break
5879done
5880
5881
5882  if test "x$WC" = x; then
5883    if test "xwc" = x; then
5884      PROG_NAME=wc
5885    else
5886      PROG_NAME=wc
5887    fi
5888    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5889$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5890    as_fn_error $? "Cannot continue" "$LINENO" 5
5891  fi
5892
5893
5894
5895  for ac_prog in which
5896do
5897  # Extract the first word of "$ac_prog", so it can be a program name with args.
5898set dummy $ac_prog; ac_word=$2
5899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5900$as_echo_n "checking for $ac_word... " >&6; }
5901if ${ac_cv_path_WHICH+:} false; then :
5902  $as_echo_n "(cached) " >&6
5903else
5904  case $WHICH in
5905  [\\/]* | ?:[\\/]*)
5906  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5907  ;;
5908  *)
5909  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5910for as_dir in $PATH
5911do
5912  IFS=$as_save_IFS
5913  test -z "$as_dir" && as_dir=.
5914    for ac_exec_ext in '' $ac_executable_extensions; do
5915  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5916    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5917    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5918    break 2
5919  fi
5920done
5921  done
5922IFS=$as_save_IFS
5923
5924  ;;
5925esac
5926fi
5927WHICH=$ac_cv_path_WHICH
5928if test -n "$WHICH"; then
5929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5930$as_echo "$WHICH" >&6; }
5931else
5932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5933$as_echo "no" >&6; }
5934fi
5935
5936
5937  test -n "$WHICH" && break
5938done
5939
5940
5941  if test "x$WHICH" = x; then
5942    if test "xwhich" = x; then
5943      PROG_NAME=which
5944    else
5945      PROG_NAME=which
5946    fi
5947    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5948$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5949    as_fn_error $? "Cannot continue" "$LINENO" 5
5950  fi
5951
5952
5953
5954  for ac_prog in xargs
5955do
5956  # Extract the first word of "$ac_prog", so it can be a program name with args.
5957set dummy $ac_prog; ac_word=$2
5958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5959$as_echo_n "checking for $ac_word... " >&6; }
5960if ${ac_cv_path_XARGS+:} false; then :
5961  $as_echo_n "(cached) " >&6
5962else
5963  case $XARGS in
5964  [\\/]* | ?:[\\/]*)
5965  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5966  ;;
5967  *)
5968  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5969for as_dir in $PATH
5970do
5971  IFS=$as_save_IFS
5972  test -z "$as_dir" && as_dir=.
5973    for ac_exec_ext in '' $ac_executable_extensions; do
5974  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5975    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5976    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5977    break 2
5978  fi
5979done
5980  done
5981IFS=$as_save_IFS
5982
5983  ;;
5984esac
5985fi
5986XARGS=$ac_cv_path_XARGS
5987if test -n "$XARGS"; then
5988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5989$as_echo "$XARGS" >&6; }
5990else
5991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5992$as_echo "no" >&6; }
5993fi
5994
5995
5996  test -n "$XARGS" && break
5997done
5998
5999
6000  if test "x$XARGS" = x; then
6001    if test "xxargs" = x; then
6002      PROG_NAME=xargs
6003    else
6004      PROG_NAME=xargs
6005    fi
6006    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6007$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6008    as_fn_error $? "Cannot continue" "$LINENO" 5
6009  fi
6010
6011
6012
6013  # Then required tools that require some special treatment.
6014  for ac_prog in gawk mawk nawk awk
6015do
6016  # Extract the first word of "$ac_prog", so it can be a program name with args.
6017set dummy $ac_prog; ac_word=$2
6018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6019$as_echo_n "checking for $ac_word... " >&6; }
6020if ${ac_cv_prog_AWK+:} false; then :
6021  $as_echo_n "(cached) " >&6
6022else
6023  if test -n "$AWK"; then
6024  ac_cv_prog_AWK="$AWK" # Let the user override the test.
6025else
6026as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6027for as_dir in $PATH
6028do
6029  IFS=$as_save_IFS
6030  test -z "$as_dir" && as_dir=.
6031    for ac_exec_ext in '' $ac_executable_extensions; do
6032  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6033    ac_cv_prog_AWK="$ac_prog"
6034    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6035    break 2
6036  fi
6037done
6038  done
6039IFS=$as_save_IFS
6040
6041fi
6042fi
6043AWK=$ac_cv_prog_AWK
6044if test -n "$AWK"; then
6045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6046$as_echo "$AWK" >&6; }
6047else
6048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6049$as_echo "no" >&6; }
6050fi
6051
6052
6053  test -n "$AWK" && break
6054done
6055
6056
6057  if test "x$AWK" = x; then
6058    if test "x" = x; then
6059      PROG_NAME=awk
6060    else
6061      PROG_NAME=
6062    fi
6063    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6064$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6065    as_fn_error $? "Cannot continue" "$LINENO" 5
6066  fi
6067
6068  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6069$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6070if ${ac_cv_path_GREP+:} false; then :
6071  $as_echo_n "(cached) " >&6
6072else
6073  if test -z "$GREP"; then
6074  ac_path_GREP_found=false
6075  # Loop through the user's path and test for each of PROGNAME-LIST
6076  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6077for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6078do
6079  IFS=$as_save_IFS
6080  test -z "$as_dir" && as_dir=.
6081    for ac_prog in grep ggrep; do
6082    for ac_exec_ext in '' $ac_executable_extensions; do
6083      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6084      as_fn_executable_p "$ac_path_GREP" || continue
6085# Check for GNU ac_path_GREP and select it if it is found.
6086  # Check for GNU $ac_path_GREP
6087case `"$ac_path_GREP" --version 2>&1` in
6088*GNU*)
6089  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6090*)
6091  ac_count=0
6092  $as_echo_n 0123456789 >"conftest.in"
6093  while :
6094  do
6095    cat "conftest.in" "conftest.in" >"conftest.tmp"
6096    mv "conftest.tmp" "conftest.in"
6097    cp "conftest.in" "conftest.nl"
6098    $as_echo 'GREP' >> "conftest.nl"
6099    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6100    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6101    as_fn_arith $ac_count + 1 && ac_count=$as_val
6102    if test $ac_count -gt ${ac_path_GREP_max-0}; then
6103      # Best one so far, save it but keep looking for a better one
6104      ac_cv_path_GREP="$ac_path_GREP"
6105      ac_path_GREP_max=$ac_count
6106    fi
6107    # 10*(2^10) chars as input seems more than enough
6108    test $ac_count -gt 10 && break
6109  done
6110  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6111esac
6112
6113      $ac_path_GREP_found && break 3
6114    done
6115  done
6116  done
6117IFS=$as_save_IFS
6118  if test -z "$ac_cv_path_GREP"; then
6119    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6120  fi
6121else
6122  ac_cv_path_GREP=$GREP
6123fi
6124
6125fi
6126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6127$as_echo "$ac_cv_path_GREP" >&6; }
6128 GREP="$ac_cv_path_GREP"
6129
6130
6131
6132  if test "x$GREP" = x; then
6133    if test "x" = x; then
6134      PROG_NAME=grep
6135    else
6136      PROG_NAME=
6137    fi
6138    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6139$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6140    as_fn_error $? "Cannot continue" "$LINENO" 5
6141  fi
6142
6143  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6144$as_echo_n "checking for egrep... " >&6; }
6145if ${ac_cv_path_EGREP+:} false; then :
6146  $as_echo_n "(cached) " >&6
6147else
6148  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6149   then ac_cv_path_EGREP="$GREP -E"
6150   else
6151     if test -z "$EGREP"; then
6152  ac_path_EGREP_found=false
6153  # Loop through the user's path and test for each of PROGNAME-LIST
6154  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6155for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6156do
6157  IFS=$as_save_IFS
6158  test -z "$as_dir" && as_dir=.
6159    for ac_prog in egrep; do
6160    for ac_exec_ext in '' $ac_executable_extensions; do
6161      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6162      as_fn_executable_p "$ac_path_EGREP" || continue
6163# Check for GNU ac_path_EGREP and select it if it is found.
6164  # Check for GNU $ac_path_EGREP
6165case `"$ac_path_EGREP" --version 2>&1` in
6166*GNU*)
6167  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6168*)
6169  ac_count=0
6170  $as_echo_n 0123456789 >"conftest.in"
6171  while :
6172  do
6173    cat "conftest.in" "conftest.in" >"conftest.tmp"
6174    mv "conftest.tmp" "conftest.in"
6175    cp "conftest.in" "conftest.nl"
6176    $as_echo 'EGREP' >> "conftest.nl"
6177    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6178    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6179    as_fn_arith $ac_count + 1 && ac_count=$as_val
6180    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6181      # Best one so far, save it but keep looking for a better one
6182      ac_cv_path_EGREP="$ac_path_EGREP"
6183      ac_path_EGREP_max=$ac_count
6184    fi
6185    # 10*(2^10) chars as input seems more than enough
6186    test $ac_count -gt 10 && break
6187  done
6188  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6189esac
6190
6191      $ac_path_EGREP_found && break 3
6192    done
6193  done
6194  done
6195IFS=$as_save_IFS
6196  if test -z "$ac_cv_path_EGREP"; then
6197    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6198  fi
6199else
6200  ac_cv_path_EGREP=$EGREP
6201fi
6202
6203   fi
6204fi
6205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6206$as_echo "$ac_cv_path_EGREP" >&6; }
6207 EGREP="$ac_cv_path_EGREP"
6208
6209
6210
6211  if test "x$EGREP" = x; then
6212    if test "x" = x; then
6213      PROG_NAME=egrep
6214    else
6215      PROG_NAME=
6216    fi
6217    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6218$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6219    as_fn_error $? "Cannot continue" "$LINENO" 5
6220  fi
6221
6222  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6223$as_echo_n "checking for fgrep... " >&6; }
6224if ${ac_cv_path_FGREP+:} false; then :
6225  $as_echo_n "(cached) " >&6
6226else
6227  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6228   then ac_cv_path_FGREP="$GREP -F"
6229   else
6230     if test -z "$FGREP"; then
6231  ac_path_FGREP_found=false
6232  # Loop through the user's path and test for each of PROGNAME-LIST
6233  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6234for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6235do
6236  IFS=$as_save_IFS
6237  test -z "$as_dir" && as_dir=.
6238    for ac_prog in fgrep; do
6239    for ac_exec_ext in '' $ac_executable_extensions; do
6240      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6241      as_fn_executable_p "$ac_path_FGREP" || continue
6242# Check for GNU ac_path_FGREP and select it if it is found.
6243  # Check for GNU $ac_path_FGREP
6244case `"$ac_path_FGREP" --version 2>&1` in
6245*GNU*)
6246  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6247*)
6248  ac_count=0
6249  $as_echo_n 0123456789 >"conftest.in"
6250  while :
6251  do
6252    cat "conftest.in" "conftest.in" >"conftest.tmp"
6253    mv "conftest.tmp" "conftest.in"
6254    cp "conftest.in" "conftest.nl"
6255    $as_echo 'FGREP' >> "conftest.nl"
6256    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6257    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6258    as_fn_arith $ac_count + 1 && ac_count=$as_val
6259    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6260      # Best one so far, save it but keep looking for a better one
6261      ac_cv_path_FGREP="$ac_path_FGREP"
6262      ac_path_FGREP_max=$ac_count
6263    fi
6264    # 10*(2^10) chars as input seems more than enough
6265    test $ac_count -gt 10 && break
6266  done
6267  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6268esac
6269
6270      $ac_path_FGREP_found && break 3
6271    done
6272  done
6273  done
6274IFS=$as_save_IFS
6275  if test -z "$ac_cv_path_FGREP"; then
6276    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6277  fi
6278else
6279  ac_cv_path_FGREP=$FGREP
6280fi
6281
6282   fi
6283fi
6284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6285$as_echo "$ac_cv_path_FGREP" >&6; }
6286 FGREP="$ac_cv_path_FGREP"
6287
6288
6289
6290  if test "x$FGREP" = x; then
6291    if test "x" = x; then
6292      PROG_NAME=fgrep
6293    else
6294      PROG_NAME=
6295    fi
6296    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6297$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6298    as_fn_error $? "Cannot continue" "$LINENO" 5
6299  fi
6300
6301  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6302$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6303if ${ac_cv_path_SED+:} false; then :
6304  $as_echo_n "(cached) " >&6
6305else
6306            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6307     for ac_i in 1 2 3 4 5 6 7; do
6308       ac_script="$ac_script$as_nl$ac_script"
6309     done
6310     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6311     { ac_script=; unset ac_script;}
6312     if test -z "$SED"; then
6313  ac_path_SED_found=false
6314  # Loop through the user's path and test for each of PROGNAME-LIST
6315  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6316for as_dir in $PATH
6317do
6318  IFS=$as_save_IFS
6319  test -z "$as_dir" && as_dir=.
6320    for ac_prog in sed gsed; do
6321    for ac_exec_ext in '' $ac_executable_extensions; do
6322      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6323      as_fn_executable_p "$ac_path_SED" || continue
6324# Check for GNU ac_path_SED and select it if it is found.
6325  # Check for GNU $ac_path_SED
6326case `"$ac_path_SED" --version 2>&1` in
6327*GNU*)
6328  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6329*)
6330  ac_count=0
6331  $as_echo_n 0123456789 >"conftest.in"
6332  while :
6333  do
6334    cat "conftest.in" "conftest.in" >"conftest.tmp"
6335    mv "conftest.tmp" "conftest.in"
6336    cp "conftest.in" "conftest.nl"
6337    $as_echo '' >> "conftest.nl"
6338    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6339    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6340    as_fn_arith $ac_count + 1 && ac_count=$as_val
6341    if test $ac_count -gt ${ac_path_SED_max-0}; then
6342      # Best one so far, save it but keep looking for a better one
6343      ac_cv_path_SED="$ac_path_SED"
6344      ac_path_SED_max=$ac_count
6345    fi
6346    # 10*(2^10) chars as input seems more than enough
6347    test $ac_count -gt 10 && break
6348  done
6349  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6350esac
6351
6352      $ac_path_SED_found && break 3
6353    done
6354  done
6355  done
6356IFS=$as_save_IFS
6357  if test -z "$ac_cv_path_SED"; then
6358    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6359  fi
6360else
6361  ac_cv_path_SED=$SED
6362fi
6363
6364fi
6365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6366$as_echo "$ac_cv_path_SED" >&6; }
6367 SED="$ac_cv_path_SED"
6368  rm -f conftest.sed
6369
6370
6371  if test "x$SED" = x; then
6372    if test "x" = x; then
6373      PROG_NAME=sed
6374    else
6375      PROG_NAME=
6376    fi
6377    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6378$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6379    as_fn_error $? "Cannot continue" "$LINENO" 5
6380  fi
6381
6382
6383  for ac_prog in nawk gawk awk
6384do
6385  # Extract the first word of "$ac_prog", so it can be a program name with args.
6386set dummy $ac_prog; ac_word=$2
6387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6388$as_echo_n "checking for $ac_word... " >&6; }
6389if ${ac_cv_path_NAWK+:} false; then :
6390  $as_echo_n "(cached) " >&6
6391else
6392  case $NAWK in
6393  [\\/]* | ?:[\\/]*)
6394  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6395  ;;
6396  *)
6397  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6398for as_dir in $PATH
6399do
6400  IFS=$as_save_IFS
6401  test -z "$as_dir" && as_dir=.
6402    for ac_exec_ext in '' $ac_executable_extensions; do
6403  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6404    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6405    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6406    break 2
6407  fi
6408done
6409  done
6410IFS=$as_save_IFS
6411
6412  ;;
6413esac
6414fi
6415NAWK=$ac_cv_path_NAWK
6416if test -n "$NAWK"; then
6417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6418$as_echo "$NAWK" >&6; }
6419else
6420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6421$as_echo "no" >&6; }
6422fi
6423
6424
6425  test -n "$NAWK" && break
6426done
6427
6428
6429  if test "x$NAWK" = x; then
6430    if test "x" = x; then
6431      PROG_NAME=nawk
6432    else
6433      PROG_NAME=
6434    fi
6435    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6436$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6437    as_fn_error $? "Cannot continue" "$LINENO" 5
6438  fi
6439
6440
6441  # Always force rm.
6442  RM="$RM -f"
6443
6444  # pwd behaves differently on various platforms and some don't support the -L flag.
6445  # Always use the bash builtin pwd to get uniform behavior.
6446  THEPWDCMD=pwd
6447
6448  # These are not required on all platforms
6449  # Extract the first word of "cygpath", so it can be a program name with args.
6450set dummy cygpath; ac_word=$2
6451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6452$as_echo_n "checking for $ac_word... " >&6; }
6453if ${ac_cv_path_CYGPATH+:} false; then :
6454  $as_echo_n "(cached) " >&6
6455else
6456  case $CYGPATH in
6457  [\\/]* | ?:[\\/]*)
6458  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6459  ;;
6460  *)
6461  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6462for as_dir in $PATH
6463do
6464  IFS=$as_save_IFS
6465  test -z "$as_dir" && as_dir=.
6466    for ac_exec_ext in '' $ac_executable_extensions; do
6467  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6468    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6469    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6470    break 2
6471  fi
6472done
6473  done
6474IFS=$as_save_IFS
6475
6476  ;;
6477esac
6478fi
6479CYGPATH=$ac_cv_path_CYGPATH
6480if test -n "$CYGPATH"; then
6481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6482$as_echo "$CYGPATH" >&6; }
6483else
6484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6485$as_echo "no" >&6; }
6486fi
6487
6488
6489  # Extract the first word of "readlink", so it can be a program name with args.
6490set dummy readlink; ac_word=$2
6491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6492$as_echo_n "checking for $ac_word... " >&6; }
6493if ${ac_cv_path_READLINK+:} false; then :
6494  $as_echo_n "(cached) " >&6
6495else
6496  case $READLINK in
6497  [\\/]* | ?:[\\/]*)
6498  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6499  ;;
6500  *)
6501  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6502for as_dir in $PATH
6503do
6504  IFS=$as_save_IFS
6505  test -z "$as_dir" && as_dir=.
6506    for ac_exec_ext in '' $ac_executable_extensions; do
6507  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6508    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6509    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6510    break 2
6511  fi
6512done
6513  done
6514IFS=$as_save_IFS
6515
6516  ;;
6517esac
6518fi
6519READLINK=$ac_cv_path_READLINK
6520if test -n "$READLINK"; then
6521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6522$as_echo "$READLINK" >&6; }
6523else
6524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6525$as_echo "no" >&6; }
6526fi
6527
6528
6529  # Extract the first word of "df", so it can be a program name with args.
6530set dummy df; ac_word=$2
6531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6532$as_echo_n "checking for $ac_word... " >&6; }
6533if ${ac_cv_path_DF+:} false; then :
6534  $as_echo_n "(cached) " >&6
6535else
6536  case $DF in
6537  [\\/]* | ?:[\\/]*)
6538  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6539  ;;
6540  *)
6541  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6542for as_dir in $PATH
6543do
6544  IFS=$as_save_IFS
6545  test -z "$as_dir" && as_dir=.
6546    for ac_exec_ext in '' $ac_executable_extensions; do
6547  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6548    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6549    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6550    break 2
6551  fi
6552done
6553  done
6554IFS=$as_save_IFS
6555
6556  ;;
6557esac
6558fi
6559DF=$ac_cv_path_DF
6560if test -n "$DF"; then
6561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6562$as_echo "$DF" >&6; }
6563else
6564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6565$as_echo "no" >&6; }
6566fi
6567
6568
6569  # Extract the first word of "SetFile", so it can be a program name with args.
6570set dummy SetFile; ac_word=$2
6571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6572$as_echo_n "checking for $ac_word... " >&6; }
6573if ${ac_cv_path_SETFILE+:} false; then :
6574  $as_echo_n "(cached) " >&6
6575else
6576  case $SETFILE in
6577  [\\/]* | ?:[\\/]*)
6578  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6579  ;;
6580  *)
6581  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6582for as_dir in $PATH
6583do
6584  IFS=$as_save_IFS
6585  test -z "$as_dir" && as_dir=.
6586    for ac_exec_ext in '' $ac_executable_extensions; do
6587  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6588    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6589    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6590    break 2
6591  fi
6592done
6593  done
6594IFS=$as_save_IFS
6595
6596  ;;
6597esac
6598fi
6599SETFILE=$ac_cv_path_SETFILE
6600if test -n "$SETFILE"; then
6601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6602$as_echo "$SETFILE" >&6; }
6603else
6604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6605$as_echo "no" >&6; }
6606fi
6607
6608
6609
6610
6611# Now we can determine OpenJDK build and target platforms. This is required to
6612# have early on.
6613# Make sure we can run config.sub.
6614$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6615  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6616
6617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6618$as_echo_n "checking build system type... " >&6; }
6619if ${ac_cv_build+:} false; then :
6620  $as_echo_n "(cached) " >&6
6621else
6622  ac_build_alias=$build_alias
6623test "x$ac_build_alias" = x &&
6624  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6625test "x$ac_build_alias" = x &&
6626  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6627ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6628  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6629
6630fi
6631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6632$as_echo "$ac_cv_build" >&6; }
6633case $ac_cv_build in
6634*-*-*) ;;
6635*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6636esac
6637build=$ac_cv_build
6638ac_save_IFS=$IFS; IFS='-'
6639set x $ac_cv_build
6640shift
6641build_cpu=$1
6642build_vendor=$2
6643shift; shift
6644# Remember, the first character of IFS is used to create $*,
6645# except with old shells:
6646build_os=$*
6647IFS=$ac_save_IFS
6648case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6649
6650
6651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6652$as_echo_n "checking host system type... " >&6; }
6653if ${ac_cv_host+:} false; then :
6654  $as_echo_n "(cached) " >&6
6655else
6656  if test "x$host_alias" = x; then
6657  ac_cv_host=$ac_cv_build
6658else
6659  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6660    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6661fi
6662
6663fi
6664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6665$as_echo "$ac_cv_host" >&6; }
6666case $ac_cv_host in
6667*-*-*) ;;
6668*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6669esac
6670host=$ac_cv_host
6671ac_save_IFS=$IFS; IFS='-'
6672set x $ac_cv_host
6673shift
6674host_cpu=$1
6675host_vendor=$2
6676shift; shift
6677# Remember, the first character of IFS is used to create $*,
6678# except with old shells:
6679host_os=$*
6680IFS=$ac_save_IFS
6681case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6682
6683
6684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6685$as_echo_n "checking target system type... " >&6; }
6686if ${ac_cv_target+:} false; then :
6687  $as_echo_n "(cached) " >&6
6688else
6689  if test "x$target_alias" = x; then
6690  ac_cv_target=$ac_cv_host
6691else
6692  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6693    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6694fi
6695
6696fi
6697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6698$as_echo "$ac_cv_target" >&6; }
6699case $ac_cv_target in
6700*-*-*) ;;
6701*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6702esac
6703target=$ac_cv_target
6704ac_save_IFS=$IFS; IFS='-'
6705set x $ac_cv_target
6706shift
6707target_cpu=$1
6708target_vendor=$2
6709shift; shift
6710# Remember, the first character of IFS is used to create $*,
6711# except with old shells:
6712target_os=$*
6713IFS=$ac_save_IFS
6714case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6715
6716
6717# The aliases save the names the user supplied, while $host etc.
6718# will get canonicalized.
6719test -n "$target_alias" &&
6720  test "$program_prefix$program_suffix$program_transform_name" = \
6721    NONENONEs,x,x, &&
6722  program_prefix=${target_alias}-
6723
6724  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6725  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6726  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
6727  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6728  # to use the configure naming style.
6729
6730
6731
6732
6733
6734  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6735  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6736  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6737  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6738  OPENJDK_TARGET_AUTOCONF_NAME="$host"
6739  OPENJDK_BUILD_AUTOCONF_NAME="$build"
6740
6741
6742
6743  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6744
6745  case "$build_os" in
6746    *linux*)
6747      VAR_OS=linux
6748      VAR_OS_API=posix
6749      VAR_OS_ENV=linux
6750      ;;
6751    *solaris*)
6752      VAR_OS=solaris
6753      VAR_OS_API=posix
6754      VAR_OS_ENV=solaris
6755      ;;
6756    *darwin*)
6757      VAR_OS=macosx
6758      VAR_OS_API=posix
6759      VAR_OS_ENV=macosx
6760      ;;
6761    *bsd*)
6762      VAR_OS=bsd
6763      VAR_OS_API=posix
6764      VAR_OS_ENV=bsd
6765      ;;
6766    *cygwin*)
6767      VAR_OS=windows
6768      VAR_OS_API=winapi
6769      VAR_OS_ENV=windows.cygwin
6770      ;;
6771    *mingw*)
6772      VAR_OS=windows
6773      VAR_OS_API=winapi
6774      VAR_OS_ENV=windows.msys
6775      ;;
6776    *)
6777      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6778      ;;
6779  esac
6780
6781
6782  # First argument is the cpu name from the trip/quad
6783  case "$build_cpu" in
6784    x86_64)
6785      VAR_CPU=x86_64
6786      VAR_CPU_ARCH=x86
6787      VAR_CPU_BITS=64
6788      VAR_CPU_ENDIAN=little
6789      ;;
6790    i?86)
6791      VAR_CPU=x86
6792      VAR_CPU_ARCH=x86
6793      VAR_CPU_BITS=32
6794      VAR_CPU_ENDIAN=little
6795      ;;
6796    arm*)
6797      VAR_CPU=arm
6798      VAR_CPU_ARCH=arm
6799      VAR_CPU_BITS=32
6800      VAR_CPU_ENDIAN=little
6801      ;;
6802    powerpc)
6803      VAR_CPU=ppc
6804      VAR_CPU_ARCH=ppc
6805      VAR_CPU_BITS=32
6806      VAR_CPU_ENDIAN=big
6807      ;;
6808    powerpc64)
6809      VAR_CPU=ppc64
6810      VAR_CPU_ARCH=ppc
6811      VAR_CPU_BITS=64
6812      VAR_CPU_ENDIAN=big
6813      ;;
6814    s390)
6815      VAR_CPU=s390
6816      VAR_CPU_ARCH=s390
6817      VAR_CPU_BITS=32
6818      VAR_CPU_ENDIAN=big
6819      ;;
6820    s390x)
6821      VAR_CPU=s390x
6822      VAR_CPU_ARCH=s390
6823      VAR_CPU_BITS=64
6824      VAR_CPU_ENDIAN=big
6825      ;;
6826    sparc)
6827      VAR_CPU=sparc
6828      VAR_CPU_ARCH=sparc
6829      VAR_CPU_BITS=32
6830      VAR_CPU_ENDIAN=big
6831      ;;
6832    sparcv9)
6833      VAR_CPU=sparcv9
6834      VAR_CPU_ARCH=sparc
6835      VAR_CPU_BITS=64
6836      VAR_CPU_ENDIAN=big
6837      ;;
6838    *)
6839      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6840      ;;
6841  esac
6842
6843  # ..and setup our own variables. (Do this explicitely to facilitate searching)
6844  OPENJDK_BUILD_OS="$VAR_OS"
6845  OPENJDK_BUILD_OS_API="$VAR_OS_API"
6846  OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6847  OPENJDK_BUILD_CPU="$VAR_CPU"
6848  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6849  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6850  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6851
6852
6853
6854
6855
6856
6857
6858  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6859$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6861$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6862
6863  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6864
6865  case "$host_os" in
6866    *linux*)
6867      VAR_OS=linux
6868      VAR_OS_API=posix
6869      VAR_OS_ENV=linux
6870      ;;
6871    *solaris*)
6872      VAR_OS=solaris
6873      VAR_OS_API=posix
6874      VAR_OS_ENV=solaris
6875      ;;
6876    *darwin*)
6877      VAR_OS=macosx
6878      VAR_OS_API=posix
6879      VAR_OS_ENV=macosx
6880      ;;
6881    *bsd*)
6882      VAR_OS=bsd
6883      VAR_OS_API=posix
6884      VAR_OS_ENV=bsd
6885      ;;
6886    *cygwin*)
6887      VAR_OS=windows
6888      VAR_OS_API=winapi
6889      VAR_OS_ENV=windows.cygwin
6890      ;;
6891    *mingw*)
6892      VAR_OS=windows
6893      VAR_OS_API=winapi
6894      VAR_OS_ENV=windows.msys
6895      ;;
6896    *)
6897      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6898      ;;
6899  esac
6900
6901
6902  # First argument is the cpu name from the trip/quad
6903  case "$host_cpu" in
6904    x86_64)
6905      VAR_CPU=x86_64
6906      VAR_CPU_ARCH=x86
6907      VAR_CPU_BITS=64
6908      VAR_CPU_ENDIAN=little
6909      ;;
6910    i?86)
6911      VAR_CPU=x86
6912      VAR_CPU_ARCH=x86
6913      VAR_CPU_BITS=32
6914      VAR_CPU_ENDIAN=little
6915      ;;
6916    arm*)
6917      VAR_CPU=arm
6918      VAR_CPU_ARCH=arm
6919      VAR_CPU_BITS=32
6920      VAR_CPU_ENDIAN=little
6921      ;;
6922    powerpc)
6923      VAR_CPU=ppc
6924      VAR_CPU_ARCH=ppc
6925      VAR_CPU_BITS=32
6926      VAR_CPU_ENDIAN=big
6927      ;;
6928    powerpc64)
6929      VAR_CPU=ppc64
6930      VAR_CPU_ARCH=ppc
6931      VAR_CPU_BITS=64
6932      VAR_CPU_ENDIAN=big
6933      ;;
6934    s390)
6935      VAR_CPU=s390
6936      VAR_CPU_ARCH=s390
6937      VAR_CPU_BITS=32
6938      VAR_CPU_ENDIAN=big
6939      ;;
6940    s390x)
6941      VAR_CPU=s390x
6942      VAR_CPU_ARCH=s390
6943      VAR_CPU_BITS=64
6944      VAR_CPU_ENDIAN=big
6945      ;;
6946    sparc)
6947      VAR_CPU=sparc
6948      VAR_CPU_ARCH=sparc
6949      VAR_CPU_BITS=32
6950      VAR_CPU_ENDIAN=big
6951      ;;
6952    sparcv9)
6953      VAR_CPU=sparcv9
6954      VAR_CPU_ARCH=sparc
6955      VAR_CPU_BITS=64
6956      VAR_CPU_ENDIAN=big
6957      ;;
6958    *)
6959      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6960      ;;
6961  esac
6962
6963  # ... and setup our own variables. (Do this explicitely to facilitate searching)
6964  OPENJDK_TARGET_OS="$VAR_OS"
6965  OPENJDK_TARGET_OS_API="$VAR_OS_API"
6966  OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6967  OPENJDK_TARGET_CPU="$VAR_CPU"
6968  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6969  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6970  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6971
6972
6973
6974
6975
6976
6977
6978  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6979$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6981$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6982
6983
6984
6985# Check whether --with-target-bits was given.
6986if test "${with_target_bits+set}" = set; then :
6987  withval=$with_target_bits;
6988fi
6989
6990
6991  # We have three types of compiles:
6992  # native  == normal compilation, target system == build system
6993  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6994  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6995  #
6996  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6997    # We're doing a proper cross-compilation
6998    COMPILE_TYPE="cross"
6999  else
7000    COMPILE_TYPE="native"
7001  fi
7002
7003  if test "x$with_target_bits" != x; then
7004    if test "x$COMPILE_TYPE" = "xcross"; then
7005      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
7006    fi
7007
7008    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7009      # A reduced build is requested
7010      COMPILE_TYPE="reduced"
7011      OPENJDK_TARGET_CPU_BITS=32
7012      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
7013        OPENJDK_TARGET_CPU=x86
7014      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
7015        OPENJDK_TARGET_CPU=sparc
7016      else
7017        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
7018      fi
7019    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
7020      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
7021    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
7022      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
7023$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
7024    else
7025      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
7026    fi
7027  fi
7028
7029
7030  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
7031$as_echo_n "checking compilation type... " >&6; }
7032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
7033$as_echo "$COMPILE_TYPE" >&6; }
7034
7035
7036  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
7037    REQUIRED_OS_NAME=SunOS
7038    REQUIRED_OS_VERSION=5.10
7039  fi
7040  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
7041    REQUIRED_OS_NAME=Linux
7042    REQUIRED_OS_VERSION=2.6
7043  fi
7044  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7045    REQUIRED_OS_NAME=Windows
7046    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
7047      REQUIRED_OS_VERSION=5.2
7048    else
7049      REQUIRED_OS_VERSION=5.1
7050    fi
7051  fi
7052  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7053    REQUIRED_OS_NAME=Darwin
7054    REQUIRED_OS_VERSION=11.2
7055  fi
7056
7057
7058
7059
7060
7061  # Also store the legacy naming of the cpu.
7062  # Ie i586 and amd64 instead of x86 and x86_64
7063  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
7064  if test "x$OPENJDK_TARGET_CPU" = xx86; then
7065    OPENJDK_TARGET_CPU_LEGACY="i586"
7066  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7067    # On all platforms except MacOSX replace x86_64 with amd64.
7068    OPENJDK_TARGET_CPU_LEGACY="amd64"
7069  fi
7070
7071
7072  # And the second legacy naming of the cpu.
7073  # Ie i386 and amd64 instead of x86 and x86_64.
7074  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
7075  if test "x$OPENJDK_TARGET_CPU" = xx86; then
7076    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
7077  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7078    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
7079  fi
7080
7081
7082  # This is the name of the cpu (but using i386 and amd64 instead of
7083  # x86 and x86_64, respectively), preceeded by a /, to be used when
7084  # locating libraries. On macosx, it's empty, though.
7085  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
7086  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
7087    OPENJDK_TARGET_CPU_LIBDIR=""
7088  fi
7089
7090
7091  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
7092  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
7093  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
7094  OPENJDK_TARGET_CPU_ISADIR=""
7095  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7096    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7097      OPENJDK_TARGET_CPU_ISADIR="/amd64"
7098    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7099      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7100    fi
7101  fi
7102
7103
7104  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7105  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7106  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7107    # On linux only, we replace x86 with i386.
7108    OPENJDK_TARGET_CPU_OSARCH="i386"
7109  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7110    # On all platforms except macosx, we replace x86_64 with amd64.
7111    OPENJDK_TARGET_CPU_OSARCH="amd64"
7112  fi
7113
7114
7115  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7116  if test "x$OPENJDK_TARGET_CPU" = xx86; then
7117    OPENJDK_TARGET_CPU_JLI="i386"
7118  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7119    # On all platforms except macosx, we replace x86_64 with amd64.
7120    OPENJDK_TARGET_CPU_JLI="amd64"
7121  fi
7122  # Now setup the -D flags for building libjli.
7123  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7124  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7125    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7126      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7127    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7128      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7129    fi
7130  fi
7131
7132
7133  # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7134  if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7135    OPENJDK_TARGET_OS_API_DIR="solaris"
7136  fi
7137  if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7138    OPENJDK_TARGET_OS_API_DIR="windows"
7139  fi
7140
7141
7142  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7143    A_LP64="LP64:="
7144    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7145    # unpack200.exe
7146    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7147      ADD_LP64="-D_LP64=1"
7148    fi
7149  fi
7150  LP64=$A_LP64
7151
7152
7153  if test "x$COMPILE_TYPE" = "xcross"; then
7154    # FIXME: ... or should this include reduced builds..?
7155    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7156  else
7157    DEFINE_CROSS_COMPILE_ARCH=""
7158  fi
7159
7160
7161  # ZERO_ARCHDEF is used to enable architecture-specific code
7162  case "${OPENJDK_TARGET_CPU}" in
7163    ppc*)    ZERO_ARCHDEF=PPC   ;;
7164    s390*)   ZERO_ARCHDEF=S390  ;;
7165    sparc*)  ZERO_ARCHDEF=SPARC ;;
7166    x86_64*) ZERO_ARCHDEF=AMD64 ;;
7167    x86)     ZERO_ARCHDEF=IA32  ;;
7168    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
7169  esac
7170
7171
7172
7173
7174# Continue setting up basic stuff. Most remaining code require fundamental tools.
7175
7176  # Locate the directory of this script.
7177  SCRIPT="$0"
7178  AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
7179
7180  # Where is the source? It is located two levels above the configure script.
7181  CURDIR="$PWD"
7182  cd "$AUTOCONF_DIR/../.."
7183  SRC_ROOT="`$THEPWDCMD -L`"
7184
7185  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7186    PATH_SEP=";"
7187
7188  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
7189  if test $SRC_ROOT_LENGTH -gt 100; then
7190    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7191  fi
7192
7193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7194    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7195$as_echo_n "checking cygwin release... " >&6; }
7196    CYGWIN_VERSION=`$UNAME -r`
7197    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7198$as_echo "$CYGWIN_VERSION" >&6; }
7199    WINDOWS_ENV_VENDOR='cygwin'
7200    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7201
7202    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7203    if test "x$CYGWIN_VERSION_OK" = x; then
7204      { $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
7205$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;}
7206      as_fn_error $? "Cannot continue" "$LINENO" 5
7207    fi
7208    if test "x$CYGPATH" = x; then
7209      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7210    fi
7211    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7212$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7213    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7214    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7215    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7216    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7217    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7218$as_echo "$CYGWIN_ROOT_PATH" >&6; }
7219    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7220    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7221    if test "x$test_cygdrive_prefix" = x; then
7222      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7223    fi
7224  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7225    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7226$as_echo_n "checking msys release... " >&6; }
7227    MSYS_VERSION=`$UNAME -r`
7228    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7229$as_echo "$MSYS_VERSION" >&6; }
7230
7231    WINDOWS_ENV_VENDOR='msys'
7232    WINDOWS_ENV_VERSION="$MSYS_VERSION"
7233
7234    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7235$as_echo_n "checking msys root directory as unix-style path... " >&6; }
7236    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7237    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7238
7239  windows_path="$MSYS_ROOT_PATH"
7240  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7241    unix_path=`$CYGPATH -u "$windows_path"`
7242    MSYS_ROOT_PATH="$unix_path"
7243  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7244    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7245    MSYS_ROOT_PATH="$unix_path"
7246  fi
7247
7248    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7249$as_echo "$MSYS_ROOT_PATH" >&6; }
7250    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7251  else
7252    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7253  fi
7254
7255  # Test if windows or unix (cygwin/msys) find is first in path.
7256  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7257$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7258  FIND_BINARY_OUTPUT=`find --version 2>&1`
7259  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7260    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7261$as_echo "unix style" >&6; }
7262  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7263    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7264$as_echo "Windows" >&6; }
7265    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7266$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7267    { $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
7268$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7269    as_fn_error $? "Cannot continue" "$LINENO" 5
7270  else
7271    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7272$as_echo "unknown" >&6; }
7273    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7274$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7275  fi
7276
7277  else
7278    PATH_SEP=":"
7279  fi
7280
7281
7282
7283  cd "$CURDIR"
7284
7285
7286  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7287
7288  # Input might be given as Windows format, start by converting to
7289  # unix format.
7290  path="$SRC_ROOT"
7291  new_path=`$CYGPATH -u "$path"`
7292
7293  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7294  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7295  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7296  # "foo.exe" is OK but "foo" is an error.
7297  #
7298  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7299  # It is also a way to make sure we got the proper file name for the real test later on.
7300  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7301  if test "x$test_shortpath" = x; then
7302    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7303$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7304    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7305  fi
7306
7307  # Call helper function which possibly converts this using DOS-style short mode.
7308  # If so, the updated path is stored in $new_path.
7309
7310  input_path="$new_path"
7311  # Check if we need to convert this using DOS-style short mode. If the path
7312  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7313  # take no chances and rewrite it.
7314  # Note: m4 eats our [], so we need to use [ and ] instead.
7315  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7316  if test "x$has_forbidden_chars" != x; then
7317    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7318    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7319    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7320    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7321      # Going to short mode and back again did indeed matter. Since short mode is
7322      # case insensitive, let's make it lowercase to improve readability.
7323      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7324      # Now convert it back to Unix-stile (cygpath)
7325      input_path=`$CYGPATH -u "$shortmode_path"`
7326      new_path="$input_path"
7327    fi
7328  fi
7329
7330  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7331  if test "x$test_cygdrive_prefix" = x; then
7332    # As a simple fix, exclude /usr/bin since it's not a real path.
7333    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7334      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7335      # a path prefixed by /cygdrive for fixpath to work.
7336      new_path="$CYGWIN_ROOT_PATH$input_path"
7337    fi
7338  fi
7339
7340
7341  if test "x$path" != "x$new_path"; then
7342    SRC_ROOT="$new_path"
7343    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7344$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7345  fi
7346
7347  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7348
7349  path="$SRC_ROOT"
7350  has_colon=`$ECHO $path | $GREP ^.:`
7351  new_path="$path"
7352  if test "x$has_colon" = x; then
7353    # Not in mixed or Windows style, start by that.
7354    new_path=`cmd //c echo $path`
7355  fi
7356
7357
7358  input_path="$new_path"
7359  # Check if we need to convert this using DOS-style short mode. If the path
7360  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7361  # take no chances and rewrite it.
7362  # Note: m4 eats our [], so we need to use [ and ] instead.
7363  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7364  if test "x$has_forbidden_chars" != x; then
7365    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7366    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7367  fi
7368
7369
7370  windows_path="$new_path"
7371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7372    unix_path=`$CYGPATH -u "$windows_path"`
7373    new_path="$unix_path"
7374  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7375    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7376    new_path="$unix_path"
7377  fi
7378
7379  if test "x$path" != "x$new_path"; then
7380    SRC_ROOT="$new_path"
7381    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7382$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7383  fi
7384
7385  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7386  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7387
7388  else
7389    # We're on a posix platform. Hooray! :)
7390    path="$SRC_ROOT"
7391    has_space=`$ECHO "$path" | $GREP " "`
7392    if test "x$has_space" != x; then
7393      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7394$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7395      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7396    fi
7397
7398    # Use eval to expand a potential ~
7399    eval path="$path"
7400    if test ! -f "$path" && test ! -d "$path"; then
7401      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7402    fi
7403
7404    SRC_ROOT="`cd "$path"; $THEPWDCMD -L`"
7405  fi
7406
7407
7408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7409
7410  # Input might be given as Windows format, start by converting to
7411  # unix format.
7412  path="$CURDIR"
7413  new_path=`$CYGPATH -u "$path"`
7414
7415  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7416  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7417  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7418  # "foo.exe" is OK but "foo" is an error.
7419  #
7420  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7421  # It is also a way to make sure we got the proper file name for the real test later on.
7422  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7423  if test "x$test_shortpath" = x; then
7424    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7425$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7426    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7427  fi
7428
7429  # Call helper function which possibly converts this using DOS-style short mode.
7430  # If so, the updated path is stored in $new_path.
7431
7432  input_path="$new_path"
7433  # Check if we need to convert this using DOS-style short mode. If the path
7434  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7435  # take no chances and rewrite it.
7436  # Note: m4 eats our [], so we need to use [ and ] instead.
7437  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7438  if test "x$has_forbidden_chars" != x; then
7439    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7440    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7441    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7442    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7443      # Going to short mode and back again did indeed matter. Since short mode is
7444      # case insensitive, let's make it lowercase to improve readability.
7445      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7446      # Now convert it back to Unix-stile (cygpath)
7447      input_path=`$CYGPATH -u "$shortmode_path"`
7448      new_path="$input_path"
7449    fi
7450  fi
7451
7452  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7453  if test "x$test_cygdrive_prefix" = x; then
7454    # As a simple fix, exclude /usr/bin since it's not a real path.
7455    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7456      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7457      # a path prefixed by /cygdrive for fixpath to work.
7458      new_path="$CYGWIN_ROOT_PATH$input_path"
7459    fi
7460  fi
7461
7462
7463  if test "x$path" != "x$new_path"; then
7464    CURDIR="$new_path"
7465    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7466$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7467  fi
7468
7469  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7470
7471  path="$CURDIR"
7472  has_colon=`$ECHO $path | $GREP ^.:`
7473  new_path="$path"
7474  if test "x$has_colon" = x; then
7475    # Not in mixed or Windows style, start by that.
7476    new_path=`cmd //c echo $path`
7477  fi
7478
7479
7480  input_path="$new_path"
7481  # Check if we need to convert this using DOS-style short mode. If the path
7482  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7483  # take no chances and rewrite it.
7484  # Note: m4 eats our [], so we need to use [ and ] instead.
7485  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7486  if test "x$has_forbidden_chars" != x; then
7487    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7488    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7489  fi
7490
7491
7492  windows_path="$new_path"
7493  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7494    unix_path=`$CYGPATH -u "$windows_path"`
7495    new_path="$unix_path"
7496  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7497    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7498    new_path="$unix_path"
7499  fi
7500
7501  if test "x$path" != "x$new_path"; then
7502    CURDIR="$new_path"
7503    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7504$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7505  fi
7506
7507  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7508  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7509
7510  else
7511    # We're on a posix platform. Hooray! :)
7512    path="$CURDIR"
7513    has_space=`$ECHO "$path" | $GREP " "`
7514    if test "x$has_space" != x; then
7515      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7516$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7517      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7518    fi
7519
7520    # Use eval to expand a potential ~
7521    eval path="$path"
7522    if test ! -f "$path" && test ! -d "$path"; then
7523      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7524    fi
7525
7526    CURDIR="`cd "$path"; $THEPWDCMD -L`"
7527  fi
7528
7529
7530  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7531    # Add extra search paths on solaris for utilities like ar and as etc...
7532    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7533  fi
7534
7535  # You can force the sys-root if the sys-root encoded into the cross compiler tools
7536  # is not correct.
7537
7538# Check whether --with-sys-root was given.
7539if test "${with_sys_root+set}" = set; then :
7540  withval=$with_sys_root;
7541fi
7542
7543
7544  if test "x$with_sys_root" != x; then
7545    SYS_ROOT=$with_sys_root
7546  else
7547    SYS_ROOT=/
7548  fi
7549
7550
7551
7552# Check whether --with-tools-dir was given.
7553if test "${with_tools_dir+set}" = set; then :
7554  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7555
7556fi
7557
7558
7559
7560# Check whether --with-devkit was given.
7561if test "${with_devkit+set}" = set; then :
7562  withval=$with_devkit;
7563        if test "x$with_sys_root" != x; then
7564          as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7565        fi
7566
7567  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7568
7569  # Input might be given as Windows format, start by converting to
7570  # unix format.
7571  path="$with_devkit"
7572  new_path=`$CYGPATH -u "$path"`
7573
7574  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7575  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7576  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7577  # "foo.exe" is OK but "foo" is an error.
7578  #
7579  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7580  # It is also a way to make sure we got the proper file name for the real test later on.
7581  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7582  if test "x$test_shortpath" = x; then
7583    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7584$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7585    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
7586  fi
7587
7588  # Call helper function which possibly converts this using DOS-style short mode.
7589  # If so, the updated path is stored in $new_path.
7590
7591  input_path="$new_path"
7592  # Check if we need to convert this using DOS-style short mode. If the path
7593  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7594  # take no chances and rewrite it.
7595  # Note: m4 eats our [], so we need to use [ and ] instead.
7596  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7597  if test "x$has_forbidden_chars" != x; then
7598    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7599    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7600    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7601    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7602      # Going to short mode and back again did indeed matter. Since short mode is
7603      # case insensitive, let's make it lowercase to improve readability.
7604      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7605      # Now convert it back to Unix-stile (cygpath)
7606      input_path=`$CYGPATH -u "$shortmode_path"`
7607      new_path="$input_path"
7608    fi
7609  fi
7610
7611  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7612  if test "x$test_cygdrive_prefix" = x; then
7613    # As a simple fix, exclude /usr/bin since it's not a real path.
7614    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7615      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7616      # a path prefixed by /cygdrive for fixpath to work.
7617      new_path="$CYGWIN_ROOT_PATH$input_path"
7618    fi
7619  fi
7620
7621
7622  if test "x$path" != "x$new_path"; then
7623    with_devkit="$new_path"
7624    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7625$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7626  fi
7627
7628  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7629
7630  path="$with_devkit"
7631  has_colon=`$ECHO $path | $GREP ^.:`
7632  new_path="$path"
7633  if test "x$has_colon" = x; then
7634    # Not in mixed or Windows style, start by that.
7635    new_path=`cmd //c echo $path`
7636  fi
7637
7638
7639  input_path="$new_path"
7640  # Check if we need to convert this using DOS-style short mode. If the path
7641  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7642  # take no chances and rewrite it.
7643  # Note: m4 eats our [], so we need to use [ and ] instead.
7644  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7645  if test "x$has_forbidden_chars" != x; then
7646    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7647    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7648  fi
7649
7650
7651  windows_path="$new_path"
7652  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7653    unix_path=`$CYGPATH -u "$windows_path"`
7654    new_path="$unix_path"
7655  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7656    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7657    new_path="$unix_path"
7658  fi
7659
7660  if test "x$path" != "x$new_path"; then
7661    with_devkit="$new_path"
7662    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7663$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7664  fi
7665
7666  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7667  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7668
7669  else
7670    # We're on a posix platform. Hooray! :)
7671    path="$with_devkit"
7672    has_space=`$ECHO "$path" | $GREP " "`
7673    if test "x$has_space" != x; then
7674      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7675$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7676      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7677    fi
7678
7679    # Use eval to expand a potential ~
7680    eval path="$path"
7681    if test ! -f "$path" && test ! -d "$path"; then
7682      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
7683    fi
7684
7685    with_devkit="`cd "$path"; $THEPWDCMD -L`"
7686  fi
7687
7688
7689  if test "x$TOOLS_DIR" = x; then
7690    TOOLS_DIR="$with_devkit/bin"
7691  else
7692    TOOLS_DIR="$TOOLS_DIR:$with_devkit/bin"
7693  fi
7694
7695        if test -d "$with_devkit/$host_alias/libc"; then
7696          SYS_ROOT=$with_devkit/$host_alias/libc
7697        elif test -d "$with_devkit/$host/sys-root"; then
7698          SYS_ROOT=$with_devkit/$host/sys-root
7699        fi
7700
7701fi
7702
7703
7704
7705  # Setup default logging of stdout and stderr to build.log in the output root.
7706  BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7707  BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7708  BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7709
7710
7711
7712
7713
7714# Check if it's a pure open build or if custom sources are to be used.
7715
7716  # Check whether --enable-openjdk-only was given.
7717if test "${enable_openjdk_only+set}" = set; then :
7718  enableval=$enable_openjdk_only;
7719else
7720  enable_openjdk_only="no"
7721fi
7722
7723
7724  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7725$as_echo_n "checking for presence of closed sources... " >&6; }
7726  if test -d "$SRC_ROOT/jdk/src/closed"; then
7727    CLOSED_SOURCE_PRESENT=yes
7728  else
7729    CLOSED_SOURCE_PRESENT=no
7730  fi
7731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7732$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7733
7734  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7735$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7736  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7738$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7739
7740  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7741    OPENJDK=true
7742    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7743      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7744$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7745    fi
7746  else
7747    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7748      OPENJDK=true
7749    else
7750      OPENJDK=false
7751    fi
7752  fi
7753
7754  if test "x$OPENJDK" = "xtrue"; then
7755    SET_OPENJDK="OPENJDK=true"
7756  fi
7757
7758
7759
7760
7761# These are needed to be able to create a configuration name (and thus the output directory)
7762
7763  ###############################################################################
7764  #
7765  # Check which variant of the JDK that we want to build.
7766  # Currently we have:
7767  #    normal:   standard edition
7768  # but the custom make system may add other variants
7769  #
7770  # Effectively the JDK variant gives a name to a specific set of
7771  # modules to compile into the JDK. In the future, these modules
7772  # might even be Jigsaw modules.
7773  #
7774  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7775$as_echo_n "checking which variant of the JDK to build... " >&6; }
7776
7777# Check whether --with-jdk-variant was given.
7778if test "${with_jdk_variant+set}" = set; then :
7779  withval=$with_jdk_variant;
7780fi
7781
7782
7783  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7784    JDK_VARIANT="normal"
7785  else
7786    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7787  fi
7788
7789
7790
7791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7792$as_echo "$JDK_VARIANT" >&6; }
7793
7794
7795
7796  ###############################################################################
7797  #
7798  # Check which variants of the JVM that we want to build.
7799  # Currently we have:
7800  #    server: normal interpreter and a tiered C1/C2 compiler
7801  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7802  #    minimal1: reduced form of client with optional VM services and features stripped out
7803  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7804  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7805  #    zero: no machine code interpreter, no compiler
7806  #    zeroshark: zero interpreter and shark/llvm compiler backend
7807  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7808$as_echo_n "checking which variants of the JVM to build... " >&6; }
7809
7810# Check whether --with-jvm-variants was given.
7811if test "${with_jvm_variants+set}" = set; then :
7812  withval=$with_jvm_variants;
7813fi
7814
7815
7816  if test "x$with_jvm_variants" = x; then
7817    with_jvm_variants="server"
7818  fi
7819
7820  JVM_VARIANTS=",$with_jvm_variants,"
7821  TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7822
7823  if test "x$TEST_VARIANTS" != "x,"; then
7824    as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7825  fi
7826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7827$as_echo "$with_jvm_variants" >&6; }
7828
7829  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7830  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7831  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7832  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7833  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7834  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7835
7836  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7837    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7838      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7839    fi
7840  fi
7841  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7842    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7843      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7844    fi
7845  fi
7846  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7847    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7848      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7849    fi
7850  fi
7851
7852  # Replace the commas with AND for use in the build directory name.
7853  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7854  COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/'`
7855  if test "x$COUNT_VARIANTS" != "x,1"; then
7856    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7857  else
7858    BUILDING_MULTIPLE_JVM_VARIANTS=no
7859  fi
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869  INCLUDE_SA=true
7870  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
7871    INCLUDE_SA=false
7872  fi
7873  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
7874    INCLUDE_SA=false
7875  fi
7876
7877
7878  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7879    MACOSX_UNIVERSAL="true"
7880  fi
7881
7882
7883
7884
7885  ###############################################################################
7886  #
7887  # Set the debug level
7888  #    release: no debug information, all optimizations, no asserts.
7889  #    fastdebug: debug information (-g), all optimizations, all asserts
7890  #    slowdebug: debug information (-g), no optimizations, all asserts
7891  #
7892  DEBUG_LEVEL="release"
7893  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7894$as_echo_n "checking which debug level to use... " >&6; }
7895  # Check whether --enable-debug was given.
7896if test "${enable_debug+set}" = set; then :
7897  enableval=$enable_debug;
7898        ENABLE_DEBUG="${enableval}"
7899        DEBUG_LEVEL="fastdebug"
7900
7901else
7902  ENABLE_DEBUG="no"
7903fi
7904
7905
7906
7907# Check whether --with-debug-level was given.
7908if test "${with_debug_level+set}" = set; then :
7909  withval=$with_debug_level;
7910        DEBUG_LEVEL="${withval}"
7911        if test "x$ENABLE_DEBUG" = xyes; then
7912          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7913        fi
7914
7915fi
7916
7917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7918$as_echo "$DEBUG_LEVEL" >&6; }
7919
7920  if test "x$DEBUG_LEVEL" != xrelease && \
7921      test "x$DEBUG_LEVEL" != xfastdebug && \
7922      test "x$DEBUG_LEVEL" != xslowdebug; then
7923    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7924  fi
7925
7926
7927  ###############################################################################
7928  #
7929  # Setup legacy vars/targets and new vars to deal with different debug levels.
7930  #
7931
7932  case $DEBUG_LEVEL in
7933    release )
7934      VARIANT="OPT"
7935      FASTDEBUG="false"
7936      DEBUG_CLASSFILES="false"
7937      BUILD_VARIANT_RELEASE=""
7938      HOTSPOT_DEBUG_LEVEL="product"
7939      HOTSPOT_EXPORT="product"
7940      ;;
7941    fastdebug )
7942      VARIANT="DBG"
7943      FASTDEBUG="true"
7944      DEBUG_CLASSFILES="true"
7945      BUILD_VARIANT_RELEASE="-fastdebug"
7946      HOTSPOT_DEBUG_LEVEL="fastdebug"
7947      HOTSPOT_EXPORT="fastdebug"
7948      ;;
7949    slowdebug )
7950      VARIANT="DBG"
7951      FASTDEBUG="false"
7952      DEBUG_CLASSFILES="true"
7953      BUILD_VARIANT_RELEASE="-debug"
7954      HOTSPOT_DEBUG_LEVEL="jvmg"
7955      HOTSPOT_EXPORT="debug"
7956      ;;
7957  esac
7958
7959  #####
7960  # Generate the legacy makefile targets for hotspot.
7961  # The hotspot api for selecting the build artifacts, really, needs to be improved.
7962  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7963  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7964  # But until then ...
7965  HOTSPOT_TARGET=""
7966
7967  if test "x$JVM_VARIANT_SERVER" = xtrue; then
7968    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7969  fi
7970
7971  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7972    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7973  fi
7974
7975  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7976    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7977  fi
7978
7979  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7980    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7981  fi
7982
7983  if test "x$JVM_VARIANT_ZERO" = xtrue; then
7984    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7985  fi
7986
7987  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7988    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7989  fi
7990
7991  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7992
7993  # On Macosx universal binaries are produced, but they only contain
7994  # 64 bit intel. This invalidates control of which jvms are built
7995  # from configure, but only server is valid anyway. Fix this
7996  # when hotspot makefiles are rewritten.
7997  if test "x$MACOSX_UNIVERSAL" = xtrue; then
7998    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7999  fi
8000
8001  #####
8002
8003
8004
8005
8006
8007
8008
8009
8010# With basic setup done, call the custom early hook.
8011
8012
8013# To properly create a configuration name, we need to have the OpenJDK target
8014# and options (variants and debug level) parsed.
8015
8016
8017
8018# Check whether --with-conf-name was given.
8019if test "${with_conf_name+set}" = set; then :
8020  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
8021fi
8022
8023
8024  # Test from where we are running configure, in or outside of src root.
8025  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
8026      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
8027      || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
8028    # We are running configure from the src root.
8029    # Create a default ./build/target-variant-debuglevel output root.
8030    if test "x${CONF_NAME}" = x; then
8031      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
8032    fi
8033    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
8034    $MKDIR -p "$OUTPUT_ROOT"
8035    if test ! -d "$OUTPUT_ROOT"; then
8036      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
8037    fi
8038  else
8039    # We are running configure from outside of the src dir.
8040    # Then use the current directory as output dir!
8041    # If configuration is situated in normal build directory, just use the build
8042    # directory name as configuration name, otherwise use the complete path.
8043    if test "x${CONF_NAME}" = x; then
8044      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
8045    fi
8046    OUTPUT_ROOT="$CURDIR"
8047
8048    # WARNING: This might be a bad thing to do. You need to be sure you want to
8049    # have a configuration in this directory. Do some sanity checks!
8050
8051    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
8052      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
8053      # other files
8054      files_present=`$LS $OUTPUT_ROOT`
8055      # Configure has already touched config.log and confdefs.h in the current dir when this check
8056      # is performed.
8057      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
8058      | $TR -d '\n'`
8059      if test "x$filtered_files" != x; then
8060        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
8061$as_echo "$as_me: Current directory is $CURDIR." >&6;}
8062        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
8063$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
8064        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
8065$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
8066        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
8067$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
8068        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
8069$as_echo "$as_me: seriously mess up just about everything." >&6;}
8070        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
8071$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
8072        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
8073$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
8074        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
8075      fi
8076    fi
8077  fi
8078  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
8079$as_echo_n "checking what configuration name to use... " >&6; }
8080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
8081$as_echo "$CONF_NAME" >&6; }
8082
8083
8084  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8085
8086  # Input might be given as Windows format, start by converting to
8087  # unix format.
8088  path="$OUTPUT_ROOT"
8089  new_path=`$CYGPATH -u "$path"`
8090
8091  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8092  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8093  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8094  # "foo.exe" is OK but "foo" is an error.
8095  #
8096  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8097  # It is also a way to make sure we got the proper file name for the real test later on.
8098  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8099  if test "x$test_shortpath" = x; then
8100    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8101$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8102    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
8103  fi
8104
8105  # Call helper function which possibly converts this using DOS-style short mode.
8106  # If so, the updated path is stored in $new_path.
8107
8108  input_path="$new_path"
8109  # Check if we need to convert this using DOS-style short mode. If the path
8110  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8111  # take no chances and rewrite it.
8112  # Note: m4 eats our [], so we need to use [ and ] instead.
8113  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8114  if test "x$has_forbidden_chars" != x; then
8115    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8116    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8117    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8118    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8119      # Going to short mode and back again did indeed matter. Since short mode is
8120      # case insensitive, let's make it lowercase to improve readability.
8121      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8122      # Now convert it back to Unix-stile (cygpath)
8123      input_path=`$CYGPATH -u "$shortmode_path"`
8124      new_path="$input_path"
8125    fi
8126  fi
8127
8128  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8129  if test "x$test_cygdrive_prefix" = x; then
8130    # As a simple fix, exclude /usr/bin since it's not a real path.
8131    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
8132      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8133      # a path prefixed by /cygdrive for fixpath to work.
8134      new_path="$CYGWIN_ROOT_PATH$input_path"
8135    fi
8136  fi
8137
8138
8139  if test "x$path" != "x$new_path"; then
8140    OUTPUT_ROOT="$new_path"
8141    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8142$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8143  fi
8144
8145  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8146
8147  path="$OUTPUT_ROOT"
8148  has_colon=`$ECHO $path | $GREP ^.:`
8149  new_path="$path"
8150  if test "x$has_colon" = x; then
8151    # Not in mixed or Windows style, start by that.
8152    new_path=`cmd //c echo $path`
8153  fi
8154
8155
8156  input_path="$new_path"
8157  # Check if we need to convert this using DOS-style short mode. If the path
8158  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8159  # take no chances and rewrite it.
8160  # Note: m4 eats our [], so we need to use [ and ] instead.
8161  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8162  if test "x$has_forbidden_chars" != x; then
8163    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8164    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8165  fi
8166
8167
8168  windows_path="$new_path"
8169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8170    unix_path=`$CYGPATH -u "$windows_path"`
8171    new_path="$unix_path"
8172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8173    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8174    new_path="$unix_path"
8175  fi
8176
8177  if test "x$path" != "x$new_path"; then
8178    OUTPUT_ROOT="$new_path"
8179    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8180$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8181  fi
8182
8183  # Save the first 10 bytes of this path to the storage, so fixpath can work.
8184  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8185
8186  else
8187    # We're on a posix platform. Hooray! :)
8188    path="$OUTPUT_ROOT"
8189    has_space=`$ECHO "$path" | $GREP " "`
8190    if test "x$has_space" != x; then
8191      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8192$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8193      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8194    fi
8195
8196    # Use eval to expand a potential ~
8197    eval path="$path"
8198    if test ! -f "$path" && test ! -d "$path"; then
8199      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8200    fi
8201
8202    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
8203  fi
8204
8205
8206  SPEC=$OUTPUT_ROOT/spec.gmk
8207
8208  CONF_NAME=$CONF_NAME
8209
8210  OUTPUT_ROOT=$OUTPUT_ROOT
8211
8212
8213  # Most of the probed defines are put into config.h
8214  ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8215
8216  # The spec.gmk file contains all variables for the make system.
8217  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8218
8219  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8220  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8221
8222  # The bootcycle-spec.gmk file contains support for boot cycle builds.
8223  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8224
8225  # The compare.sh is used to compare the build output to other builds.
8226  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8227
8228  # Spec.sh is currently used by compare-objects.sh
8229  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8230
8231  # The generated Makefile knows where the spec.gmk is and where the source is.
8232  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8233  # which will look for generated configurations
8234  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8235
8236
8237  # Save the arguments given to us
8238  echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8239
8240
8241# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8242
8243  for ac_prog in apt-get yum port pkgutil pkgadd
8244do
8245  # Extract the first word of "$ac_prog", so it can be a program name with args.
8246set dummy $ac_prog; ac_word=$2
8247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8248$as_echo_n "checking for $ac_word... " >&6; }
8249if ${ac_cv_prog_PKGHANDLER+:} false; then :
8250  $as_echo_n "(cached) " >&6
8251else
8252  if test -n "$PKGHANDLER"; then
8253  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8254else
8255as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8256for as_dir in $PATH
8257do
8258  IFS=$as_save_IFS
8259  test -z "$as_dir" && as_dir=.
8260    for ac_exec_ext in '' $ac_executable_extensions; do
8261  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8262    ac_cv_prog_PKGHANDLER="$ac_prog"
8263    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8264    break 2
8265  fi
8266done
8267  done
8268IFS=$as_save_IFS
8269
8270fi
8271fi
8272PKGHANDLER=$ac_cv_prog_PKGHANDLER
8273if test -n "$PKGHANDLER"; then
8274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8275$as_echo "$PKGHANDLER" >&6; }
8276else
8277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8278$as_echo "no" >&6; }
8279fi
8280
8281
8282  test -n "$PKGHANDLER" && break
8283done
8284
8285
8286
8287# Setup tools that requires more complex handling, or that is not needed by the configure script.
8288
8289
8290  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8291  if test "x$MAKE" != x; then
8292    # User has supplied a make, test it.
8293    if test ! -f "$MAKE"; then
8294      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8295    fi
8296
8297  MAKE_CANDIDATE=""$MAKE""
8298  DESCRIPTION="user supplied MAKE=$MAKE"
8299  if test "x$MAKE_CANDIDATE" != x; then
8300    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8301$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8302    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8303    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8304    if test "x$IS_GNU_MAKE" = x; then
8305      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8306$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8307    else
8308      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '\(3\.8[12]\)\|\(4\.\)'`
8309      if test "x$IS_MODERN_MAKE" = x; then
8310        { $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
8311$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;}
8312      else
8313        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8314          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8315            MAKE_EXPECTED_ENV='cygwin'
8316          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8317            MAKE_EXPECTED_ENV='msys'
8318          else
8319            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8320          fi
8321          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8322          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8323        else
8324          # Not relevant for non-Windows
8325          IS_MAKE_CORRECT_ENV=true
8326        fi
8327        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8328          { $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
8329$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;}
8330        else
8331          FOUND_MAKE=$MAKE_CANDIDATE
8332
8333  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8334
8335  # First separate the path from the arguments. This will split at the first
8336  # space.
8337  complete="$FOUND_MAKE"
8338  path="${complete%% *}"
8339  tmp="$complete EOL"
8340  arguments="${tmp#* }"
8341
8342  # Input might be given as Windows format, start by converting to
8343  # unix format.
8344  new_path=`$CYGPATH -u "$path"`
8345
8346  # Now try to locate executable using which
8347  new_path=`$WHICH "$new_path" 2> /dev/null`
8348  # bat and cmd files are not always considered executable in cygwin causing which
8349  # to not find them
8350  if test "x$new_path" = x \
8351      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8352      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8353    new_path=`$CYGPATH -u "$path"`
8354  fi
8355  if test "x$new_path" = x; then
8356    # Oops. Which didn't find the executable.
8357    # The splitting of arguments from the executable at a space might have been incorrect,
8358    # since paths with space are more likely in Windows. Give it another try with the whole
8359    # argument.
8360    path="$complete"
8361    arguments="EOL"
8362    new_path=`$CYGPATH -u "$path"`
8363    new_path=`$WHICH "$new_path" 2> /dev/null`
8364    # bat and cmd files are not always considered executable in cygwin causing which
8365    # to not find them
8366    if test "x$new_path" = x \
8367        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8368        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8369      new_path=`$CYGPATH -u "$path"`
8370    fi
8371    if test "x$new_path" = x; then
8372      # It's still not found. Now this is an unrecoverable error.
8373      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8374$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8375      has_space=`$ECHO "$complete" | $GREP " "`
8376      if test "x$has_space" != x; then
8377        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8378$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8379      fi
8380      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8381    fi
8382  fi
8383
8384  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8385  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8386  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8387  # "foo.exe" is OK but "foo" is an error.
8388  #
8389  # This test is therefore slightly more accurate than "test -f" to check for file presence.
8390  # It is also a way to make sure we got the proper file name for the real test later on.
8391  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8392  if test "x$test_shortpath" = x; then
8393    # Short path failed, file does not exist as specified.
8394    # Try adding .exe or .cmd
8395    if test -f "${new_path}.exe"; then
8396      input_to_shortpath="${new_path}.exe"
8397    elif test -f "${new_path}.cmd"; then
8398      input_to_shortpath="${new_path}.cmd"
8399    else
8400      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8401$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8402      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8403$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8404      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8405    fi
8406  else
8407    input_to_shortpath="$new_path"
8408  fi
8409
8410  # Call helper function which possibly converts this using DOS-style short mode.
8411  # If so, the updated path is stored in $new_path.
8412  new_path="$input_to_shortpath"
8413
8414  input_path="$input_to_shortpath"
8415  # Check if we need to convert this using DOS-style short mode. If the path
8416  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8417  # take no chances and rewrite it.
8418  # Note: m4 eats our [], so we need to use [ and ] instead.
8419  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8420  if test "x$has_forbidden_chars" != x; then
8421    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8422    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8423    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8424    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8425      # Going to short mode and back again did indeed matter. Since short mode is
8426      # case insensitive, let's make it lowercase to improve readability.
8427      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8428      # Now convert it back to Unix-stile (cygpath)
8429      input_path=`$CYGPATH -u "$shortmode_path"`
8430      new_path="$input_path"
8431    fi
8432  fi
8433
8434  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8435  if test "x$test_cygdrive_prefix" = x; then
8436    # As a simple fix, exclude /usr/bin since it's not a real path.
8437    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8438      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8439      # a path prefixed by /cygdrive for fixpath to work.
8440      new_path="$CYGWIN_ROOT_PATH$input_path"
8441    fi
8442  fi
8443
8444  # remove trailing .exe if any
8445  new_path="${new_path/%.exe/}"
8446
8447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8448
8449  # First separate the path from the arguments. This will split at the first
8450  # space.
8451  complete="$FOUND_MAKE"
8452  path="${complete%% *}"
8453  tmp="$complete EOL"
8454  arguments="${tmp#* }"
8455
8456  # Input might be given as Windows format, start by converting to
8457  # unix format.
8458  new_path="$path"
8459
8460  windows_path="$new_path"
8461  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8462    unix_path=`$CYGPATH -u "$windows_path"`
8463    new_path="$unix_path"
8464  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8465    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8466    new_path="$unix_path"
8467  fi
8468
8469
8470  # Now try to locate executable using which
8471  new_path=`$WHICH "$new_path" 2> /dev/null`
8472
8473  if test "x$new_path" = x; then
8474    # Oops. Which didn't find the executable.
8475    # The splitting of arguments from the executable at a space might have been incorrect,
8476    # since paths with space are more likely in Windows. Give it another try with the whole
8477    # argument.
8478    path="$complete"
8479    arguments="EOL"
8480    new_path="$path"
8481
8482  windows_path="$new_path"
8483  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8484    unix_path=`$CYGPATH -u "$windows_path"`
8485    new_path="$unix_path"
8486  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8487    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8488    new_path="$unix_path"
8489  fi
8490
8491
8492    new_path=`$WHICH "$new_path" 2> /dev/null`
8493
8494    if test "x$new_path" = x; then
8495      # It's still not found. Now this is an unrecoverable error.
8496      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8497$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8498      has_space=`$ECHO "$complete" | $GREP " "`
8499      if test "x$has_space" != x; then
8500        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8501$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8502      fi
8503      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8504    fi
8505  fi
8506
8507  # Now new_path has a complete unix path to the binary
8508  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8509    # Keep paths in /bin as-is, but remove trailing .exe if any
8510    new_path="${new_path/%.exe/}"
8511    # Do not save /bin paths to all_fixpath_prefixes!
8512  else
8513    # Not in mixed or Windows style, start by that.
8514    new_path=`cmd //c echo $new_path`
8515
8516  input_path="$new_path"
8517  # Check if we need to convert this using DOS-style short mode. If the path
8518  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8519  # take no chances and rewrite it.
8520  # Note: m4 eats our [], so we need to use [ and ] instead.
8521  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8522  if test "x$has_forbidden_chars" != x; then
8523    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8524    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8525  fi
8526
8527    # Output is in $new_path
8528
8529  windows_path="$new_path"
8530  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8531    unix_path=`$CYGPATH -u "$windows_path"`
8532    new_path="$unix_path"
8533  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8534    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8535    new_path="$unix_path"
8536  fi
8537
8538    # remove trailing .exe if any
8539    new_path="${new_path/%.exe/}"
8540
8541    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8542    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8543  fi
8544
8545  else
8546    # We're on a posix platform. Hooray! :)
8547    # First separate the path from the arguments. This will split at the first
8548    # space.
8549    complete="$FOUND_MAKE"
8550    path="${complete%% *}"
8551    tmp="$complete EOL"
8552    arguments="${tmp#* }"
8553
8554    # Cannot rely on the command "which" here since it doesn't always work.
8555    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8556    if test -z "$is_absolute_path"; then
8557      # Path to executable is not absolute. Find it.
8558      IFS_save="$IFS"
8559      IFS=:
8560      for p in $PATH; do
8561        if test -f "$p/$path" && test -x "$p/$path"; then
8562          new_path="$p/$path"
8563          break
8564        fi
8565      done
8566      IFS="$IFS_save"
8567    else
8568      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8569$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8570      new_path="$path"
8571    fi
8572
8573    if test "x$new_path" = x; then
8574      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8575$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8576      has_space=`$ECHO "$complete" | $GREP " "`
8577      if test "x$has_space" != x; then
8578        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8579$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8580      fi
8581      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8582    fi
8583  fi
8584
8585  # Now join together the path and the arguments once again
8586  if test "x$arguments" != xEOL; then
8587    new_complete="$new_path ${arguments% *}"
8588  else
8589    new_complete="$new_path"
8590  fi
8591
8592  if test "x$complete" != "x$new_complete"; then
8593    FOUND_MAKE="$new_complete"
8594    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8595$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8596  fi
8597
8598        fi
8599      fi
8600    fi
8601  fi
8602
8603    if test "x$FOUND_MAKE" = x; then
8604      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8605    fi
8606  else
8607    # Try our hardest to locate a correct version of GNU make
8608    for ac_prog in gmake
8609do
8610  # Extract the first word of "$ac_prog", so it can be a program name with args.
8611set dummy $ac_prog; ac_word=$2
8612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8613$as_echo_n "checking for $ac_word... " >&6; }
8614if ${ac_cv_path_CHECK_GMAKE+:} false; then :
8615  $as_echo_n "(cached) " >&6
8616else
8617  case $CHECK_GMAKE in
8618  [\\/]* | ?:[\\/]*)
8619  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8620  ;;
8621  *)
8622  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8623for as_dir in $PATH
8624do
8625  IFS=$as_save_IFS
8626  test -z "$as_dir" && as_dir=.
8627    for ac_exec_ext in '' $ac_executable_extensions; do
8628  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8629    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8630    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8631    break 2
8632  fi
8633done
8634  done
8635IFS=$as_save_IFS
8636
8637  ;;
8638esac
8639fi
8640CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8641if test -n "$CHECK_GMAKE"; then
8642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8643$as_echo "$CHECK_GMAKE" >&6; }
8644else
8645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8646$as_echo "no" >&6; }
8647fi
8648
8649
8650  test -n "$CHECK_GMAKE" && break
8651done
8652
8653
8654  MAKE_CANDIDATE=""$CHECK_GMAKE""
8655  DESCRIPTION="gmake in PATH"
8656  if test "x$MAKE_CANDIDATE" != x; then
8657    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8658$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8659    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8660    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8661    if test "x$IS_GNU_MAKE" = x; then
8662      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8663$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8664    else
8665      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '\(3\.8[12]\)\|\(4\.\)'`
8666      if test "x$IS_MODERN_MAKE" = x; then
8667        { $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
8668$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;}
8669      else
8670        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8671          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8672            MAKE_EXPECTED_ENV='cygwin'
8673          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8674            MAKE_EXPECTED_ENV='msys'
8675          else
8676            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8677          fi
8678          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8679          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8680        else
8681          # Not relevant for non-Windows
8682          IS_MAKE_CORRECT_ENV=true
8683        fi
8684        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8685          { $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
8686$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;}
8687        else
8688          FOUND_MAKE=$MAKE_CANDIDATE
8689
8690  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8691
8692  # First separate the path from the arguments. This will split at the first
8693  # space.
8694  complete="$FOUND_MAKE"
8695  path="${complete%% *}"
8696  tmp="$complete EOL"
8697  arguments="${tmp#* }"
8698
8699  # Input might be given as Windows format, start by converting to
8700  # unix format.
8701  new_path=`$CYGPATH -u "$path"`
8702
8703  # Now try to locate executable using which
8704  new_path=`$WHICH "$new_path" 2> /dev/null`
8705  # bat and cmd files are not always considered executable in cygwin causing which
8706  # to not find them
8707  if test "x$new_path" = x \
8708      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8709      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8710    new_path=`$CYGPATH -u "$path"`
8711  fi
8712  if test "x$new_path" = x; then
8713    # Oops. Which didn't find the executable.
8714    # The splitting of arguments from the executable at a space might have been incorrect,
8715    # since paths with space are more likely in Windows. Give it another try with the whole
8716    # argument.
8717    path="$complete"
8718    arguments="EOL"
8719    new_path=`$CYGPATH -u "$path"`
8720    new_path=`$WHICH "$new_path" 2> /dev/null`
8721    # bat and cmd files are not always considered executable in cygwin causing which
8722    # to not find them
8723    if test "x$new_path" = x \
8724        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8725        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8726      new_path=`$CYGPATH -u "$path"`
8727    fi
8728    if test "x$new_path" = x; then
8729      # It's still not found. Now this is an unrecoverable error.
8730      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8731$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8732      has_space=`$ECHO "$complete" | $GREP " "`
8733      if test "x$has_space" != x; then
8734        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8735$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8736      fi
8737      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8738    fi
8739  fi
8740
8741  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8742  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8743  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8744  # "foo.exe" is OK but "foo" is an error.
8745  #
8746  # This test is therefore slightly more accurate than "test -f" to check for file presence.
8747  # It is also a way to make sure we got the proper file name for the real test later on.
8748  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8749  if test "x$test_shortpath" = x; then
8750    # Short path failed, file does not exist as specified.
8751    # Try adding .exe or .cmd
8752    if test -f "${new_path}.exe"; then
8753      input_to_shortpath="${new_path}.exe"
8754    elif test -f "${new_path}.cmd"; then
8755      input_to_shortpath="${new_path}.cmd"
8756    else
8757      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8758$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8759      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8760$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8761      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8762    fi
8763  else
8764    input_to_shortpath="$new_path"
8765  fi
8766
8767  # Call helper function which possibly converts this using DOS-style short mode.
8768  # If so, the updated path is stored in $new_path.
8769  new_path="$input_to_shortpath"
8770
8771  input_path="$input_to_shortpath"
8772  # Check if we need to convert this using DOS-style short mode. If the path
8773  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8774  # take no chances and rewrite it.
8775  # Note: m4 eats our [], so we need to use [ and ] instead.
8776  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8777  if test "x$has_forbidden_chars" != x; then
8778    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8779    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8780    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8781    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8782      # Going to short mode and back again did indeed matter. Since short mode is
8783      # case insensitive, let's make it lowercase to improve readability.
8784      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8785      # Now convert it back to Unix-stile (cygpath)
8786      input_path=`$CYGPATH -u "$shortmode_path"`
8787      new_path="$input_path"
8788    fi
8789  fi
8790
8791  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8792  if test "x$test_cygdrive_prefix" = x; then
8793    # As a simple fix, exclude /usr/bin since it's not a real path.
8794    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8795      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8796      # a path prefixed by /cygdrive for fixpath to work.
8797      new_path="$CYGWIN_ROOT_PATH$input_path"
8798    fi
8799  fi
8800
8801  # remove trailing .exe if any
8802  new_path="${new_path/%.exe/}"
8803
8804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8805
8806  # First separate the path from the arguments. This will split at the first
8807  # space.
8808  complete="$FOUND_MAKE"
8809  path="${complete%% *}"
8810  tmp="$complete EOL"
8811  arguments="${tmp#* }"
8812
8813  # Input might be given as Windows format, start by converting to
8814  # unix format.
8815  new_path="$path"
8816
8817  windows_path="$new_path"
8818  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8819    unix_path=`$CYGPATH -u "$windows_path"`
8820    new_path="$unix_path"
8821  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8822    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8823    new_path="$unix_path"
8824  fi
8825
8826
8827  # Now try to locate executable using which
8828  new_path=`$WHICH "$new_path" 2> /dev/null`
8829
8830  if test "x$new_path" = x; then
8831    # Oops. Which didn't find the executable.
8832    # The splitting of arguments from the executable at a space might have been incorrect,
8833    # since paths with space are more likely in Windows. Give it another try with the whole
8834    # argument.
8835    path="$complete"
8836    arguments="EOL"
8837    new_path="$path"
8838
8839  windows_path="$new_path"
8840  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8841    unix_path=`$CYGPATH -u "$windows_path"`
8842    new_path="$unix_path"
8843  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8844    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8845    new_path="$unix_path"
8846  fi
8847
8848
8849    new_path=`$WHICH "$new_path" 2> /dev/null`
8850
8851    if test "x$new_path" = x; then
8852      # It's still not found. Now this is an unrecoverable error.
8853      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8854$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8855      has_space=`$ECHO "$complete" | $GREP " "`
8856      if test "x$has_space" != x; then
8857        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8858$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8859      fi
8860      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8861    fi
8862  fi
8863
8864  # Now new_path has a complete unix path to the binary
8865  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8866    # Keep paths in /bin as-is, but remove trailing .exe if any
8867    new_path="${new_path/%.exe/}"
8868    # Do not save /bin paths to all_fixpath_prefixes!
8869  else
8870    # Not in mixed or Windows style, start by that.
8871    new_path=`cmd //c echo $new_path`
8872
8873  input_path="$new_path"
8874  # Check if we need to convert this using DOS-style short mode. If the path
8875  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8876  # take no chances and rewrite it.
8877  # Note: m4 eats our [], so we need to use [ and ] instead.
8878  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8879  if test "x$has_forbidden_chars" != x; then
8880    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8881    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8882  fi
8883
8884    # Output is in $new_path
8885
8886  windows_path="$new_path"
8887  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8888    unix_path=`$CYGPATH -u "$windows_path"`
8889    new_path="$unix_path"
8890  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8891    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8892    new_path="$unix_path"
8893  fi
8894
8895    # remove trailing .exe if any
8896    new_path="${new_path/%.exe/}"
8897
8898    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8899    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8900  fi
8901
8902  else
8903    # We're on a posix platform. Hooray! :)
8904    # First separate the path from the arguments. This will split at the first
8905    # space.
8906    complete="$FOUND_MAKE"
8907    path="${complete%% *}"
8908    tmp="$complete EOL"
8909    arguments="${tmp#* }"
8910
8911    # Cannot rely on the command "which" here since it doesn't always work.
8912    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8913    if test -z "$is_absolute_path"; then
8914      # Path to executable is not absolute. Find it.
8915      IFS_save="$IFS"
8916      IFS=:
8917      for p in $PATH; do
8918        if test -f "$p/$path" && test -x "$p/$path"; then
8919          new_path="$p/$path"
8920          break
8921        fi
8922      done
8923      IFS="$IFS_save"
8924    else
8925      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8926$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8927      new_path="$path"
8928    fi
8929
8930    if test "x$new_path" = x; then
8931      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8932$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8933      has_space=`$ECHO "$complete" | $GREP " "`
8934      if test "x$has_space" != x; then
8935        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8936$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8937      fi
8938      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8939    fi
8940  fi
8941
8942  # Now join together the path and the arguments once again
8943  if test "x$arguments" != xEOL; then
8944    new_complete="$new_path ${arguments% *}"
8945  else
8946    new_complete="$new_path"
8947  fi
8948
8949  if test "x$complete" != "x$new_complete"; then
8950    FOUND_MAKE="$new_complete"
8951    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8952$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8953  fi
8954
8955        fi
8956      fi
8957    fi
8958  fi
8959
8960
8961    if test "x$FOUND_MAKE" = x; then
8962      for ac_prog in make
8963do
8964  # Extract the first word of "$ac_prog", so it can be a program name with args.
8965set dummy $ac_prog; ac_word=$2
8966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8967$as_echo_n "checking for $ac_word... " >&6; }
8968if ${ac_cv_path_CHECK_MAKE+:} false; then :
8969  $as_echo_n "(cached) " >&6
8970else
8971  case $CHECK_MAKE in
8972  [\\/]* | ?:[\\/]*)
8973  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8974  ;;
8975  *)
8976  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8977for as_dir in $PATH
8978do
8979  IFS=$as_save_IFS
8980  test -z "$as_dir" && as_dir=.
8981    for ac_exec_ext in '' $ac_executable_extensions; do
8982  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8983    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8984    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8985    break 2
8986  fi
8987done
8988  done
8989IFS=$as_save_IFS
8990
8991  ;;
8992esac
8993fi
8994CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8995if test -n "$CHECK_MAKE"; then
8996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8997$as_echo "$CHECK_MAKE" >&6; }
8998else
8999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9000$as_echo "no" >&6; }
9001fi
9002
9003
9004  test -n "$CHECK_MAKE" && break
9005done
9006
9007
9008  MAKE_CANDIDATE=""$CHECK_MAKE""
9009  DESCRIPTION="make in PATH"
9010  if test "x$MAKE_CANDIDATE" != x; then
9011    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9012$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9013    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9014    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9015    if test "x$IS_GNU_MAKE" = x; then
9016      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9017$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9018    else
9019      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '\(3\.8[12]\)\|\(4\.\)'`
9020      if test "x$IS_MODERN_MAKE" = x; then
9021        { $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
9022$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;}
9023      else
9024        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9025          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9026            MAKE_EXPECTED_ENV='cygwin'
9027          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9028            MAKE_EXPECTED_ENV='msys'
9029          else
9030            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9031          fi
9032          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9033          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9034        else
9035          # Not relevant for non-Windows
9036          IS_MAKE_CORRECT_ENV=true
9037        fi
9038        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9039          { $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
9040$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;}
9041        else
9042          FOUND_MAKE=$MAKE_CANDIDATE
9043
9044  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9045
9046  # First separate the path from the arguments. This will split at the first
9047  # space.
9048  complete="$FOUND_MAKE"
9049  path="${complete%% *}"
9050  tmp="$complete EOL"
9051  arguments="${tmp#* }"
9052
9053  # Input might be given as Windows format, start by converting to
9054  # unix format.
9055  new_path=`$CYGPATH -u "$path"`
9056
9057  # Now try to locate executable using which
9058  new_path=`$WHICH "$new_path" 2> /dev/null`
9059  # bat and cmd files are not always considered executable in cygwin causing which
9060  # to not find them
9061  if test "x$new_path" = x \
9062      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9063      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9064    new_path=`$CYGPATH -u "$path"`
9065  fi
9066  if test "x$new_path" = x; then
9067    # Oops. Which didn't find the executable.
9068    # The splitting of arguments from the executable at a space might have been incorrect,
9069    # since paths with space are more likely in Windows. Give it another try with the whole
9070    # argument.
9071    path="$complete"
9072    arguments="EOL"
9073    new_path=`$CYGPATH -u "$path"`
9074    new_path=`$WHICH "$new_path" 2> /dev/null`
9075    # bat and cmd files are not always considered executable in cygwin causing which
9076    # to not find them
9077    if test "x$new_path" = x \
9078        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9079        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9080      new_path=`$CYGPATH -u "$path"`
9081    fi
9082    if test "x$new_path" = x; then
9083      # It's still not found. Now this is an unrecoverable error.
9084      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9085$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9086      has_space=`$ECHO "$complete" | $GREP " "`
9087      if test "x$has_space" != x; then
9088        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9089$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9090      fi
9091      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9092    fi
9093  fi
9094
9095  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9096  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9097  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9098  # "foo.exe" is OK but "foo" is an error.
9099  #
9100  # This test is therefore slightly more accurate than "test -f" to check for file presence.
9101  # It is also a way to make sure we got the proper file name for the real test later on.
9102  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9103  if test "x$test_shortpath" = x; then
9104    # Short path failed, file does not exist as specified.
9105    # Try adding .exe or .cmd
9106    if test -f "${new_path}.exe"; then
9107      input_to_shortpath="${new_path}.exe"
9108    elif test -f "${new_path}.cmd"; then
9109      input_to_shortpath="${new_path}.cmd"
9110    else
9111      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9112$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9113      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9114$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9115      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9116    fi
9117  else
9118    input_to_shortpath="$new_path"
9119  fi
9120
9121  # Call helper function which possibly converts this using DOS-style short mode.
9122  # If so, the updated path is stored in $new_path.
9123  new_path="$input_to_shortpath"
9124
9125  input_path="$input_to_shortpath"
9126  # Check if we need to convert this using DOS-style short mode. If the path
9127  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9128  # take no chances and rewrite it.
9129  # Note: m4 eats our [], so we need to use [ and ] instead.
9130  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9131  if test "x$has_forbidden_chars" != x; then
9132    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9133    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9134    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9135    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9136      # Going to short mode and back again did indeed matter. Since short mode is
9137      # case insensitive, let's make it lowercase to improve readability.
9138      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9139      # Now convert it back to Unix-stile (cygpath)
9140      input_path=`$CYGPATH -u "$shortmode_path"`
9141      new_path="$input_path"
9142    fi
9143  fi
9144
9145  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9146  if test "x$test_cygdrive_prefix" = x; then
9147    # As a simple fix, exclude /usr/bin since it's not a real path.
9148    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9149      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9150      # a path prefixed by /cygdrive for fixpath to work.
9151      new_path="$CYGWIN_ROOT_PATH$input_path"
9152    fi
9153  fi
9154
9155  # remove trailing .exe if any
9156  new_path="${new_path/%.exe/}"
9157
9158  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9159
9160  # First separate the path from the arguments. This will split at the first
9161  # space.
9162  complete="$FOUND_MAKE"
9163  path="${complete%% *}"
9164  tmp="$complete EOL"
9165  arguments="${tmp#* }"
9166
9167  # Input might be given as Windows format, start by converting to
9168  # unix format.
9169  new_path="$path"
9170
9171  windows_path="$new_path"
9172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9173    unix_path=`$CYGPATH -u "$windows_path"`
9174    new_path="$unix_path"
9175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9176    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9177    new_path="$unix_path"
9178  fi
9179
9180
9181  # Now try to locate executable using which
9182  new_path=`$WHICH "$new_path" 2> /dev/null`
9183
9184  if test "x$new_path" = x; then
9185    # Oops. Which didn't find the executable.
9186    # The splitting of arguments from the executable at a space might have been incorrect,
9187    # since paths with space are more likely in Windows. Give it another try with the whole
9188    # argument.
9189    path="$complete"
9190    arguments="EOL"
9191    new_path="$path"
9192
9193  windows_path="$new_path"
9194  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9195    unix_path=`$CYGPATH -u "$windows_path"`
9196    new_path="$unix_path"
9197  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9198    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9199    new_path="$unix_path"
9200  fi
9201
9202
9203    new_path=`$WHICH "$new_path" 2> /dev/null`
9204
9205    if test "x$new_path" = x; then
9206      # It's still not found. Now this is an unrecoverable error.
9207      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9208$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9209      has_space=`$ECHO "$complete" | $GREP " "`
9210      if test "x$has_space" != x; then
9211        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9212$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9213      fi
9214      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9215    fi
9216  fi
9217
9218  # Now new_path has a complete unix path to the binary
9219  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9220    # Keep paths in /bin as-is, but remove trailing .exe if any
9221    new_path="${new_path/%.exe/}"
9222    # Do not save /bin paths to all_fixpath_prefixes!
9223  else
9224    # Not in mixed or Windows style, start by that.
9225    new_path=`cmd //c echo $new_path`
9226
9227  input_path="$new_path"
9228  # Check if we need to convert this using DOS-style short mode. If the path
9229  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9230  # take no chances and rewrite it.
9231  # Note: m4 eats our [], so we need to use [ and ] instead.
9232  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9233  if test "x$has_forbidden_chars" != x; then
9234    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9235    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9236  fi
9237
9238    # Output is in $new_path
9239
9240  windows_path="$new_path"
9241  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9242    unix_path=`$CYGPATH -u "$windows_path"`
9243    new_path="$unix_path"
9244  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9245    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9246    new_path="$unix_path"
9247  fi
9248
9249    # remove trailing .exe if any
9250    new_path="${new_path/%.exe/}"
9251
9252    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9253    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9254  fi
9255
9256  else
9257    # We're on a posix platform. Hooray! :)
9258    # First separate the path from the arguments. This will split at the first
9259    # space.
9260    complete="$FOUND_MAKE"
9261    path="${complete%% *}"
9262    tmp="$complete EOL"
9263    arguments="${tmp#* }"
9264
9265    # Cannot rely on the command "which" here since it doesn't always work.
9266    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9267    if test -z "$is_absolute_path"; then
9268      # Path to executable is not absolute. Find it.
9269      IFS_save="$IFS"
9270      IFS=:
9271      for p in $PATH; do
9272        if test -f "$p/$path" && test -x "$p/$path"; then
9273          new_path="$p/$path"
9274          break
9275        fi
9276      done
9277      IFS="$IFS_save"
9278    else
9279      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9280$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9281      new_path="$path"
9282    fi
9283
9284    if test "x$new_path" = x; then
9285      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9286$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9287      has_space=`$ECHO "$complete" | $GREP " "`
9288      if test "x$has_space" != x; then
9289        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9290$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9291      fi
9292      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9293    fi
9294  fi
9295
9296  # Now join together the path and the arguments once again
9297  if test "x$arguments" != xEOL; then
9298    new_complete="$new_path ${arguments% *}"
9299  else
9300    new_complete="$new_path"
9301  fi
9302
9303  if test "x$complete" != "x$new_complete"; then
9304    FOUND_MAKE="$new_complete"
9305    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9306$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9307  fi
9308
9309        fi
9310      fi
9311    fi
9312  fi
9313
9314    fi
9315
9316    if test "x$FOUND_MAKE" = x; then
9317      if test "x$TOOLS_DIR" != x; then
9318        # We have a tools-dir, check that as well before giving up.
9319        OLD_PATH=$PATH
9320        PATH=$TOOLS_DIR:$PATH
9321        for ac_prog in gmake
9322do
9323  # Extract the first word of "$ac_prog", so it can be a program name with args.
9324set dummy $ac_prog; ac_word=$2
9325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9326$as_echo_n "checking for $ac_word... " >&6; }
9327if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
9328  $as_echo_n "(cached) " >&6
9329else
9330  case $CHECK_TOOLSDIR_GMAKE in
9331  [\\/]* | ?:[\\/]*)
9332  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9333  ;;
9334  *)
9335  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9336for as_dir in $PATH
9337do
9338  IFS=$as_save_IFS
9339  test -z "$as_dir" && as_dir=.
9340    for ac_exec_ext in '' $ac_executable_extensions; do
9341  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9342    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9343    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9344    break 2
9345  fi
9346done
9347  done
9348IFS=$as_save_IFS
9349
9350  ;;
9351esac
9352fi
9353CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9354if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9356$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9357else
9358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9359$as_echo "no" >&6; }
9360fi
9361
9362
9363  test -n "$CHECK_TOOLSDIR_GMAKE" && break
9364done
9365
9366
9367  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9368  DESCRIPTION="gmake in tools-dir"
9369  if test "x$MAKE_CANDIDATE" != x; then
9370    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9371$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9372    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9373    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9374    if test "x$IS_GNU_MAKE" = x; then
9375      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9376$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9377    else
9378      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '\(3\.8[12]\)\|\(4\.\)'`
9379      if test "x$IS_MODERN_MAKE" = x; then
9380        { $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
9381$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;}
9382      else
9383        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9384          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9385            MAKE_EXPECTED_ENV='cygwin'
9386          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9387            MAKE_EXPECTED_ENV='msys'
9388          else
9389            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9390          fi
9391          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9392          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9393        else
9394          # Not relevant for non-Windows
9395          IS_MAKE_CORRECT_ENV=true
9396        fi
9397        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9398          { $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
9399$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;}
9400        else
9401          FOUND_MAKE=$MAKE_CANDIDATE
9402
9403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9404
9405  # First separate the path from the arguments. This will split at the first
9406  # space.
9407  complete="$FOUND_MAKE"
9408  path="${complete%% *}"
9409  tmp="$complete EOL"
9410  arguments="${tmp#* }"
9411
9412  # Input might be given as Windows format, start by converting to
9413  # unix format.
9414  new_path=`$CYGPATH -u "$path"`
9415
9416  # Now try to locate executable using which
9417  new_path=`$WHICH "$new_path" 2> /dev/null`
9418  # bat and cmd files are not always considered executable in cygwin causing which
9419  # to not find them
9420  if test "x$new_path" = x \
9421      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9422      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9423    new_path=`$CYGPATH -u "$path"`
9424  fi
9425  if test "x$new_path" = x; then
9426    # Oops. Which didn't find the executable.
9427    # The splitting of arguments from the executable at a space might have been incorrect,
9428    # since paths with space are more likely in Windows. Give it another try with the whole
9429    # argument.
9430    path="$complete"
9431    arguments="EOL"
9432    new_path=`$CYGPATH -u "$path"`
9433    new_path=`$WHICH "$new_path" 2> /dev/null`
9434    # bat and cmd files are not always considered executable in cygwin causing which
9435    # to not find them
9436    if test "x$new_path" = x \
9437        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9438        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9439      new_path=`$CYGPATH -u "$path"`
9440    fi
9441    if test "x$new_path" = x; then
9442      # It's still not found. Now this is an unrecoverable error.
9443      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9444$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9445      has_space=`$ECHO "$complete" | $GREP " "`
9446      if test "x$has_space" != x; then
9447        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9448$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9449      fi
9450      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9451    fi
9452  fi
9453
9454  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9455  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9456  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9457  # "foo.exe" is OK but "foo" is an error.
9458  #
9459  # This test is therefore slightly more accurate than "test -f" to check for file presence.
9460  # It is also a way to make sure we got the proper file name for the real test later on.
9461  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9462  if test "x$test_shortpath" = x; then
9463    # Short path failed, file does not exist as specified.
9464    # Try adding .exe or .cmd
9465    if test -f "${new_path}.exe"; then
9466      input_to_shortpath="${new_path}.exe"
9467    elif test -f "${new_path}.cmd"; then
9468      input_to_shortpath="${new_path}.cmd"
9469    else
9470      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9471$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9472      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9473$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9474      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9475    fi
9476  else
9477    input_to_shortpath="$new_path"
9478  fi
9479
9480  # Call helper function which possibly converts this using DOS-style short mode.
9481  # If so, the updated path is stored in $new_path.
9482  new_path="$input_to_shortpath"
9483
9484  input_path="$input_to_shortpath"
9485  # Check if we need to convert this using DOS-style short mode. If the path
9486  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9487  # take no chances and rewrite it.
9488  # Note: m4 eats our [], so we need to use [ and ] instead.
9489  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9490  if test "x$has_forbidden_chars" != x; then
9491    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9492    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9493    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9494    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9495      # Going to short mode and back again did indeed matter. Since short mode is
9496      # case insensitive, let's make it lowercase to improve readability.
9497      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9498      # Now convert it back to Unix-stile (cygpath)
9499      input_path=`$CYGPATH -u "$shortmode_path"`
9500      new_path="$input_path"
9501    fi
9502  fi
9503
9504  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9505  if test "x$test_cygdrive_prefix" = x; then
9506    # As a simple fix, exclude /usr/bin since it's not a real path.
9507    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9508      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9509      # a path prefixed by /cygdrive for fixpath to work.
9510      new_path="$CYGWIN_ROOT_PATH$input_path"
9511    fi
9512  fi
9513
9514  # remove trailing .exe if any
9515  new_path="${new_path/%.exe/}"
9516
9517  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9518
9519  # First separate the path from the arguments. This will split at the first
9520  # space.
9521  complete="$FOUND_MAKE"
9522  path="${complete%% *}"
9523  tmp="$complete EOL"
9524  arguments="${tmp#* }"
9525
9526  # Input might be given as Windows format, start by converting to
9527  # unix format.
9528  new_path="$path"
9529
9530  windows_path="$new_path"
9531  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9532    unix_path=`$CYGPATH -u "$windows_path"`
9533    new_path="$unix_path"
9534  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9535    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9536    new_path="$unix_path"
9537  fi
9538
9539
9540  # Now try to locate executable using which
9541  new_path=`$WHICH "$new_path" 2> /dev/null`
9542
9543  if test "x$new_path" = x; then
9544    # Oops. Which didn't find the executable.
9545    # The splitting of arguments from the executable at a space might have been incorrect,
9546    # since paths with space are more likely in Windows. Give it another try with the whole
9547    # argument.
9548    path="$complete"
9549    arguments="EOL"
9550    new_path="$path"
9551
9552  windows_path="$new_path"
9553  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9554    unix_path=`$CYGPATH -u "$windows_path"`
9555    new_path="$unix_path"
9556  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9557    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9558    new_path="$unix_path"
9559  fi
9560
9561
9562    new_path=`$WHICH "$new_path" 2> /dev/null`
9563
9564    if test "x$new_path" = x; then
9565      # It's still not found. Now this is an unrecoverable error.
9566      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9567$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9568      has_space=`$ECHO "$complete" | $GREP " "`
9569      if test "x$has_space" != x; then
9570        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9571$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9572      fi
9573      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9574    fi
9575  fi
9576
9577  # Now new_path has a complete unix path to the binary
9578  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9579    # Keep paths in /bin as-is, but remove trailing .exe if any
9580    new_path="${new_path/%.exe/}"
9581    # Do not save /bin paths to all_fixpath_prefixes!
9582  else
9583    # Not in mixed or Windows style, start by that.
9584    new_path=`cmd //c echo $new_path`
9585
9586  input_path="$new_path"
9587  # Check if we need to convert this using DOS-style short mode. If the path
9588  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9589  # take no chances and rewrite it.
9590  # Note: m4 eats our [], so we need to use [ and ] instead.
9591  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9592  if test "x$has_forbidden_chars" != x; then
9593    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9594    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9595  fi
9596
9597    # Output is in $new_path
9598
9599  windows_path="$new_path"
9600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9601    unix_path=`$CYGPATH -u "$windows_path"`
9602    new_path="$unix_path"
9603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9604    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9605    new_path="$unix_path"
9606  fi
9607
9608    # remove trailing .exe if any
9609    new_path="${new_path/%.exe/}"
9610
9611    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9612    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9613  fi
9614
9615  else
9616    # We're on a posix platform. Hooray! :)
9617    # First separate the path from the arguments. This will split at the first
9618    # space.
9619    complete="$FOUND_MAKE"
9620    path="${complete%% *}"
9621    tmp="$complete EOL"
9622    arguments="${tmp#* }"
9623
9624    # Cannot rely on the command "which" here since it doesn't always work.
9625    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9626    if test -z "$is_absolute_path"; then
9627      # Path to executable is not absolute. Find it.
9628      IFS_save="$IFS"
9629      IFS=:
9630      for p in $PATH; do
9631        if test -f "$p/$path" && test -x "$p/$path"; then
9632          new_path="$p/$path"
9633          break
9634        fi
9635      done
9636      IFS="$IFS_save"
9637    else
9638      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9639$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9640      new_path="$path"
9641    fi
9642
9643    if test "x$new_path" = x; then
9644      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9645$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9646      has_space=`$ECHO "$complete" | $GREP " "`
9647      if test "x$has_space" != x; then
9648        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9649$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9650      fi
9651      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9652    fi
9653  fi
9654
9655  # Now join together the path and the arguments once again
9656  if test "x$arguments" != xEOL; then
9657    new_complete="$new_path ${arguments% *}"
9658  else
9659    new_complete="$new_path"
9660  fi
9661
9662  if test "x$complete" != "x$new_complete"; then
9663    FOUND_MAKE="$new_complete"
9664    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9665$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9666  fi
9667
9668        fi
9669      fi
9670    fi
9671  fi
9672
9673        if test "x$FOUND_MAKE" = x; then
9674          for ac_prog in make
9675do
9676  # Extract the first word of "$ac_prog", so it can be a program name with args.
9677set dummy $ac_prog; ac_word=$2
9678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9679$as_echo_n "checking for $ac_word... " >&6; }
9680if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
9681  $as_echo_n "(cached) " >&6
9682else
9683  case $CHECK_TOOLSDIR_MAKE in
9684  [\\/]* | ?:[\\/]*)
9685  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9686  ;;
9687  *)
9688  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9689for as_dir in $PATH
9690do
9691  IFS=$as_save_IFS
9692  test -z "$as_dir" && as_dir=.
9693    for ac_exec_ext in '' $ac_executable_extensions; do
9694  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9695    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9696    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9697    break 2
9698  fi
9699done
9700  done
9701IFS=$as_save_IFS
9702
9703  ;;
9704esac
9705fi
9706CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9707if test -n "$CHECK_TOOLSDIR_MAKE"; then
9708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9709$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9710else
9711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9712$as_echo "no" >&6; }
9713fi
9714
9715
9716  test -n "$CHECK_TOOLSDIR_MAKE" && break
9717done
9718
9719
9720  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9721  DESCRIPTION="make in tools-dir"
9722  if test "x$MAKE_CANDIDATE" != x; then
9723    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9724$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9725    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9726    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9727    if test "x$IS_GNU_MAKE" = x; then
9728      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9729$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9730    else
9731      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '\(3\.8[12]\)\|\(4\.\)'`
9732      if test "x$IS_MODERN_MAKE" = x; then
9733        { $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
9734$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;}
9735      else
9736        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9737          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9738            MAKE_EXPECTED_ENV='cygwin'
9739          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9740            MAKE_EXPECTED_ENV='msys'
9741          else
9742            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9743          fi
9744          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9745          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9746        else
9747          # Not relevant for non-Windows
9748          IS_MAKE_CORRECT_ENV=true
9749        fi
9750        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9751          { $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
9752$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;}
9753        else
9754          FOUND_MAKE=$MAKE_CANDIDATE
9755
9756  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9757
9758  # First separate the path from the arguments. This will split at the first
9759  # space.
9760  complete="$FOUND_MAKE"
9761  path="${complete%% *}"
9762  tmp="$complete EOL"
9763  arguments="${tmp#* }"
9764
9765  # Input might be given as Windows format, start by converting to
9766  # unix format.
9767  new_path=`$CYGPATH -u "$path"`
9768
9769  # Now try to locate executable using which
9770  new_path=`$WHICH "$new_path" 2> /dev/null`
9771  # bat and cmd files are not always considered executable in cygwin causing which
9772  # to not find them
9773  if test "x$new_path" = x \
9774      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9775      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9776    new_path=`$CYGPATH -u "$path"`
9777  fi
9778  if test "x$new_path" = x; then
9779    # Oops. Which didn't find the executable.
9780    # The splitting of arguments from the executable at a space might have been incorrect,
9781    # since paths with space are more likely in Windows. Give it another try with the whole
9782    # argument.
9783    path="$complete"
9784    arguments="EOL"
9785    new_path=`$CYGPATH -u "$path"`
9786    new_path=`$WHICH "$new_path" 2> /dev/null`
9787    # bat and cmd files are not always considered executable in cygwin causing which
9788    # to not find them
9789    if test "x$new_path" = x \
9790        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9791        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9792      new_path=`$CYGPATH -u "$path"`
9793    fi
9794    if test "x$new_path" = x; then
9795      # It's still not found. Now this is an unrecoverable error.
9796      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9797$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9798      has_space=`$ECHO "$complete" | $GREP " "`
9799      if test "x$has_space" != x; then
9800        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9801$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9802      fi
9803      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9804    fi
9805  fi
9806
9807  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9808  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9809  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9810  # "foo.exe" is OK but "foo" is an error.
9811  #
9812  # This test is therefore slightly more accurate than "test -f" to check for file presence.
9813  # It is also a way to make sure we got the proper file name for the real test later on.
9814  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9815  if test "x$test_shortpath" = x; then
9816    # Short path failed, file does not exist as specified.
9817    # Try adding .exe or .cmd
9818    if test -f "${new_path}.exe"; then
9819      input_to_shortpath="${new_path}.exe"
9820    elif test -f "${new_path}.cmd"; then
9821      input_to_shortpath="${new_path}.cmd"
9822    else
9823      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9824$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9825      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9826$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9827      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9828    fi
9829  else
9830    input_to_shortpath="$new_path"
9831  fi
9832
9833  # Call helper function which possibly converts this using DOS-style short mode.
9834  # If so, the updated path is stored in $new_path.
9835  new_path="$input_to_shortpath"
9836
9837  input_path="$input_to_shortpath"
9838  # Check if we need to convert this using DOS-style short mode. If the path
9839  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9840  # take no chances and rewrite it.
9841  # Note: m4 eats our [], so we need to use [ and ] instead.
9842  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9843  if test "x$has_forbidden_chars" != x; then
9844    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9845    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9846    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9847    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9848      # Going to short mode and back again did indeed matter. Since short mode is
9849      # case insensitive, let's make it lowercase to improve readability.
9850      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9851      # Now convert it back to Unix-stile (cygpath)
9852      input_path=`$CYGPATH -u "$shortmode_path"`
9853      new_path="$input_path"
9854    fi
9855  fi
9856
9857  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9858  if test "x$test_cygdrive_prefix" = x; then
9859    # As a simple fix, exclude /usr/bin since it's not a real path.
9860    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9861      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9862      # a path prefixed by /cygdrive for fixpath to work.
9863      new_path="$CYGWIN_ROOT_PATH$input_path"
9864    fi
9865  fi
9866
9867  # remove trailing .exe if any
9868  new_path="${new_path/%.exe/}"
9869
9870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9871
9872  # First separate the path from the arguments. This will split at the first
9873  # space.
9874  complete="$FOUND_MAKE"
9875  path="${complete%% *}"
9876  tmp="$complete EOL"
9877  arguments="${tmp#* }"
9878
9879  # Input might be given as Windows format, start by converting to
9880  # unix format.
9881  new_path="$path"
9882
9883  windows_path="$new_path"
9884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9885    unix_path=`$CYGPATH -u "$windows_path"`
9886    new_path="$unix_path"
9887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9888    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9889    new_path="$unix_path"
9890  fi
9891
9892
9893  # Now try to locate executable using which
9894  new_path=`$WHICH "$new_path" 2> /dev/null`
9895
9896  if test "x$new_path" = x; then
9897    # Oops. Which didn't find the executable.
9898    # The splitting of arguments from the executable at a space might have been incorrect,
9899    # since paths with space are more likely in Windows. Give it another try with the whole
9900    # argument.
9901    path="$complete"
9902    arguments="EOL"
9903    new_path="$path"
9904
9905  windows_path="$new_path"
9906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9907    unix_path=`$CYGPATH -u "$windows_path"`
9908    new_path="$unix_path"
9909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9910    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9911    new_path="$unix_path"
9912  fi
9913
9914
9915    new_path=`$WHICH "$new_path" 2> /dev/null`
9916
9917    if test "x$new_path" = x; then
9918      # It's still not found. Now this is an unrecoverable error.
9919      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9920$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9921      has_space=`$ECHO "$complete" | $GREP " "`
9922      if test "x$has_space" != x; then
9923        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9924$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9925      fi
9926      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9927    fi
9928  fi
9929
9930  # Now new_path has a complete unix path to the binary
9931  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9932    # Keep paths in /bin as-is, but remove trailing .exe if any
9933    new_path="${new_path/%.exe/}"
9934    # Do not save /bin paths to all_fixpath_prefixes!
9935  else
9936    # Not in mixed or Windows style, start by that.
9937    new_path=`cmd //c echo $new_path`
9938
9939  input_path="$new_path"
9940  # Check if we need to convert this using DOS-style short mode. If the path
9941  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9942  # take no chances and rewrite it.
9943  # Note: m4 eats our [], so we need to use [ and ] instead.
9944  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9945  if test "x$has_forbidden_chars" != x; then
9946    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9947    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9948  fi
9949
9950    # Output is in $new_path
9951
9952  windows_path="$new_path"
9953  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9954    unix_path=`$CYGPATH -u "$windows_path"`
9955    new_path="$unix_path"
9956  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9957    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9958    new_path="$unix_path"
9959  fi
9960
9961    # remove trailing .exe if any
9962    new_path="${new_path/%.exe/}"
9963
9964    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9965    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9966  fi
9967
9968  else
9969    # We're on a posix platform. Hooray! :)
9970    # First separate the path from the arguments. This will split at the first
9971    # space.
9972    complete="$FOUND_MAKE"
9973    path="${complete%% *}"
9974    tmp="$complete EOL"
9975    arguments="${tmp#* }"
9976
9977    # Cannot rely on the command "which" here since it doesn't always work.
9978    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9979    if test -z "$is_absolute_path"; then
9980      # Path to executable is not absolute. Find it.
9981      IFS_save="$IFS"
9982      IFS=:
9983      for p in $PATH; do
9984        if test -f "$p/$path" && test -x "$p/$path"; then
9985          new_path="$p/$path"
9986          break
9987        fi
9988      done
9989      IFS="$IFS_save"
9990    else
9991      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9992$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9993      new_path="$path"
9994    fi
9995
9996    if test "x$new_path" = x; then
9997      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9998$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9999      has_space=`$ECHO "$complete" | $GREP " "`
10000      if test "x$has_space" != x; then
10001        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
10002$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
10003      fi
10004      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
10005    fi
10006  fi
10007
10008  # Now join together the path and the arguments once again
10009  if test "x$arguments" != xEOL; then
10010    new_complete="$new_path ${arguments% *}"
10011  else
10012    new_complete="$new_path"
10013  fi
10014
10015  if test "x$complete" != "x$new_complete"; then
10016    FOUND_MAKE="$new_complete"
10017    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
10018$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
10019  fi
10020
10021        fi
10022      fi
10023    fi
10024  fi
10025
10026        fi
10027        PATH=$OLD_PATH
10028      fi
10029    fi
10030
10031    if test "x$FOUND_MAKE" = x; then
10032      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
10033    fi
10034  fi
10035
10036  MAKE=$FOUND_MAKE
10037
10038  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
10039$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
10040
10041
10042
10043  # Test if find supports -delete
10044  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
10045$as_echo_n "checking if find supports -delete... " >&6; }
10046  FIND_DELETE="-delete"
10047
10048  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
10049
10050  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
10051
10052  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
10053  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
10054    # No, it does not.
10055    rm $DELETEDIR/TestIfFindSupportsDelete
10056    FIND_DELETE="-exec rm \{\} \+"
10057    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10058$as_echo "no" >&6; }
10059  else
10060    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10061$as_echo "yes" >&6; }
10062  fi
10063  rmdir $DELETEDIR
10064
10065
10066
10067  # These tools might not be installed by default,
10068  # need hint on how to install them.
10069
10070  for ac_prog in unzip
10071do
10072  # Extract the first word of "$ac_prog", so it can be a program name with args.
10073set dummy $ac_prog; ac_word=$2
10074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10075$as_echo_n "checking for $ac_word... " >&6; }
10076if ${ac_cv_path_UNZIP+:} false; then :
10077  $as_echo_n "(cached) " >&6
10078else
10079  case $UNZIP in
10080  [\\/]* | ?:[\\/]*)
10081  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
10082  ;;
10083  *)
10084  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10085for as_dir in $PATH
10086do
10087  IFS=$as_save_IFS
10088  test -z "$as_dir" && as_dir=.
10089    for ac_exec_ext in '' $ac_executable_extensions; do
10090  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10091    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
10092    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10093    break 2
10094  fi
10095done
10096  done
10097IFS=$as_save_IFS
10098
10099  ;;
10100esac
10101fi
10102UNZIP=$ac_cv_path_UNZIP
10103if test -n "$UNZIP"; then
10104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
10105$as_echo "$UNZIP" >&6; }
10106else
10107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10108$as_echo "no" >&6; }
10109fi
10110
10111
10112  test -n "$UNZIP" && break
10113done
10114
10115
10116  if test "x$UNZIP" = x; then
10117    if test "xunzip" = x; then
10118      PROG_NAME=unzip
10119    else
10120      PROG_NAME=unzip
10121    fi
10122    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10123$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10124    as_fn_error $? "Cannot continue" "$LINENO" 5
10125  fi
10126
10127
10128
10129  for ac_prog in zip
10130do
10131  # Extract the first word of "$ac_prog", so it can be a program name with args.
10132set dummy $ac_prog; ac_word=$2
10133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10134$as_echo_n "checking for $ac_word... " >&6; }
10135if ${ac_cv_path_ZIP+:} false; then :
10136  $as_echo_n "(cached) " >&6
10137else
10138  case $ZIP in
10139  [\\/]* | ?:[\\/]*)
10140  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
10141  ;;
10142  *)
10143  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10144for as_dir in $PATH
10145do
10146  IFS=$as_save_IFS
10147  test -z "$as_dir" && as_dir=.
10148    for ac_exec_ext in '' $ac_executable_extensions; do
10149  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10150    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
10151    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10152    break 2
10153  fi
10154done
10155  done
10156IFS=$as_save_IFS
10157
10158  ;;
10159esac
10160fi
10161ZIP=$ac_cv_path_ZIP
10162if test -n "$ZIP"; then
10163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
10164$as_echo "$ZIP" >&6; }
10165else
10166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10167$as_echo "no" >&6; }
10168fi
10169
10170
10171  test -n "$ZIP" && break
10172done
10173
10174
10175  if test "x$ZIP" = x; then
10176    if test "xzip" = x; then
10177      PROG_NAME=zip
10178    else
10179      PROG_NAME=zip
10180    fi
10181    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10182$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10183    as_fn_error $? "Cannot continue" "$LINENO" 5
10184  fi
10185
10186
10187
10188  # Non-required basic tools
10189
10190  # Extract the first word of "ldd", so it can be a program name with args.
10191set dummy ldd; ac_word=$2
10192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10193$as_echo_n "checking for $ac_word... " >&6; }
10194if ${ac_cv_path_LDD+:} false; then :
10195  $as_echo_n "(cached) " >&6
10196else
10197  case $LDD in
10198  [\\/]* | ?:[\\/]*)
10199  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10200  ;;
10201  *)
10202  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10203for as_dir in $PATH
10204do
10205  IFS=$as_save_IFS
10206  test -z "$as_dir" && as_dir=.
10207    for ac_exec_ext in '' $ac_executable_extensions; do
10208  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10209    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10210    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10211    break 2
10212  fi
10213done
10214  done
10215IFS=$as_save_IFS
10216
10217  ;;
10218esac
10219fi
10220LDD=$ac_cv_path_LDD
10221if test -n "$LDD"; then
10222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10223$as_echo "$LDD" >&6; }
10224else
10225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10226$as_echo "no" >&6; }
10227fi
10228
10229
10230  if test "x$LDD" = "x"; then
10231    # List shared lib dependencies is used for
10232    # debug output and checking for forbidden dependencies.
10233    # We can build without it.
10234    LDD="true"
10235  fi
10236  # Extract the first word of "otool", so it can be a program name with args.
10237set dummy otool; ac_word=$2
10238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10239$as_echo_n "checking for $ac_word... " >&6; }
10240if ${ac_cv_path_OTOOL+:} false; then :
10241  $as_echo_n "(cached) " >&6
10242else
10243  case $OTOOL in
10244  [\\/]* | ?:[\\/]*)
10245  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10246  ;;
10247  *)
10248  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10249for as_dir in $PATH
10250do
10251  IFS=$as_save_IFS
10252  test -z "$as_dir" && as_dir=.
10253    for ac_exec_ext in '' $ac_executable_extensions; do
10254  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10255    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10256    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10257    break 2
10258  fi
10259done
10260  done
10261IFS=$as_save_IFS
10262
10263  ;;
10264esac
10265fi
10266OTOOL=$ac_cv_path_OTOOL
10267if test -n "$OTOOL"; then
10268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10269$as_echo "$OTOOL" >&6; }
10270else
10271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10272$as_echo "no" >&6; }
10273fi
10274
10275
10276  if test "x$OTOOL" = "x"; then
10277    OTOOL="true"
10278  fi
10279  for ac_prog in readelf greadelf
10280do
10281  # Extract the first word of "$ac_prog", so it can be a program name with args.
10282set dummy $ac_prog; ac_word=$2
10283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10284$as_echo_n "checking for $ac_word... " >&6; }
10285if ${ac_cv_path_READELF+:} false; then :
10286  $as_echo_n "(cached) " >&6
10287else
10288  case $READELF in
10289  [\\/]* | ?:[\\/]*)
10290  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10291  ;;
10292  *)
10293  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10294for as_dir in $PATH
10295do
10296  IFS=$as_save_IFS
10297  test -z "$as_dir" && as_dir=.
10298    for ac_exec_ext in '' $ac_executable_extensions; do
10299  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10300    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10301    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10302    break 2
10303  fi
10304done
10305  done
10306IFS=$as_save_IFS
10307
10308  ;;
10309esac
10310fi
10311READELF=$ac_cv_path_READELF
10312if test -n "$READELF"; then
10313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10314$as_echo "$READELF" >&6; }
10315else
10316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10317$as_echo "no" >&6; }
10318fi
10319
10320
10321  test -n "$READELF" && break
10322done
10323
10324  # Extract the first word of "hg", so it can be a program name with args.
10325set dummy hg; ac_word=$2
10326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10327$as_echo_n "checking for $ac_word... " >&6; }
10328if ${ac_cv_path_HG+:} false; then :
10329  $as_echo_n "(cached) " >&6
10330else
10331  case $HG in
10332  [\\/]* | ?:[\\/]*)
10333  ac_cv_path_HG="$HG" # Let the user override the test with a path.
10334  ;;
10335  *)
10336  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10337for as_dir in $PATH
10338do
10339  IFS=$as_save_IFS
10340  test -z "$as_dir" && as_dir=.
10341    for ac_exec_ext in '' $ac_executable_extensions; do
10342  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10343    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10344    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10345    break 2
10346  fi
10347done
10348  done
10349IFS=$as_save_IFS
10350
10351  ;;
10352esac
10353fi
10354HG=$ac_cv_path_HG
10355if test -n "$HG"; then
10356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10357$as_echo "$HG" >&6; }
10358else
10359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10360$as_echo "no" >&6; }
10361fi
10362
10363
10364  # Extract the first word of "stat", so it can be a program name with args.
10365set dummy stat; ac_word=$2
10366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10367$as_echo_n "checking for $ac_word... " >&6; }
10368if ${ac_cv_path_STAT+:} false; then :
10369  $as_echo_n "(cached) " >&6
10370else
10371  case $STAT in
10372  [\\/]* | ?:[\\/]*)
10373  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10374  ;;
10375  *)
10376  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10377for as_dir in $PATH
10378do
10379  IFS=$as_save_IFS
10380  test -z "$as_dir" && as_dir=.
10381    for ac_exec_ext in '' $ac_executable_extensions; do
10382  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10383    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10384    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10385    break 2
10386  fi
10387done
10388  done
10389IFS=$as_save_IFS
10390
10391  ;;
10392esac
10393fi
10394STAT=$ac_cv_path_STAT
10395if test -n "$STAT"; then
10396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10397$as_echo "$STAT" >&6; }
10398else
10399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10400$as_echo "no" >&6; }
10401fi
10402
10403
10404  # Extract the first word of "time", so it can be a program name with args.
10405set dummy time; ac_word=$2
10406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10407$as_echo_n "checking for $ac_word... " >&6; }
10408if ${ac_cv_path_TIME+:} false; then :
10409  $as_echo_n "(cached) " >&6
10410else
10411  case $TIME in
10412  [\\/]* | ?:[\\/]*)
10413  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10414  ;;
10415  *)
10416  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10417for as_dir in $PATH
10418do
10419  IFS=$as_save_IFS
10420  test -z "$as_dir" && as_dir=.
10421    for ac_exec_ext in '' $ac_executable_extensions; do
10422  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10423    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10424    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10425    break 2
10426  fi
10427done
10428  done
10429IFS=$as_save_IFS
10430
10431  ;;
10432esac
10433fi
10434TIME=$ac_cv_path_TIME
10435if test -n "$TIME"; then
10436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10437$as_echo "$TIME" >&6; }
10438else
10439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10440$as_echo "no" >&6; }
10441fi
10442
10443
10444  # Check if it's GNU time
10445  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
10446  if test "x$IS_GNU_TIME" != x; then
10447    IS_GNU_TIME=yes
10448  else
10449    IS_GNU_TIME=no
10450  fi
10451
10452
10453  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10454
10455  for ac_prog in comm
10456do
10457  # Extract the first word of "$ac_prog", so it can be a program name with args.
10458set dummy $ac_prog; ac_word=$2
10459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10460$as_echo_n "checking for $ac_word... " >&6; }
10461if ${ac_cv_path_COMM+:} false; then :
10462  $as_echo_n "(cached) " >&6
10463else
10464  case $COMM in
10465  [\\/]* | ?:[\\/]*)
10466  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10467  ;;
10468  *)
10469  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10470for as_dir in $PATH
10471do
10472  IFS=$as_save_IFS
10473  test -z "$as_dir" && as_dir=.
10474    for ac_exec_ext in '' $ac_executable_extensions; do
10475  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10476    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10477    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10478    break 2
10479  fi
10480done
10481  done
10482IFS=$as_save_IFS
10483
10484  ;;
10485esac
10486fi
10487COMM=$ac_cv_path_COMM
10488if test -n "$COMM"; then
10489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10490$as_echo "$COMM" >&6; }
10491else
10492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10493$as_echo "no" >&6; }
10494fi
10495
10496
10497  test -n "$COMM" && break
10498done
10499
10500
10501  if test "x$COMM" = x; then
10502    if test "xcomm" = x; then
10503      PROG_NAME=comm
10504    else
10505      PROG_NAME=comm
10506    fi
10507    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10508$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10509    as_fn_error $? "Cannot continue" "$LINENO" 5
10510  fi
10511
10512
10513  fi
10514
10515  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
10516
10517  for ac_prog in xattr
10518do
10519  # Extract the first word of "$ac_prog", so it can be a program name with args.
10520set dummy $ac_prog; ac_word=$2
10521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10522$as_echo_n "checking for $ac_word... " >&6; }
10523if ${ac_cv_path_XATTR+:} false; then :
10524  $as_echo_n "(cached) " >&6
10525else
10526  case $XATTR in
10527  [\\/]* | ?:[\\/]*)
10528  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
10529  ;;
10530  *)
10531  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10532for as_dir in $PATH
10533do
10534  IFS=$as_save_IFS
10535  test -z "$as_dir" && as_dir=.
10536    for ac_exec_ext in '' $ac_executable_extensions; do
10537  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10538    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
10539    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10540    break 2
10541  fi
10542done
10543  done
10544IFS=$as_save_IFS
10545
10546  ;;
10547esac
10548fi
10549XATTR=$ac_cv_path_XATTR
10550if test -n "$XATTR"; then
10551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
10552$as_echo "$XATTR" >&6; }
10553else
10554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10555$as_echo "no" >&6; }
10556fi
10557
10558
10559  test -n "$XATTR" && break
10560done
10561
10562
10563  if test "x$XATTR" = x; then
10564    if test "xxattr" = x; then
10565      PROG_NAME=xattr
10566    else
10567      PROG_NAME=xattr
10568    fi
10569    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10570$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10571    as_fn_error $? "Cannot continue" "$LINENO" 5
10572  fi
10573
10574
10575    # Extract the first word of "codesign", so it can be a program name with args.
10576set dummy codesign; ac_word=$2
10577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10578$as_echo_n "checking for $ac_word... " >&6; }
10579if ${ac_cv_path_CODESIGN+:} false; then :
10580  $as_echo_n "(cached) " >&6
10581else
10582  case $CODESIGN in
10583  [\\/]* | ?:[\\/]*)
10584  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
10585  ;;
10586  *)
10587  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10588for as_dir in $PATH
10589do
10590  IFS=$as_save_IFS
10591  test -z "$as_dir" && as_dir=.
10592    for ac_exec_ext in '' $ac_executable_extensions; do
10593  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10594    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
10595    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10596    break 2
10597  fi
10598done
10599  done
10600IFS=$as_save_IFS
10601
10602  ;;
10603esac
10604fi
10605CODESIGN=$ac_cv_path_CODESIGN
10606if test -n "$CODESIGN"; then
10607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
10608$as_echo "$CODESIGN" >&6; }
10609else
10610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10611$as_echo "no" >&6; }
10612fi
10613
10614
10615    if test "x$CODESIGN" != "x"; then
10616      # Verify that the openjdk_codesign certificate is present
10617      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
10618$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
10619      rm -f codesign-testfile
10620      touch codesign-testfile
10621      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
10622      rm -f codesign-testfile
10623      if test "x$CODESIGN" = x; then
10624        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10625$as_echo "no" >&6; }
10626      else
10627        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10628$as_echo "yes" >&6; }
10629      fi
10630    fi
10631
10632
10633    for ac_prog in dsymutil
10634do
10635  # Extract the first word of "$ac_prog", so it can be a program name with args.
10636set dummy $ac_prog; ac_word=$2
10637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10638$as_echo_n "checking for $ac_word... " >&6; }
10639if ${ac_cv_path_DSYMUTIL+:} false; then :
10640  $as_echo_n "(cached) " >&6
10641else
10642  case $DSYMUTIL in
10643  [\\/]* | ?:[\\/]*)
10644  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
10645  ;;
10646  *)
10647  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10648for as_dir in $PATH
10649do
10650  IFS=$as_save_IFS
10651  test -z "$as_dir" && as_dir=.
10652    for ac_exec_ext in '' $ac_executable_extensions; do
10653  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10654    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
10655    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10656    break 2
10657  fi
10658done
10659  done
10660IFS=$as_save_IFS
10661
10662  ;;
10663esac
10664fi
10665DSYMUTIL=$ac_cv_path_DSYMUTIL
10666if test -n "$DSYMUTIL"; then
10667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
10668$as_echo "$DSYMUTIL" >&6; }
10669else
10670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10671$as_echo "no" >&6; }
10672fi
10673
10674
10675  test -n "$DSYMUTIL" && break
10676done
10677
10678
10679    if test "x$DSYMUTIL" = x; then
10680        if test "xdsymutil" = x; then
10681          PROG_NAME=dsymutil
10682        else
10683          PROG_NAME=dsymutil
10684        fi
10685        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10686$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10687        as_fn_error $? "Cannot continue" "$LINENO" 5
10688    fi
10689  fi
10690
10691
10692# Check if pkg-config is available.
10693
10694
10695if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10696	if test -n "$ac_tool_prefix"; then
10697  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10698set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10700$as_echo_n "checking for $ac_word... " >&6; }
10701if ${ac_cv_path_PKG_CONFIG+:} false; then :
10702  $as_echo_n "(cached) " >&6
10703else
10704  case $PKG_CONFIG in
10705  [\\/]* | ?:[\\/]*)
10706  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10707  ;;
10708  *)
10709  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10710for as_dir in $PATH
10711do
10712  IFS=$as_save_IFS
10713  test -z "$as_dir" && as_dir=.
10714    for ac_exec_ext in '' $ac_executable_extensions; do
10715  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10716    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10717    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10718    break 2
10719  fi
10720done
10721  done
10722IFS=$as_save_IFS
10723
10724  ;;
10725esac
10726fi
10727PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10728if test -n "$PKG_CONFIG"; then
10729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10730$as_echo "$PKG_CONFIG" >&6; }
10731else
10732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10733$as_echo "no" >&6; }
10734fi
10735
10736
10737fi
10738if test -z "$ac_cv_path_PKG_CONFIG"; then
10739  ac_pt_PKG_CONFIG=$PKG_CONFIG
10740  # Extract the first word of "pkg-config", so it can be a program name with args.
10741set dummy pkg-config; ac_word=$2
10742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10743$as_echo_n "checking for $ac_word... " >&6; }
10744if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10745  $as_echo_n "(cached) " >&6
10746else
10747  case $ac_pt_PKG_CONFIG in
10748  [\\/]* | ?:[\\/]*)
10749  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10750  ;;
10751  *)
10752  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10753for as_dir in $PATH
10754do
10755  IFS=$as_save_IFS
10756  test -z "$as_dir" && as_dir=.
10757    for ac_exec_ext in '' $ac_executable_extensions; do
10758  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10759    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10760    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10761    break 2
10762  fi
10763done
10764  done
10765IFS=$as_save_IFS
10766
10767  ;;
10768esac
10769fi
10770ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10771if test -n "$ac_pt_PKG_CONFIG"; then
10772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10773$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10774else
10775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10776$as_echo "no" >&6; }
10777fi
10778
10779  if test "x$ac_pt_PKG_CONFIG" = x; then
10780    PKG_CONFIG=""
10781  else
10782    case $cross_compiling:$ac_tool_warned in
10783yes:)
10784{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10785$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10786ac_tool_warned=yes ;;
10787esac
10788    PKG_CONFIG=$ac_pt_PKG_CONFIG
10789  fi
10790else
10791  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10792fi
10793
10794fi
10795if test -n "$PKG_CONFIG"; then
10796	_pkg_min_version=0.9.0
10797	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10798$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10799	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10800		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10801$as_echo "yes" >&6; }
10802	else
10803		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10804$as_echo "no" >&6; }
10805		PKG_CONFIG=""
10806	fi
10807
10808fi
10809
10810# After basic tools have been setup, we can check build os specific details.
10811
10812  ###############################################################################
10813
10814  # Note that this is the build platform OS version!
10815
10816  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10817  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10818  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10819  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10820
10821
10822
10823
10824
10825# Setup builddeps, for automatic downloading of tools we need.
10826# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10827# boot-jdk setup, but we need to have basic tools setup first.
10828
10829
10830# Check whether --with-builddeps-conf was given.
10831if test "${with_builddeps_conf+set}" = set; then :
10832  withval=$with_builddeps_conf;
10833fi
10834
10835
10836
10837# Check whether --with-builddeps-server was given.
10838if test "${with_builddeps_server+set}" = set; then :
10839  withval=$with_builddeps_server;
10840fi
10841
10842
10843
10844# Check whether --with-builddeps-dir was given.
10845if test "${with_builddeps_dir+set}" = set; then :
10846  withval=$with_builddeps_dir;
10847else
10848  with_builddeps_dir=/localhome/builddeps
10849fi
10850
10851
10852
10853# Check whether --with-builddeps-group was given.
10854if test "${with_builddeps_group+set}" = set; then :
10855  withval=$with_builddeps_group;
10856fi
10857
10858
10859
10860
10861  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10862    if test "x$with_builddeps_conf" != x; then
10863      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10864$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10865      builddepsfile=$with_builddeps_conf
10866      if test -s $builddepsfile; then
10867        . $builddepsfile
10868        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10869$as_echo "loaded!" >&6; }
10870      else
10871        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10872      fi
10873    else
10874      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10875$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10876      builddepsfile=`mktemp`
10877      touch $builddepsfile
10878      # Put all found confs into a single file.
10879      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10880      # Source the file to acquire the variables
10881      if test -s $builddepsfile; then
10882        . $builddepsfile
10883        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10884$as_echo "found at least one!" >&6; }
10885      else
10886        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10887      fi
10888    fi
10889    # Create build and target names that use _ instead of "-" and ".".
10890    # This is necessary to use them in variable names.
10891    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10892    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10893    # Extract rewrite information for build and target
10894    eval rewritten_build=\${REWRITE_${build_var}}
10895    if test "x$rewritten_build" = x; then
10896      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10897      echo Build stays the same $rewritten_build
10898    else
10899      echo Rewriting build for builddeps into $rewritten_build
10900    fi
10901    eval rewritten_target=\${REWRITE_${target_var}}
10902    if test "x$rewritten_target" = x; then
10903      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10904      echo Target stays the same $rewritten_target
10905    else
10906      echo Rewriting target for builddeps into $rewritten_target
10907    fi
10908    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10909    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10910  fi
10911  for ac_prog in 7z unzip
10912do
10913  # Extract the first word of "$ac_prog", so it can be a program name with args.
10914set dummy $ac_prog; ac_word=$2
10915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10916$as_echo_n "checking for $ac_word... " >&6; }
10917if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
10918  $as_echo_n "(cached) " >&6
10919else
10920  if test -n "$BDEPS_UNZIP"; then
10921  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10922else
10923as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10924for as_dir in $PATH
10925do
10926  IFS=$as_save_IFS
10927  test -z "$as_dir" && as_dir=.
10928    for ac_exec_ext in '' $ac_executable_extensions; do
10929  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10930    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10931    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10932    break 2
10933  fi
10934done
10935  done
10936IFS=$as_save_IFS
10937
10938fi
10939fi
10940BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10941if test -n "$BDEPS_UNZIP"; then
10942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10943$as_echo "$BDEPS_UNZIP" >&6; }
10944else
10945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10946$as_echo "no" >&6; }
10947fi
10948
10949
10950  test -n "$BDEPS_UNZIP" && break
10951done
10952
10953  if test "x$BDEPS_UNZIP" = x7z; then
10954    BDEPS_UNZIP="7z x"
10955  fi
10956
10957  for ac_prog in wget lftp ftp
10958do
10959  # Extract the first word of "$ac_prog", so it can be a program name with args.
10960set dummy $ac_prog; ac_word=$2
10961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10962$as_echo_n "checking for $ac_word... " >&6; }
10963if ${ac_cv_prog_BDEPS_FTP+:} false; then :
10964  $as_echo_n "(cached) " >&6
10965else
10966  if test -n "$BDEPS_FTP"; then
10967  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10968else
10969as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10970for as_dir in $PATH
10971do
10972  IFS=$as_save_IFS
10973  test -z "$as_dir" && as_dir=.
10974    for ac_exec_ext in '' $ac_executable_extensions; do
10975  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10976    ac_cv_prog_BDEPS_FTP="$ac_prog"
10977    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10978    break 2
10979  fi
10980done
10981  done
10982IFS=$as_save_IFS
10983
10984fi
10985fi
10986BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10987if test -n "$BDEPS_FTP"; then
10988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10989$as_echo "$BDEPS_FTP" >&6; }
10990else
10991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10992$as_echo "no" >&6; }
10993fi
10994
10995
10996  test -n "$BDEPS_FTP" && break
10997done
10998
10999
11000
11001###############################################################################
11002#
11003# Determine OpenJDK variants, options and version numbers.
11004#
11005###############################################################################
11006
11007# We need build & target for this.
11008
11009
11010  ###############################################################################
11011  #
11012  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
11013  # We always build headless support.
11014  #
11015  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
11016$as_echo_n "checking headful support... " >&6; }
11017  # Check whether --enable-headful was given.
11018if test "${enable_headful+set}" = set; then :
11019  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
11020else
11021  SUPPORT_HEADFUL=yes
11022fi
11023
11024
11025  SUPPORT_HEADLESS=yes
11026  BUILD_HEADLESS="BUILD_HEADLESS:=true"
11027
11028  if test "x$SUPPORT_HEADFUL" = xyes; then
11029    # We are building both headful and headless.
11030    headful_msg="include support for both headful and headless"
11031  fi
11032
11033  if test "x$SUPPORT_HEADFUL" = xno; then
11034    # Thus we are building headless only.
11035    BUILD_HEADLESS="BUILD_HEADLESS:=true"
11036    headful_msg="headless only"
11037  fi
11038
11039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
11040$as_echo "$headful_msg" >&6; }
11041
11042
11043
11044
11045
11046  # Control wether Hotspot runs Queens test after build.
11047  # Check whether --enable-hotspot-test-in-build was given.
11048if test "${enable_hotspot_test_in_build+set}" = set; then :
11049  enableval=$enable_hotspot_test_in_build;
11050else
11051  enable_hotspot_test_in_build=no
11052fi
11053
11054  if test "x$enable_hotspot_test_in_build" = "xyes"; then
11055    TEST_IN_BUILD=true
11056  else
11057    TEST_IN_BUILD=false
11058  fi
11059
11060
11061  ###############################################################################
11062  #
11063  # Choose cacerts source file
11064  #
11065
11066# Check whether --with-cacerts-file was given.
11067if test "${with_cacerts_file+set}" = set; then :
11068  withval=$with_cacerts_file;
11069fi
11070
11071  if test "x$with_cacerts_file" != x; then
11072    CACERTS_FILE=$with_cacerts_file
11073  else
11074    CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
11075  fi
11076
11077
11078  ###############################################################################
11079  #
11080  # Enable or disable unlimited crypto
11081  #
11082  # Check whether --enable-unlimited-crypto was given.
11083if test "${enable_unlimited_crypto+set}" = set; then :
11084  enableval=$enable_unlimited_crypto;
11085else
11086  enable_unlimited_crypto=no
11087fi
11088
11089  if test "x$enable_unlimited_crypto" = "xyes"; then
11090    UNLIMITED_CRYPTO=true
11091  else
11092    UNLIMITED_CRYPTO=false
11093  fi
11094
11095
11096  ###############################################################################
11097  #
11098  # Enable or disable the elliptic curve crypto implementation
11099  #
11100
11101
11102  ###############################################################################
11103  #
11104  # Compress jars
11105  #
11106  COMPRESS_JARS=false
11107
11108
11109
11110
11111  # Source the version numbers
11112  . $AUTOCONF_DIR/version-numbers
11113
11114  # Get the settings from parameters
11115
11116# Check whether --with-milestone was given.
11117if test "${with_milestone+set}" = set; then :
11118  withval=$with_milestone;
11119fi
11120
11121  if test "x$with_milestone" = xyes; then
11122    as_fn_error $? "Milestone must have a value" "$LINENO" 5
11123  elif test "x$with_milestone" != x; then
11124    MILESTONE="$with_milestone"
11125  fi
11126  if test "x$MILESTONE" = x; then
11127    MILESTONE=internal
11128  fi
11129
11130
11131# Check whether --with-update-version was given.
11132if test "${with_update_version+set}" = set; then :
11133  withval=$with_update_version;
11134fi
11135
11136  if test "x$with_update_version" = xyes; then
11137    as_fn_error $? "Update version must have a value" "$LINENO" 5
11138  elif test "x$with_update_version" != x; then
11139    JDK_UPDATE_VERSION="$with_update_version"
11140  fi
11141
11142
11143# Check whether --with-user-release-suffix was given.
11144if test "${with_user_release_suffix+set}" = set; then :
11145  withval=$with_user_release_suffix;
11146fi
11147
11148  if test "x$with_user_release_suffix" = xyes; then
11149    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
11150  elif test "x$with_user_release_suffix" != x; then
11151    USER_RELEASE_SUFFIX="$with_user_release_suffix"
11152  fi
11153
11154
11155# Check whether --with-build-number was given.
11156if test "${with_build_number+set}" = set; then :
11157  withval=$with_build_number;
11158fi
11159
11160  if test "x$with_build_number" = xyes; then
11161    as_fn_error $? "Build number must have a value" "$LINENO" 5
11162  elif test "x$with_build_number" != x; then
11163    JDK_BUILD_NUMBER="$with_build_number"
11164  fi
11165  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
11166  if test "x$JDK_BUILD_NUMBER" = x; then
11167    JDK_BUILD_NUMBER=b00
11168    if test "x$USER_RELEASE_SUFFIX" = x; then
11169      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
11170      # Avoid [:alnum:] since it depends on the locale.
11171      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
11172      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11173    fi
11174  fi
11175
11176  # Now set the JDK version, milestone, build number etc.
11177
11178
11179
11180
11181
11182
11183
11184
11185
11186
11187
11188
11189
11190
11191
11192  COPYRIGHT_YEAR=`date +'%Y'`
11193
11194
11195  if test "x$JDK_UPDATE_VERSION" != x; then
11196    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
11197  else
11198    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
11199  fi
11200
11201
11202  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
11203
11204
11205
11206###############################################################################
11207#
11208# Setup BootJDK, used to bootstrap the build.
11209#
11210###############################################################################
11211
11212
11213  BOOT_JDK_FOUND=no
11214
11215# Check whether --with-boot-jdk was given.
11216if test "${with_boot_jdk+set}" = set; then :
11217  withval=$with_boot_jdk;
11218fi
11219
11220
11221  # We look for the Boot JDK through various means, going from more certain to
11222  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
11223  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
11224  # must check if this is indeed valid; otherwise we'll continue looking.
11225
11226  # Test: Is bootjdk explicitely set by command line arguments?
11227
11228  if test "x$BOOT_JDK_FOUND" = xno; then
11229    # Now execute the test
11230
11231  if test "x$with_boot_jdk" != x; then
11232    BOOT_JDK=$with_boot_jdk
11233    BOOT_JDK_FOUND=maybe
11234    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
11235$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
11236  fi
11237
11238
11239    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11240    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11241      # Do we have a bin/java?
11242      if test ! -x "$BOOT_JDK/bin/java"; then
11243        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11244$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11245        BOOT_JDK_FOUND=no
11246      else
11247        # Do we have a bin/javac?
11248        if test ! -x "$BOOT_JDK/bin/javac"; then
11249          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11250$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11251          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11252$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11253          BOOT_JDK_FOUND=no
11254        else
11255          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11256          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11257            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11258$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11259            BOOT_JDK_FOUND=no
11260          else
11261            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11262            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11263
11264            # Extra M4 quote needed to protect [] in grep expression.
11265            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11266            if test "x$FOUND_VERSION_78" = x; then
11267              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11268$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11269              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11270$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11271              BOOT_JDK_FOUND=no
11272            else
11273              # We're done! :-)
11274              BOOT_JDK_FOUND=yes
11275
11276  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11277
11278  # Input might be given as Windows format, start by converting to
11279  # unix format.
11280  path="$BOOT_JDK"
11281  new_path=`$CYGPATH -u "$path"`
11282
11283  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11284  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11285  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11286  # "foo.exe" is OK but "foo" is an error.
11287  #
11288  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11289  # It is also a way to make sure we got the proper file name for the real test later on.
11290  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11291  if test "x$test_shortpath" = x; then
11292    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11293$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11294    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11295  fi
11296
11297  # Call helper function which possibly converts this using DOS-style short mode.
11298  # If so, the updated path is stored in $new_path.
11299
11300  input_path="$new_path"
11301  # Check if we need to convert this using DOS-style short mode. If the path
11302  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11303  # take no chances and rewrite it.
11304  # Note: m4 eats our [], so we need to use [ and ] instead.
11305  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11306  if test "x$has_forbidden_chars" != x; then
11307    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11308    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11309    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11310    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11311      # Going to short mode and back again did indeed matter. Since short mode is
11312      # case insensitive, let's make it lowercase to improve readability.
11313      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11314      # Now convert it back to Unix-stile (cygpath)
11315      input_path=`$CYGPATH -u "$shortmode_path"`
11316      new_path="$input_path"
11317    fi
11318  fi
11319
11320  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11321  if test "x$test_cygdrive_prefix" = x; then
11322    # As a simple fix, exclude /usr/bin since it's not a real path.
11323    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11324      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11325      # a path prefixed by /cygdrive for fixpath to work.
11326      new_path="$CYGWIN_ROOT_PATH$input_path"
11327    fi
11328  fi
11329
11330
11331  if test "x$path" != "x$new_path"; then
11332    BOOT_JDK="$new_path"
11333    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11334$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11335  fi
11336
11337  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11338
11339  path="$BOOT_JDK"
11340  has_colon=`$ECHO $path | $GREP ^.:`
11341  new_path="$path"
11342  if test "x$has_colon" = x; then
11343    # Not in mixed or Windows style, start by that.
11344    new_path=`cmd //c echo $path`
11345  fi
11346
11347
11348  input_path="$new_path"
11349  # Check if we need to convert this using DOS-style short mode. If the path
11350  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11351  # take no chances and rewrite it.
11352  # Note: m4 eats our [], so we need to use [ and ] instead.
11353  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11354  if test "x$has_forbidden_chars" != x; then
11355    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11356    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11357  fi
11358
11359
11360  windows_path="$new_path"
11361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11362    unix_path=`$CYGPATH -u "$windows_path"`
11363    new_path="$unix_path"
11364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11365    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11366    new_path="$unix_path"
11367  fi
11368
11369  if test "x$path" != "x$new_path"; then
11370    BOOT_JDK="$new_path"
11371    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11372$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11373  fi
11374
11375  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11376  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11377
11378  else
11379    # We're on a posix platform. Hooray! :)
11380    path="$BOOT_JDK"
11381    has_space=`$ECHO "$path" | $GREP " "`
11382    if test "x$has_space" != x; then
11383      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11384$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11385      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11386    fi
11387
11388    # Use eval to expand a potential ~
11389    eval path="$path"
11390    if test ! -f "$path" && test ! -d "$path"; then
11391      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11392    fi
11393
11394    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11395  fi
11396
11397              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11398$as_echo_n "checking for Boot JDK... " >&6; }
11399              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11400$as_echo "$BOOT_JDK" >&6; }
11401              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11402$as_echo_n "checking Boot JDK version... " >&6; }
11403              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11404              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11405$as_echo "$BOOT_JDK_VERSION" >&6; }
11406            fi # end check jdk version
11407          fi # end check rt.jar
11408        fi # end check javac
11409      fi # end check java
11410    fi # end check boot jdk found
11411  fi
11412
11413  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11414    # Having specified an argument which is incorrect will produce an instant failure;
11415    # we should not go on looking
11416    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11417  fi
11418
11419  # Test: Is bootjdk available from builddeps?
11420
11421  if test "x$BOOT_JDK_FOUND" = xno; then
11422    # Now execute the test
11423
11424
11425
11426  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11427    # Source the builddeps file again, to make sure it uses the latest variables!
11428    . $builddepsfile
11429    # Look for a target and build machine specific resource!
11430    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11431    if test "x$resource" = x; then
11432      # Ok, lets instead look for a target specific resource
11433      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11434    fi
11435    if test "x$resource" = x; then
11436      # Ok, lets instead look for a build specific resource
11437      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11438    fi
11439    if test "x$resource" = x; then
11440      # Ok, lets instead look for a generic resource
11441      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11442      resource=${builddep_bootjdk}
11443    fi
11444    if test "x$resource" != x; then
11445      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11446$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11447      # If the resource in the builddeps.conf file is an existing directory,
11448      # for example /java/linux/cups
11449      if test -d ${resource}; then
11450        depdir=${resource}
11451      else
11452
11453  # bootjdk is for example mymodule
11454  # $resource is for example libs/general/libmymod_1_2_3.zip
11455  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11456  # $with_builddeps_dir is for example /localhome/builddeps
11457  # depdir is the name of the variable into which we store the depdir, eg MYMOD
11458  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11459  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11460  filename=`basename $resource`
11461  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11462  filebase=${filename%%.*}
11463  extension=${filename#*.}
11464  installdir=$with_builddeps_dir/$filebase
11465  if test ! -f $installdir/$filename.unpacked; then
11466    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11467$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11468    if test ! -d $installdir; then
11469      mkdir -p $installdir
11470    fi
11471    if test ! -d $installdir; then
11472      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11473    fi
11474    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11475    touch $tmpfile
11476    if test ! -f $tmpfile; then
11477      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11478    fi
11479
11480  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11481  # $tmpfile is the local file name for the downloaded file.
11482  VALID_TOOL=no
11483  if test "x$BDEPS_FTP" = xwget; then
11484    VALID_TOOL=yes
11485    wget -O $tmpfile $with_builddeps_server/$resource
11486  fi
11487  if test "x$BDEPS_FTP" = xlftp; then
11488    VALID_TOOL=yes
11489    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11490  fi
11491  if test "x$BDEPS_FTP" = xftp; then
11492    VALID_TOOL=yes
11493    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11494    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11495    FTPUSERPWD=${FTPSERVER%%@*}
11496    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11497      FTPUSER=${userpwd%%:*}
11498      FTPPWD=${userpwd#*@}
11499      FTPSERVER=${FTPSERVER#*@}
11500    else
11501      FTPUSER=ftp
11502      FTPPWD=ftp
11503    fi
11504    # the "pass" command does not work on some
11505    # ftp clients (read ftp.exe) but if it works,
11506    # passive mode is better!
11507    ( \
11508        echo "user $FTPUSER $FTPPWD"        ; \
11509        echo "pass"                         ; \
11510        echo "bin"                          ; \
11511        echo "get $FTPPATH $tmpfile"              ; \
11512    ) | ftp -in $FTPSERVER
11513  fi
11514  if test "x$VALID_TOOL" != xyes; then
11515    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11516  fi
11517
11518    mv $tmpfile $installdir/$filename
11519    if test ! -s $installdir/$filename; then
11520      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11521    fi
11522    case "$extension" in
11523      zip)  echo "Unzipping $installdir/$filename..."
11524        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11525        ;;
11526      tar.gz) echo "Untaring $installdir/$filename..."
11527        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11528        ;;
11529      tgz) echo "Untaring $installdir/$filename..."
11530        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11531        ;;
11532      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11533        ;;
11534    esac
11535  fi
11536  if test -f $installdir/$filename.unpacked; then
11537    depdir=$installdir
11538  fi
11539
11540      fi
11541      # Source the builddeps file again, because in the previous command, the depdir
11542      # was updated to point at the current build dependency install directory.
11543      . $builddepsfile
11544      # Now extract variables from the builddeps.conf files.
11545      theroot=${builddep_bootjdk_ROOT}
11546      thecflags=${builddep_bootjdk_CFLAGS}
11547      thelibs=${builddep_bootjdk_LIBS}
11548      if test "x$depdir" = x; then
11549        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11550      fi
11551      BOOT_JDK=$depdir
11552      if test "x$theroot" != x; then
11553        BOOT_JDK="$theroot"
11554      fi
11555      if test "x$thecflags" != x; then
11556        BOOT_JDK_CFLAGS="$thecflags"
11557      fi
11558      if test "x$thelibs" != x; then
11559        BOOT_JDK_LIBS="$thelibs"
11560      fi
11561      BOOT_JDK_FOUND=maybe
11562      else BOOT_JDK_FOUND=no
11563
11564    fi
11565    else BOOT_JDK_FOUND=no
11566
11567  fi
11568
11569
11570
11571    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11572    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11573      # Do we have a bin/java?
11574      if test ! -x "$BOOT_JDK/bin/java"; then
11575        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11576$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11577        BOOT_JDK_FOUND=no
11578      else
11579        # Do we have a bin/javac?
11580        if test ! -x "$BOOT_JDK/bin/javac"; then
11581          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11582$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11583          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11584$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11585          BOOT_JDK_FOUND=no
11586        else
11587          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11588          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11589            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11590$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11591            BOOT_JDK_FOUND=no
11592          else
11593            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11594            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11595
11596            # Extra M4 quote needed to protect [] in grep expression.
11597            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11598            if test "x$FOUND_VERSION_78" = x; then
11599              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11600$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11601              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11602$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11603              BOOT_JDK_FOUND=no
11604            else
11605              # We're done! :-)
11606              BOOT_JDK_FOUND=yes
11607
11608  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11609
11610  # Input might be given as Windows format, start by converting to
11611  # unix format.
11612  path="$BOOT_JDK"
11613  new_path=`$CYGPATH -u "$path"`
11614
11615  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11616  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11617  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11618  # "foo.exe" is OK but "foo" is an error.
11619  #
11620  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11621  # It is also a way to make sure we got the proper file name for the real test later on.
11622  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11623  if test "x$test_shortpath" = x; then
11624    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11625$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11626    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11627  fi
11628
11629  # Call helper function which possibly converts this using DOS-style short mode.
11630  # If so, the updated path is stored in $new_path.
11631
11632  input_path="$new_path"
11633  # Check if we need to convert this using DOS-style short mode. If the path
11634  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11635  # take no chances and rewrite it.
11636  # Note: m4 eats our [], so we need to use [ and ] instead.
11637  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11638  if test "x$has_forbidden_chars" != x; then
11639    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11640    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11641    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11642    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11643      # Going to short mode and back again did indeed matter. Since short mode is
11644      # case insensitive, let's make it lowercase to improve readability.
11645      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11646      # Now convert it back to Unix-stile (cygpath)
11647      input_path=`$CYGPATH -u "$shortmode_path"`
11648      new_path="$input_path"
11649    fi
11650  fi
11651
11652  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11653  if test "x$test_cygdrive_prefix" = x; then
11654    # As a simple fix, exclude /usr/bin since it's not a real path.
11655    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11656      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11657      # a path prefixed by /cygdrive for fixpath to work.
11658      new_path="$CYGWIN_ROOT_PATH$input_path"
11659    fi
11660  fi
11661
11662
11663  if test "x$path" != "x$new_path"; then
11664    BOOT_JDK="$new_path"
11665    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11666$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11667  fi
11668
11669  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11670
11671  path="$BOOT_JDK"
11672  has_colon=`$ECHO $path | $GREP ^.:`
11673  new_path="$path"
11674  if test "x$has_colon" = x; then
11675    # Not in mixed or Windows style, start by that.
11676    new_path=`cmd //c echo $path`
11677  fi
11678
11679
11680  input_path="$new_path"
11681  # Check if we need to convert this using DOS-style short mode. If the path
11682  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11683  # take no chances and rewrite it.
11684  # Note: m4 eats our [], so we need to use [ and ] instead.
11685  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11686  if test "x$has_forbidden_chars" != x; then
11687    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11688    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11689  fi
11690
11691
11692  windows_path="$new_path"
11693  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11694    unix_path=`$CYGPATH -u "$windows_path"`
11695    new_path="$unix_path"
11696  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11697    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11698    new_path="$unix_path"
11699  fi
11700
11701  if test "x$path" != "x$new_path"; then
11702    BOOT_JDK="$new_path"
11703    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11704$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11705  fi
11706
11707  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11708  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11709
11710  else
11711    # We're on a posix platform. Hooray! :)
11712    path="$BOOT_JDK"
11713    has_space=`$ECHO "$path" | $GREP " "`
11714    if test "x$has_space" != x; then
11715      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11716$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11717      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11718    fi
11719
11720    # Use eval to expand a potential ~
11721    eval path="$path"
11722    if test ! -f "$path" && test ! -d "$path"; then
11723      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11724    fi
11725
11726    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11727  fi
11728
11729              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11730$as_echo_n "checking for Boot JDK... " >&6; }
11731              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11732$as_echo "$BOOT_JDK" >&6; }
11733              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11734$as_echo_n "checking Boot JDK version... " >&6; }
11735              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11736              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11737$as_echo "$BOOT_JDK_VERSION" >&6; }
11738            fi # end check jdk version
11739          fi # end check rt.jar
11740        fi # end check javac
11741      fi # end check java
11742    fi # end check boot jdk found
11743  fi
11744
11745
11746  # Test: Is $JAVA_HOME set?
11747
11748  if test "x$BOOT_JDK_FOUND" = xno; then
11749    # Now execute the test
11750
11751  if test "x$JAVA_HOME" != x; then
11752    JAVA_HOME_PROCESSED="$JAVA_HOME"
11753
11754  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11755
11756  # Input might be given as Windows format, start by converting to
11757  # unix format.
11758  path="$JAVA_HOME_PROCESSED"
11759  new_path=`$CYGPATH -u "$path"`
11760
11761  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11762  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11763  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11764  # "foo.exe" is OK but "foo" is an error.
11765  #
11766  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11767  # It is also a way to make sure we got the proper file name for the real test later on.
11768  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11769  if test "x$test_shortpath" = x; then
11770    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11771$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11772    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11773  fi
11774
11775  # Call helper function which possibly converts this using DOS-style short mode.
11776  # If so, the updated path is stored in $new_path.
11777
11778  input_path="$new_path"
11779  # Check if we need to convert this using DOS-style short mode. If the path
11780  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11781  # take no chances and rewrite it.
11782  # Note: m4 eats our [], so we need to use [ and ] instead.
11783  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11784  if test "x$has_forbidden_chars" != x; then
11785    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11786    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11787    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11788    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11789      # Going to short mode and back again did indeed matter. Since short mode is
11790      # case insensitive, let's make it lowercase to improve readability.
11791      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11792      # Now convert it back to Unix-stile (cygpath)
11793      input_path=`$CYGPATH -u "$shortmode_path"`
11794      new_path="$input_path"
11795    fi
11796  fi
11797
11798  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11799  if test "x$test_cygdrive_prefix" = x; then
11800    # As a simple fix, exclude /usr/bin since it's not a real path.
11801    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11802      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11803      # a path prefixed by /cygdrive for fixpath to work.
11804      new_path="$CYGWIN_ROOT_PATH$input_path"
11805    fi
11806  fi
11807
11808
11809  if test "x$path" != "x$new_path"; then
11810    JAVA_HOME_PROCESSED="$new_path"
11811    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11812$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11813  fi
11814
11815  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11816
11817  path="$JAVA_HOME_PROCESSED"
11818  has_colon=`$ECHO $path | $GREP ^.:`
11819  new_path="$path"
11820  if test "x$has_colon" = x; then
11821    # Not in mixed or Windows style, start by that.
11822    new_path=`cmd //c echo $path`
11823  fi
11824
11825
11826  input_path="$new_path"
11827  # Check if we need to convert this using DOS-style short mode. If the path
11828  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11829  # take no chances and rewrite it.
11830  # Note: m4 eats our [], so we need to use [ and ] instead.
11831  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11832  if test "x$has_forbidden_chars" != x; then
11833    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11834    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11835  fi
11836
11837
11838  windows_path="$new_path"
11839  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11840    unix_path=`$CYGPATH -u "$windows_path"`
11841    new_path="$unix_path"
11842  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11843    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11844    new_path="$unix_path"
11845  fi
11846
11847  if test "x$path" != "x$new_path"; then
11848    JAVA_HOME_PROCESSED="$new_path"
11849    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11850$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11851  fi
11852
11853  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11854  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11855
11856  else
11857    # We're on a posix platform. Hooray! :)
11858    path="$JAVA_HOME_PROCESSED"
11859    has_space=`$ECHO "$path" | $GREP " "`
11860    if test "x$has_space" != x; then
11861      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11862$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11863      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11864    fi
11865
11866    # Use eval to expand a potential ~
11867    eval path="$path"
11868    if test ! -f "$path" && test ! -d "$path"; then
11869      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11870    fi
11871
11872    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
11873  fi
11874
11875    if test ! -d "$JAVA_HOME_PROCESSED"; then
11876      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11877$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11878    else
11879      # Aha, the user has set a JAVA_HOME
11880      # let us use that as the Boot JDK.
11881      BOOT_JDK="$JAVA_HOME_PROCESSED"
11882      BOOT_JDK_FOUND=maybe
11883      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11884$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11885    fi
11886  fi
11887
11888
11889    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11890    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11891      # Do we have a bin/java?
11892      if test ! -x "$BOOT_JDK/bin/java"; then
11893        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11894$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11895        BOOT_JDK_FOUND=no
11896      else
11897        # Do we have a bin/javac?
11898        if test ! -x "$BOOT_JDK/bin/javac"; then
11899          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11900$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11901          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11902$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11903          BOOT_JDK_FOUND=no
11904        else
11905          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11906          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11907            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11908$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11909            BOOT_JDK_FOUND=no
11910          else
11911            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11912            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11913
11914            # Extra M4 quote needed to protect [] in grep expression.
11915            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11916            if test "x$FOUND_VERSION_78" = x; then
11917              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11918$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11919              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11920$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11921              BOOT_JDK_FOUND=no
11922            else
11923              # We're done! :-)
11924              BOOT_JDK_FOUND=yes
11925
11926  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11927
11928  # Input might be given as Windows format, start by converting to
11929  # unix format.
11930  path="$BOOT_JDK"
11931  new_path=`$CYGPATH -u "$path"`
11932
11933  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11934  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11935  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11936  # "foo.exe" is OK but "foo" is an error.
11937  #
11938  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11939  # It is also a way to make sure we got the proper file name for the real test later on.
11940  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11941  if test "x$test_shortpath" = x; then
11942    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11943$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11944    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11945  fi
11946
11947  # Call helper function which possibly converts this using DOS-style short mode.
11948  # If so, the updated path is stored in $new_path.
11949
11950  input_path="$new_path"
11951  # Check if we need to convert this using DOS-style short mode. If the path
11952  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11953  # take no chances and rewrite it.
11954  # Note: m4 eats our [], so we need to use [ and ] instead.
11955  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11956  if test "x$has_forbidden_chars" != x; then
11957    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11958    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11959    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11960    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11961      # Going to short mode and back again did indeed matter. Since short mode is
11962      # case insensitive, let's make it lowercase to improve readability.
11963      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11964      # Now convert it back to Unix-stile (cygpath)
11965      input_path=`$CYGPATH -u "$shortmode_path"`
11966      new_path="$input_path"
11967    fi
11968  fi
11969
11970  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11971  if test "x$test_cygdrive_prefix" = x; then
11972    # As a simple fix, exclude /usr/bin since it's not a real path.
11973    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11974      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11975      # a path prefixed by /cygdrive for fixpath to work.
11976      new_path="$CYGWIN_ROOT_PATH$input_path"
11977    fi
11978  fi
11979
11980
11981  if test "x$path" != "x$new_path"; then
11982    BOOT_JDK="$new_path"
11983    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11984$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11985  fi
11986
11987  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11988
11989  path="$BOOT_JDK"
11990  has_colon=`$ECHO $path | $GREP ^.:`
11991  new_path="$path"
11992  if test "x$has_colon" = x; then
11993    # Not in mixed or Windows style, start by that.
11994    new_path=`cmd //c echo $path`
11995  fi
11996
11997
11998  input_path="$new_path"
11999  # Check if we need to convert this using DOS-style short mode. If the path
12000  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12001  # take no chances and rewrite it.
12002  # Note: m4 eats our [], so we need to use [ and ] instead.
12003  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12004  if test "x$has_forbidden_chars" != x; then
12005    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12006    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12007  fi
12008
12009
12010  windows_path="$new_path"
12011  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12012    unix_path=`$CYGPATH -u "$windows_path"`
12013    new_path="$unix_path"
12014  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12015    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12016    new_path="$unix_path"
12017  fi
12018
12019  if test "x$path" != "x$new_path"; then
12020    BOOT_JDK="$new_path"
12021    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12022$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12023  fi
12024
12025  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12026  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12027
12028  else
12029    # We're on a posix platform. Hooray! :)
12030    path="$BOOT_JDK"
12031    has_space=`$ECHO "$path" | $GREP " "`
12032    if test "x$has_space" != x; then
12033      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12034$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12035      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12036    fi
12037
12038    # Use eval to expand a potential ~
12039    eval path="$path"
12040    if test ! -f "$path" && test ! -d "$path"; then
12041      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12042    fi
12043
12044    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12045  fi
12046
12047              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12048$as_echo_n "checking for Boot JDK... " >&6; }
12049              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12050$as_echo "$BOOT_JDK" >&6; }
12051              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12052$as_echo_n "checking Boot JDK version... " >&6; }
12053              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12054              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12055$as_echo "$BOOT_JDK_VERSION" >&6; }
12056            fi # end check jdk version
12057          fi # end check rt.jar
12058        fi # end check javac
12059      fi # end check java
12060    fi # end check boot jdk found
12061  fi
12062
12063
12064  # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
12065
12066  if test "x$BOOT_JDK_FOUND" = xno; then
12067    # Now execute the test
12068
12069  if test -x /usr/libexec/java_home; then
12070    BOOT_JDK=`/usr/libexec/java_home`
12071    BOOT_JDK_FOUND=maybe
12072    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
12073$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
12074  fi
12075
12076
12077    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12078    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12079      # Do we have a bin/java?
12080      if test ! -x "$BOOT_JDK/bin/java"; then
12081        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12082$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12083        BOOT_JDK_FOUND=no
12084      else
12085        # Do we have a bin/javac?
12086        if test ! -x "$BOOT_JDK/bin/javac"; then
12087          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12088$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12089          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12090$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12091          BOOT_JDK_FOUND=no
12092        else
12093          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12094          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12095            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12096$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12097            BOOT_JDK_FOUND=no
12098          else
12099            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12100            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12101
12102            # Extra M4 quote needed to protect [] in grep expression.
12103            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12104            if test "x$FOUND_VERSION_78" = x; then
12105              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12106$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12107              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12108$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12109              BOOT_JDK_FOUND=no
12110            else
12111              # We're done! :-)
12112              BOOT_JDK_FOUND=yes
12113
12114  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12115
12116  # Input might be given as Windows format, start by converting to
12117  # unix format.
12118  path="$BOOT_JDK"
12119  new_path=`$CYGPATH -u "$path"`
12120
12121  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12122  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12123  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12124  # "foo.exe" is OK but "foo" is an error.
12125  #
12126  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12127  # It is also a way to make sure we got the proper file name for the real test later on.
12128  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12129  if test "x$test_shortpath" = x; then
12130    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12131$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12132    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12133  fi
12134
12135  # Call helper function which possibly converts this using DOS-style short mode.
12136  # If so, the updated path is stored in $new_path.
12137
12138  input_path="$new_path"
12139  # Check if we need to convert this using DOS-style short mode. If the path
12140  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12141  # take no chances and rewrite it.
12142  # Note: m4 eats our [], so we need to use [ and ] instead.
12143  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12144  if test "x$has_forbidden_chars" != x; then
12145    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12146    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12147    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12148    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12149      # Going to short mode and back again did indeed matter. Since short mode is
12150      # case insensitive, let's make it lowercase to improve readability.
12151      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12152      # Now convert it back to Unix-stile (cygpath)
12153      input_path=`$CYGPATH -u "$shortmode_path"`
12154      new_path="$input_path"
12155    fi
12156  fi
12157
12158  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12159  if test "x$test_cygdrive_prefix" = x; then
12160    # As a simple fix, exclude /usr/bin since it's not a real path.
12161    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12162      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12163      # a path prefixed by /cygdrive for fixpath to work.
12164      new_path="$CYGWIN_ROOT_PATH$input_path"
12165    fi
12166  fi
12167
12168
12169  if test "x$path" != "x$new_path"; then
12170    BOOT_JDK="$new_path"
12171    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12172$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12173  fi
12174
12175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12176
12177  path="$BOOT_JDK"
12178  has_colon=`$ECHO $path | $GREP ^.:`
12179  new_path="$path"
12180  if test "x$has_colon" = x; then
12181    # Not in mixed or Windows style, start by that.
12182    new_path=`cmd //c echo $path`
12183  fi
12184
12185
12186  input_path="$new_path"
12187  # Check if we need to convert this using DOS-style short mode. If the path
12188  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12189  # take no chances and rewrite it.
12190  # Note: m4 eats our [], so we need to use [ and ] instead.
12191  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12192  if test "x$has_forbidden_chars" != x; then
12193    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12194    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12195  fi
12196
12197
12198  windows_path="$new_path"
12199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12200    unix_path=`$CYGPATH -u "$windows_path"`
12201    new_path="$unix_path"
12202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12203    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12204    new_path="$unix_path"
12205  fi
12206
12207  if test "x$path" != "x$new_path"; then
12208    BOOT_JDK="$new_path"
12209    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12210$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12211  fi
12212
12213  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12214  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12215
12216  else
12217    # We're on a posix platform. Hooray! :)
12218    path="$BOOT_JDK"
12219    has_space=`$ECHO "$path" | $GREP " "`
12220    if test "x$has_space" != x; then
12221      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12222$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12223      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12224    fi
12225
12226    # Use eval to expand a potential ~
12227    eval path="$path"
12228    if test ! -f "$path" && test ! -d "$path"; then
12229      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12230    fi
12231
12232    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12233  fi
12234
12235              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12236$as_echo_n "checking for Boot JDK... " >&6; }
12237              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12238$as_echo "$BOOT_JDK" >&6; }
12239              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12240$as_echo_n "checking Boot JDK version... " >&6; }
12241              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12242              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12243$as_echo "$BOOT_JDK_VERSION" >&6; }
12244            fi # end check jdk version
12245          fi # end check rt.jar
12246        fi # end check javac
12247      fi # end check java
12248    fi # end check boot jdk found
12249  fi
12250
12251
12252  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
12253
12254  if test "x$BOOT_JDK_FOUND" = xno; then
12255    # Now execute the test
12256
12257  # Extract the first word of "javac", so it can be a program name with args.
12258set dummy javac; ac_word=$2
12259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12260$as_echo_n "checking for $ac_word... " >&6; }
12261if ${ac_cv_path_JAVAC_CHECK+:} false; then :
12262  $as_echo_n "(cached) " >&6
12263else
12264  case $JAVAC_CHECK in
12265  [\\/]* | ?:[\\/]*)
12266  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
12267  ;;
12268  *)
12269  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12270for as_dir in $PATH
12271do
12272  IFS=$as_save_IFS
12273  test -z "$as_dir" && as_dir=.
12274    for ac_exec_ext in '' $ac_executable_extensions; do
12275  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12276    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
12277    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12278    break 2
12279  fi
12280done
12281  done
12282IFS=$as_save_IFS
12283
12284  ;;
12285esac
12286fi
12287JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
12288if test -n "$JAVAC_CHECK"; then
12289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
12290$as_echo "$JAVAC_CHECK" >&6; }
12291else
12292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12293$as_echo "no" >&6; }
12294fi
12295
12296
12297  # Extract the first word of "java", so it can be a program name with args.
12298set dummy java; ac_word=$2
12299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12300$as_echo_n "checking for $ac_word... " >&6; }
12301if ${ac_cv_path_JAVA_CHECK+:} false; then :
12302  $as_echo_n "(cached) " >&6
12303else
12304  case $JAVA_CHECK in
12305  [\\/]* | ?:[\\/]*)
12306  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
12307  ;;
12308  *)
12309  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12310for as_dir in $PATH
12311do
12312  IFS=$as_save_IFS
12313  test -z "$as_dir" && as_dir=.
12314    for ac_exec_ext in '' $ac_executable_extensions; do
12315  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12316    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
12317    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12318    break 2
12319  fi
12320done
12321  done
12322IFS=$as_save_IFS
12323
12324  ;;
12325esac
12326fi
12327JAVA_CHECK=$ac_cv_path_JAVA_CHECK
12328if test -n "$JAVA_CHECK"; then
12329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
12330$as_echo "$JAVA_CHECK" >&6; }
12331else
12332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12333$as_echo "no" >&6; }
12334fi
12335
12336
12337  BINARY="$JAVAC_CHECK"
12338  if test "x$JAVAC_CHECK" = x; then
12339    BINARY="$JAVA_CHECK"
12340  fi
12341  if test "x$BINARY" != x; then
12342    # So there is a java(c) binary, it might be part of a JDK.
12343    # Lets find the JDK/JRE directory by following symbolic links.
12344    # Linux/GNU systems often have links from /usr/bin/java to
12345    # /etc/alternatives/java to the real JDK binary.
12346
12347  if test "x$OPENJDK_BUILD_OS" != xwindows; then
12348    # Follow a chain of symbolic links. Use readlink
12349    # where it exists, else fall back to horribly
12350    # complicated shell code.
12351    if test "x$READLINK_TESTED" != yes; then
12352      # On MacOSX there is a readlink tool with a different
12353      # purpose than the GNU readlink tool. Check the found readlink.
12354      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12355      if test "x$ISGNU" = x; then
12356        # A readlink that we do not know how to use.
12357        # Are there other non-GNU readlinks out there?
12358        READLINK_TESTED=yes
12359        READLINK=
12360      fi
12361    fi
12362
12363    if test "x$READLINK" != x; then
12364      BINARY=`$READLINK -f $BINARY`
12365    else
12366      # Save the current directory for restoring afterwards
12367      STARTDIR=$PWD
12368      COUNTER=0
12369      sym_link_dir=`$DIRNAME $BINARY`
12370      sym_link_file=`$BASENAME $BINARY`
12371      cd $sym_link_dir
12372      # Use -P flag to resolve symlinks in directories.
12373      cd `$THEPWDCMD -P`
12374      sym_link_dir=`$THEPWDCMD -P`
12375      # Resolve file symlinks
12376      while test $COUNTER -lt 20; do
12377        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12378        if test "x$ISLINK" == x; then
12379          # This is not a symbolic link! We are done!
12380          break
12381        fi
12382        # Again resolve directory symlinks since the target of the just found
12383        # link could be in a different directory
12384        cd `$DIRNAME $ISLINK`
12385        sym_link_dir=`$THEPWDCMD -P`
12386        sym_link_file=`$BASENAME $ISLINK`
12387        let COUNTER=COUNTER+1
12388      done
12389      cd $STARTDIR
12390      BINARY=$sym_link_dir/$sym_link_file
12391    fi
12392  fi
12393
12394    BOOT_JDK=`dirname "$BINARY"`
12395    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12396    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12397      # Looks like we found ourselves an JDK
12398      BOOT_JDK_FOUND=maybe
12399      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12400$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12401    fi
12402  fi
12403
12404
12405    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12406    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12407      # Do we have a bin/java?
12408      if test ! -x "$BOOT_JDK/bin/java"; then
12409        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12410$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12411        BOOT_JDK_FOUND=no
12412      else
12413        # Do we have a bin/javac?
12414        if test ! -x "$BOOT_JDK/bin/javac"; then
12415          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12416$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12417          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12418$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12419          BOOT_JDK_FOUND=no
12420        else
12421          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12422          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12423            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12424$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12425            BOOT_JDK_FOUND=no
12426          else
12427            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12428            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12429
12430            # Extra M4 quote needed to protect [] in grep expression.
12431            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12432            if test "x$FOUND_VERSION_78" = x; then
12433              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12434$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12435              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12436$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12437              BOOT_JDK_FOUND=no
12438            else
12439              # We're done! :-)
12440              BOOT_JDK_FOUND=yes
12441
12442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12443
12444  # Input might be given as Windows format, start by converting to
12445  # unix format.
12446  path="$BOOT_JDK"
12447  new_path=`$CYGPATH -u "$path"`
12448
12449  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12450  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12451  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12452  # "foo.exe" is OK but "foo" is an error.
12453  #
12454  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12455  # It is also a way to make sure we got the proper file name for the real test later on.
12456  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12457  if test "x$test_shortpath" = x; then
12458    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12459$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12460    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12461  fi
12462
12463  # Call helper function which possibly converts this using DOS-style short mode.
12464  # If so, the updated path is stored in $new_path.
12465
12466  input_path="$new_path"
12467  # Check if we need to convert this using DOS-style short mode. If the path
12468  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12469  # take no chances and rewrite it.
12470  # Note: m4 eats our [], so we need to use [ and ] instead.
12471  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12472  if test "x$has_forbidden_chars" != x; then
12473    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12474    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12475    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12476    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12477      # Going to short mode and back again did indeed matter. Since short mode is
12478      # case insensitive, let's make it lowercase to improve readability.
12479      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12480      # Now convert it back to Unix-stile (cygpath)
12481      input_path=`$CYGPATH -u "$shortmode_path"`
12482      new_path="$input_path"
12483    fi
12484  fi
12485
12486  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12487  if test "x$test_cygdrive_prefix" = x; then
12488    # As a simple fix, exclude /usr/bin since it's not a real path.
12489    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12490      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12491      # a path prefixed by /cygdrive for fixpath to work.
12492      new_path="$CYGWIN_ROOT_PATH$input_path"
12493    fi
12494  fi
12495
12496
12497  if test "x$path" != "x$new_path"; then
12498    BOOT_JDK="$new_path"
12499    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12500$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12501  fi
12502
12503  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12504
12505  path="$BOOT_JDK"
12506  has_colon=`$ECHO $path | $GREP ^.:`
12507  new_path="$path"
12508  if test "x$has_colon" = x; then
12509    # Not in mixed or Windows style, start by that.
12510    new_path=`cmd //c echo $path`
12511  fi
12512
12513
12514  input_path="$new_path"
12515  # Check if we need to convert this using DOS-style short mode. If the path
12516  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12517  # take no chances and rewrite it.
12518  # Note: m4 eats our [], so we need to use [ and ] instead.
12519  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12520  if test "x$has_forbidden_chars" != x; then
12521    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12522    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12523  fi
12524
12525
12526  windows_path="$new_path"
12527  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12528    unix_path=`$CYGPATH -u "$windows_path"`
12529    new_path="$unix_path"
12530  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12531    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12532    new_path="$unix_path"
12533  fi
12534
12535  if test "x$path" != "x$new_path"; then
12536    BOOT_JDK="$new_path"
12537    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12538$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12539  fi
12540
12541  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12542  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12543
12544  else
12545    # We're on a posix platform. Hooray! :)
12546    path="$BOOT_JDK"
12547    has_space=`$ECHO "$path" | $GREP " "`
12548    if test "x$has_space" != x; then
12549      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12550$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12551      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12552    fi
12553
12554    # Use eval to expand a potential ~
12555    eval path="$path"
12556    if test ! -f "$path" && test ! -d "$path"; then
12557      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12558    fi
12559
12560    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12561  fi
12562
12563              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12564$as_echo_n "checking for Boot JDK... " >&6; }
12565              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12566$as_echo "$BOOT_JDK" >&6; }
12567              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12568$as_echo_n "checking Boot JDK version... " >&6; }
12569              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12570              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12571$as_echo "$BOOT_JDK_VERSION" >&6; }
12572            fi # end check jdk version
12573          fi # end check rt.jar
12574        fi # end check javac
12575      fi # end check java
12576    fi # end check boot jdk found
12577  fi
12578
12579
12580  # Test: Is there a JDK installed in default, well-known locations?
12581
12582  if test "x$BOOT_JDK_FOUND" = xno; then
12583    # Now execute the test
12584
12585  if test "x$OPENJDK_TARGET_OS" = xwindows; then
12586
12587  if test "x$BOOT_JDK_FOUND" = xno; then
12588    # Now execute the test
12589
12590  if test "x$ProgramW6432" != x; then
12591    VIRTUAL_DIR="$ProgramW6432/Java"
12592
12593  windows_path="$VIRTUAL_DIR"
12594  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12595    unix_path=`$CYGPATH -u "$windows_path"`
12596    VIRTUAL_DIR="$unix_path"
12597  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12598    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12599    VIRTUAL_DIR="$unix_path"
12600  fi
12601
12602
12603  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12604  BOOT_JDK_SUFFIX=""
12605  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12606  if test "x$ALL_JDKS_FOUND" != x; then
12607    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12608
12609  if test "x$BOOT_JDK_FOUND" = xno; then
12610    # Now execute the test
12611
12612        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12613        if test -d "$BOOT_JDK"; then
12614          BOOT_JDK_FOUND=maybe
12615          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12616$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12617        fi
12618
12619
12620    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12621    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12622      # Do we have a bin/java?
12623      if test ! -x "$BOOT_JDK/bin/java"; then
12624        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12625$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12626        BOOT_JDK_FOUND=no
12627      else
12628        # Do we have a bin/javac?
12629        if test ! -x "$BOOT_JDK/bin/javac"; then
12630          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12631$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12632          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12633$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12634          BOOT_JDK_FOUND=no
12635        else
12636          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12637          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12638            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12639$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12640            BOOT_JDK_FOUND=no
12641          else
12642            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12643            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12644
12645            # Extra M4 quote needed to protect [] in grep expression.
12646            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12647            if test "x$FOUND_VERSION_78" = x; then
12648              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12649$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12650              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12651$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12652              BOOT_JDK_FOUND=no
12653            else
12654              # We're done! :-)
12655              BOOT_JDK_FOUND=yes
12656
12657  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12658
12659  # Input might be given as Windows format, start by converting to
12660  # unix format.
12661  path="$BOOT_JDK"
12662  new_path=`$CYGPATH -u "$path"`
12663
12664  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12665  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12666  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12667  # "foo.exe" is OK but "foo" is an error.
12668  #
12669  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12670  # It is also a way to make sure we got the proper file name for the real test later on.
12671  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12672  if test "x$test_shortpath" = x; then
12673    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12674$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12675    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12676  fi
12677
12678  # Call helper function which possibly converts this using DOS-style short mode.
12679  # If so, the updated path is stored in $new_path.
12680
12681  input_path="$new_path"
12682  # Check if we need to convert this using DOS-style short mode. If the path
12683  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12684  # take no chances and rewrite it.
12685  # Note: m4 eats our [], so we need to use [ and ] instead.
12686  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12687  if test "x$has_forbidden_chars" != x; then
12688    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12689    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12690    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12691    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12692      # Going to short mode and back again did indeed matter. Since short mode is
12693      # case insensitive, let's make it lowercase to improve readability.
12694      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12695      # Now convert it back to Unix-stile (cygpath)
12696      input_path=`$CYGPATH -u "$shortmode_path"`
12697      new_path="$input_path"
12698    fi
12699  fi
12700
12701  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12702  if test "x$test_cygdrive_prefix" = x; then
12703    # As a simple fix, exclude /usr/bin since it's not a real path.
12704    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12705      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12706      # a path prefixed by /cygdrive for fixpath to work.
12707      new_path="$CYGWIN_ROOT_PATH$input_path"
12708    fi
12709  fi
12710
12711
12712  if test "x$path" != "x$new_path"; then
12713    BOOT_JDK="$new_path"
12714    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12715$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12716  fi
12717
12718  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12719
12720  path="$BOOT_JDK"
12721  has_colon=`$ECHO $path | $GREP ^.:`
12722  new_path="$path"
12723  if test "x$has_colon" = x; then
12724    # Not in mixed or Windows style, start by that.
12725    new_path=`cmd //c echo $path`
12726  fi
12727
12728
12729  input_path="$new_path"
12730  # Check if we need to convert this using DOS-style short mode. If the path
12731  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12732  # take no chances and rewrite it.
12733  # Note: m4 eats our [], so we need to use [ and ] instead.
12734  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12735  if test "x$has_forbidden_chars" != x; then
12736    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12737    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12738  fi
12739
12740
12741  windows_path="$new_path"
12742  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12743    unix_path=`$CYGPATH -u "$windows_path"`
12744    new_path="$unix_path"
12745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12746    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12747    new_path="$unix_path"
12748  fi
12749
12750  if test "x$path" != "x$new_path"; then
12751    BOOT_JDK="$new_path"
12752    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12753$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12754  fi
12755
12756  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12757  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12758
12759  else
12760    # We're on a posix platform. Hooray! :)
12761    path="$BOOT_JDK"
12762    has_space=`$ECHO "$path" | $GREP " "`
12763    if test "x$has_space" != x; then
12764      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12765$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12766      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12767    fi
12768
12769    # Use eval to expand a potential ~
12770    eval path="$path"
12771    if test ! -f "$path" && test ! -d "$path"; then
12772      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12773    fi
12774
12775    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12776  fi
12777
12778              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12779$as_echo_n "checking for Boot JDK... " >&6; }
12780              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12781$as_echo "$BOOT_JDK" >&6; }
12782              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12783$as_echo_n "checking Boot JDK version... " >&6; }
12784              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12785              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12786$as_echo "$BOOT_JDK_VERSION" >&6; }
12787            fi # end check jdk version
12788          fi # end check rt.jar
12789        fi # end check javac
12790      fi # end check java
12791    fi # end check boot jdk found
12792  fi
12793
12794    done
12795  fi
12796
12797  fi
12798
12799
12800    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12801    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12802      # Do we have a bin/java?
12803      if test ! -x "$BOOT_JDK/bin/java"; then
12804        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12805$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12806        BOOT_JDK_FOUND=no
12807      else
12808        # Do we have a bin/javac?
12809        if test ! -x "$BOOT_JDK/bin/javac"; then
12810          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12811$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12812          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12813$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12814          BOOT_JDK_FOUND=no
12815        else
12816          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12817          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12818            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12819$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12820            BOOT_JDK_FOUND=no
12821          else
12822            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12823            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12824
12825            # Extra M4 quote needed to protect [] in grep expression.
12826            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12827            if test "x$FOUND_VERSION_78" = x; then
12828              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12829$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12830              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12831$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12832              BOOT_JDK_FOUND=no
12833            else
12834              # We're done! :-)
12835              BOOT_JDK_FOUND=yes
12836
12837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12838
12839  # Input might be given as Windows format, start by converting to
12840  # unix format.
12841  path="$BOOT_JDK"
12842  new_path=`$CYGPATH -u "$path"`
12843
12844  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12845  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12846  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12847  # "foo.exe" is OK but "foo" is an error.
12848  #
12849  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12850  # It is also a way to make sure we got the proper file name for the real test later on.
12851  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12852  if test "x$test_shortpath" = x; then
12853    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12854$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12855    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12856  fi
12857
12858  # Call helper function which possibly converts this using DOS-style short mode.
12859  # If so, the updated path is stored in $new_path.
12860
12861  input_path="$new_path"
12862  # Check if we need to convert this using DOS-style short mode. If the path
12863  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12864  # take no chances and rewrite it.
12865  # Note: m4 eats our [], so we need to use [ and ] instead.
12866  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12867  if test "x$has_forbidden_chars" != x; then
12868    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12869    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12870    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12871    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12872      # Going to short mode and back again did indeed matter. Since short mode is
12873      # case insensitive, let's make it lowercase to improve readability.
12874      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12875      # Now convert it back to Unix-stile (cygpath)
12876      input_path=`$CYGPATH -u "$shortmode_path"`
12877      new_path="$input_path"
12878    fi
12879  fi
12880
12881  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12882  if test "x$test_cygdrive_prefix" = x; then
12883    # As a simple fix, exclude /usr/bin since it's not a real path.
12884    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12885      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12886      # a path prefixed by /cygdrive for fixpath to work.
12887      new_path="$CYGWIN_ROOT_PATH$input_path"
12888    fi
12889  fi
12890
12891
12892  if test "x$path" != "x$new_path"; then
12893    BOOT_JDK="$new_path"
12894    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12895$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12896  fi
12897
12898  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12899
12900  path="$BOOT_JDK"
12901  has_colon=`$ECHO $path | $GREP ^.:`
12902  new_path="$path"
12903  if test "x$has_colon" = x; then
12904    # Not in mixed or Windows style, start by that.
12905    new_path=`cmd //c echo $path`
12906  fi
12907
12908
12909  input_path="$new_path"
12910  # Check if we need to convert this using DOS-style short mode. If the path
12911  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12912  # take no chances and rewrite it.
12913  # Note: m4 eats our [], so we need to use [ and ] instead.
12914  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12915  if test "x$has_forbidden_chars" != x; then
12916    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12917    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12918  fi
12919
12920
12921  windows_path="$new_path"
12922  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12923    unix_path=`$CYGPATH -u "$windows_path"`
12924    new_path="$unix_path"
12925  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12926    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12927    new_path="$unix_path"
12928  fi
12929
12930  if test "x$path" != "x$new_path"; then
12931    BOOT_JDK="$new_path"
12932    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12933$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12934  fi
12935
12936  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12937  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12938
12939  else
12940    # We're on a posix platform. Hooray! :)
12941    path="$BOOT_JDK"
12942    has_space=`$ECHO "$path" | $GREP " "`
12943    if test "x$has_space" != x; then
12944      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12945$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12946      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12947    fi
12948
12949    # Use eval to expand a potential ~
12950    eval path="$path"
12951    if test ! -f "$path" && test ! -d "$path"; then
12952      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12953    fi
12954
12955    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12956  fi
12957
12958              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12959$as_echo_n "checking for Boot JDK... " >&6; }
12960              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12961$as_echo "$BOOT_JDK" >&6; }
12962              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12963$as_echo_n "checking Boot JDK version... " >&6; }
12964              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12965              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12966$as_echo "$BOOT_JDK_VERSION" >&6; }
12967            fi # end check jdk version
12968          fi # end check rt.jar
12969        fi # end check javac
12970      fi # end check java
12971    fi # end check boot jdk found
12972  fi
12973
12974
12975  if test "x$BOOT_JDK_FOUND" = xno; then
12976    # Now execute the test
12977
12978  if test "x$PROGRAMW6432" != x; then
12979    VIRTUAL_DIR="$PROGRAMW6432/Java"
12980
12981  windows_path="$VIRTUAL_DIR"
12982  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12983    unix_path=`$CYGPATH -u "$windows_path"`
12984    VIRTUAL_DIR="$unix_path"
12985  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12986    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12987    VIRTUAL_DIR="$unix_path"
12988  fi
12989
12990
12991  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12992  BOOT_JDK_SUFFIX=""
12993  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12994  if test "x$ALL_JDKS_FOUND" != x; then
12995    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12996
12997  if test "x$BOOT_JDK_FOUND" = xno; then
12998    # Now execute the test
12999
13000        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13001        if test -d "$BOOT_JDK"; then
13002          BOOT_JDK_FOUND=maybe
13003          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13004$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13005        fi
13006
13007
13008    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13009    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13010      # Do we have a bin/java?
13011      if test ! -x "$BOOT_JDK/bin/java"; then
13012        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13013$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13014        BOOT_JDK_FOUND=no
13015      else
13016        # Do we have a bin/javac?
13017        if test ! -x "$BOOT_JDK/bin/javac"; then
13018          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13019$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13020          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13021$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13022          BOOT_JDK_FOUND=no
13023        else
13024          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13025          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13026            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13027$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13028            BOOT_JDK_FOUND=no
13029          else
13030            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13031            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13032
13033            # Extra M4 quote needed to protect [] in grep expression.
13034            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13035            if test "x$FOUND_VERSION_78" = x; then
13036              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13037$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13038              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13039$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13040              BOOT_JDK_FOUND=no
13041            else
13042              # We're done! :-)
13043              BOOT_JDK_FOUND=yes
13044
13045  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13046
13047  # Input might be given as Windows format, start by converting to
13048  # unix format.
13049  path="$BOOT_JDK"
13050  new_path=`$CYGPATH -u "$path"`
13051
13052  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13053  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13054  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13055  # "foo.exe" is OK but "foo" is an error.
13056  #
13057  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13058  # It is also a way to make sure we got the proper file name for the real test later on.
13059  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13060  if test "x$test_shortpath" = x; then
13061    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13062$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13063    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13064  fi
13065
13066  # Call helper function which possibly converts this using DOS-style short mode.
13067  # If so, the updated path is stored in $new_path.
13068
13069  input_path="$new_path"
13070  # Check if we need to convert this using DOS-style short mode. If the path
13071  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13072  # take no chances and rewrite it.
13073  # Note: m4 eats our [], so we need to use [ and ] instead.
13074  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13075  if test "x$has_forbidden_chars" != x; then
13076    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13077    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13078    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13079    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13080      # Going to short mode and back again did indeed matter. Since short mode is
13081      # case insensitive, let's make it lowercase to improve readability.
13082      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13083      # Now convert it back to Unix-stile (cygpath)
13084      input_path=`$CYGPATH -u "$shortmode_path"`
13085      new_path="$input_path"
13086    fi
13087  fi
13088
13089  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13090  if test "x$test_cygdrive_prefix" = x; then
13091    # As a simple fix, exclude /usr/bin since it's not a real path.
13092    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13093      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13094      # a path prefixed by /cygdrive for fixpath to work.
13095      new_path="$CYGWIN_ROOT_PATH$input_path"
13096    fi
13097  fi
13098
13099
13100  if test "x$path" != "x$new_path"; then
13101    BOOT_JDK="$new_path"
13102    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13103$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13104  fi
13105
13106  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13107
13108  path="$BOOT_JDK"
13109  has_colon=`$ECHO $path | $GREP ^.:`
13110  new_path="$path"
13111  if test "x$has_colon" = x; then
13112    # Not in mixed or Windows style, start by that.
13113    new_path=`cmd //c echo $path`
13114  fi
13115
13116
13117  input_path="$new_path"
13118  # Check if we need to convert this using DOS-style short mode. If the path
13119  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13120  # take no chances and rewrite it.
13121  # Note: m4 eats our [], so we need to use [ and ] instead.
13122  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13123  if test "x$has_forbidden_chars" != x; then
13124    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13125    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13126  fi
13127
13128
13129  windows_path="$new_path"
13130  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13131    unix_path=`$CYGPATH -u "$windows_path"`
13132    new_path="$unix_path"
13133  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13134    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13135    new_path="$unix_path"
13136  fi
13137
13138  if test "x$path" != "x$new_path"; then
13139    BOOT_JDK="$new_path"
13140    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13141$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13142  fi
13143
13144  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13145  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13146
13147  else
13148    # We're on a posix platform. Hooray! :)
13149    path="$BOOT_JDK"
13150    has_space=`$ECHO "$path" | $GREP " "`
13151    if test "x$has_space" != x; then
13152      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13153$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13154      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13155    fi
13156
13157    # Use eval to expand a potential ~
13158    eval path="$path"
13159    if test ! -f "$path" && test ! -d "$path"; then
13160      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13161    fi
13162
13163    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13164  fi
13165
13166              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13167$as_echo_n "checking for Boot JDK... " >&6; }
13168              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13169$as_echo "$BOOT_JDK" >&6; }
13170              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13171$as_echo_n "checking Boot JDK version... " >&6; }
13172              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13173              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13174$as_echo "$BOOT_JDK_VERSION" >&6; }
13175            fi # end check jdk version
13176          fi # end check rt.jar
13177        fi # end check javac
13178      fi # end check java
13179    fi # end check boot jdk found
13180  fi
13181
13182    done
13183  fi
13184
13185  fi
13186
13187
13188    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13189    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13190      # Do we have a bin/java?
13191      if test ! -x "$BOOT_JDK/bin/java"; then
13192        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13193$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13194        BOOT_JDK_FOUND=no
13195      else
13196        # Do we have a bin/javac?
13197        if test ! -x "$BOOT_JDK/bin/javac"; then
13198          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13199$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13200          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13201$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13202          BOOT_JDK_FOUND=no
13203        else
13204          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13205          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13206            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13207$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13208            BOOT_JDK_FOUND=no
13209          else
13210            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13211            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13212
13213            # Extra M4 quote needed to protect [] in grep expression.
13214            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13215            if test "x$FOUND_VERSION_78" = x; then
13216              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13217$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13218              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13219$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13220              BOOT_JDK_FOUND=no
13221            else
13222              # We're done! :-)
13223              BOOT_JDK_FOUND=yes
13224
13225  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13226
13227  # Input might be given as Windows format, start by converting to
13228  # unix format.
13229  path="$BOOT_JDK"
13230  new_path=`$CYGPATH -u "$path"`
13231
13232  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13233  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13234  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13235  # "foo.exe" is OK but "foo" is an error.
13236  #
13237  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13238  # It is also a way to make sure we got the proper file name for the real test later on.
13239  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13240  if test "x$test_shortpath" = x; then
13241    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13242$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13243    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13244  fi
13245
13246  # Call helper function which possibly converts this using DOS-style short mode.
13247  # If so, the updated path is stored in $new_path.
13248
13249  input_path="$new_path"
13250  # Check if we need to convert this using DOS-style short mode. If the path
13251  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13252  # take no chances and rewrite it.
13253  # Note: m4 eats our [], so we need to use [ and ] instead.
13254  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13255  if test "x$has_forbidden_chars" != x; then
13256    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13257    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13258    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13259    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13260      # Going to short mode and back again did indeed matter. Since short mode is
13261      # case insensitive, let's make it lowercase to improve readability.
13262      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13263      # Now convert it back to Unix-stile (cygpath)
13264      input_path=`$CYGPATH -u "$shortmode_path"`
13265      new_path="$input_path"
13266    fi
13267  fi
13268
13269  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13270  if test "x$test_cygdrive_prefix" = x; then
13271    # As a simple fix, exclude /usr/bin since it's not a real path.
13272    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13273      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13274      # a path prefixed by /cygdrive for fixpath to work.
13275      new_path="$CYGWIN_ROOT_PATH$input_path"
13276    fi
13277  fi
13278
13279
13280  if test "x$path" != "x$new_path"; then
13281    BOOT_JDK="$new_path"
13282    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13283$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13284  fi
13285
13286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13287
13288  path="$BOOT_JDK"
13289  has_colon=`$ECHO $path | $GREP ^.:`
13290  new_path="$path"
13291  if test "x$has_colon" = x; then
13292    # Not in mixed or Windows style, start by that.
13293    new_path=`cmd //c echo $path`
13294  fi
13295
13296
13297  input_path="$new_path"
13298  # Check if we need to convert this using DOS-style short mode. If the path
13299  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13300  # take no chances and rewrite it.
13301  # Note: m4 eats our [], so we need to use [ and ] instead.
13302  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13303  if test "x$has_forbidden_chars" != x; then
13304    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13305    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13306  fi
13307
13308
13309  windows_path="$new_path"
13310  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13311    unix_path=`$CYGPATH -u "$windows_path"`
13312    new_path="$unix_path"
13313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13314    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13315    new_path="$unix_path"
13316  fi
13317
13318  if test "x$path" != "x$new_path"; then
13319    BOOT_JDK="$new_path"
13320    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13321$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13322  fi
13323
13324  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13325  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13326
13327  else
13328    # We're on a posix platform. Hooray! :)
13329    path="$BOOT_JDK"
13330    has_space=`$ECHO "$path" | $GREP " "`
13331    if test "x$has_space" != x; then
13332      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13333$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13334      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13335    fi
13336
13337    # Use eval to expand a potential ~
13338    eval path="$path"
13339    if test ! -f "$path" && test ! -d "$path"; then
13340      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13341    fi
13342
13343    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13344  fi
13345
13346              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13347$as_echo_n "checking for Boot JDK... " >&6; }
13348              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13349$as_echo "$BOOT_JDK" >&6; }
13350              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13351$as_echo_n "checking Boot JDK version... " >&6; }
13352              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13353              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13354$as_echo "$BOOT_JDK_VERSION" >&6; }
13355            fi # end check jdk version
13356          fi # end check rt.jar
13357        fi # end check javac
13358      fi # end check java
13359    fi # end check boot jdk found
13360  fi
13361
13362
13363  if test "x$BOOT_JDK_FOUND" = xno; then
13364    # Now execute the test
13365
13366  if test "x$PROGRAMFILES" != x; then
13367    VIRTUAL_DIR="$PROGRAMFILES/Java"
13368
13369  windows_path="$VIRTUAL_DIR"
13370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13371    unix_path=`$CYGPATH -u "$windows_path"`
13372    VIRTUAL_DIR="$unix_path"
13373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13374    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13375    VIRTUAL_DIR="$unix_path"
13376  fi
13377
13378
13379  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13380  BOOT_JDK_SUFFIX=""
13381  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13382  if test "x$ALL_JDKS_FOUND" != x; then
13383    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13384
13385  if test "x$BOOT_JDK_FOUND" = xno; then
13386    # Now execute the test
13387
13388        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13389        if test -d "$BOOT_JDK"; then
13390          BOOT_JDK_FOUND=maybe
13391          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13392$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13393        fi
13394
13395
13396    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13397    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13398      # Do we have a bin/java?
13399      if test ! -x "$BOOT_JDK/bin/java"; then
13400        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13401$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13402        BOOT_JDK_FOUND=no
13403      else
13404        # Do we have a bin/javac?
13405        if test ! -x "$BOOT_JDK/bin/javac"; then
13406          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13407$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13408          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13409$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13410          BOOT_JDK_FOUND=no
13411        else
13412          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13413          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13414            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13415$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13416            BOOT_JDK_FOUND=no
13417          else
13418            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13419            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13420
13421            # Extra M4 quote needed to protect [] in grep expression.
13422            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13423            if test "x$FOUND_VERSION_78" = x; then
13424              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13425$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13426              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13427$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13428              BOOT_JDK_FOUND=no
13429            else
13430              # We're done! :-)
13431              BOOT_JDK_FOUND=yes
13432
13433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13434
13435  # Input might be given as Windows format, start by converting to
13436  # unix format.
13437  path="$BOOT_JDK"
13438  new_path=`$CYGPATH -u "$path"`
13439
13440  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13441  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13442  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13443  # "foo.exe" is OK but "foo" is an error.
13444  #
13445  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13446  # It is also a way to make sure we got the proper file name for the real test later on.
13447  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13448  if test "x$test_shortpath" = x; then
13449    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13450$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13451    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13452  fi
13453
13454  # Call helper function which possibly converts this using DOS-style short mode.
13455  # If so, the updated path is stored in $new_path.
13456
13457  input_path="$new_path"
13458  # Check if we need to convert this using DOS-style short mode. If the path
13459  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13460  # take no chances and rewrite it.
13461  # Note: m4 eats our [], so we need to use [ and ] instead.
13462  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13463  if test "x$has_forbidden_chars" != x; then
13464    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13465    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13466    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13467    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13468      # Going to short mode and back again did indeed matter. Since short mode is
13469      # case insensitive, let's make it lowercase to improve readability.
13470      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13471      # Now convert it back to Unix-stile (cygpath)
13472      input_path=`$CYGPATH -u "$shortmode_path"`
13473      new_path="$input_path"
13474    fi
13475  fi
13476
13477  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13478  if test "x$test_cygdrive_prefix" = x; then
13479    # As a simple fix, exclude /usr/bin since it's not a real path.
13480    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13481      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13482      # a path prefixed by /cygdrive for fixpath to work.
13483      new_path="$CYGWIN_ROOT_PATH$input_path"
13484    fi
13485  fi
13486
13487
13488  if test "x$path" != "x$new_path"; then
13489    BOOT_JDK="$new_path"
13490    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13491$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13492  fi
13493
13494  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13495
13496  path="$BOOT_JDK"
13497  has_colon=`$ECHO $path | $GREP ^.:`
13498  new_path="$path"
13499  if test "x$has_colon" = x; then
13500    # Not in mixed or Windows style, start by that.
13501    new_path=`cmd //c echo $path`
13502  fi
13503
13504
13505  input_path="$new_path"
13506  # Check if we need to convert this using DOS-style short mode. If the path
13507  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13508  # take no chances and rewrite it.
13509  # Note: m4 eats our [], so we need to use [ and ] instead.
13510  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13511  if test "x$has_forbidden_chars" != x; then
13512    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13513    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13514  fi
13515
13516
13517  windows_path="$new_path"
13518  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13519    unix_path=`$CYGPATH -u "$windows_path"`
13520    new_path="$unix_path"
13521  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13522    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13523    new_path="$unix_path"
13524  fi
13525
13526  if test "x$path" != "x$new_path"; then
13527    BOOT_JDK="$new_path"
13528    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13529$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13530  fi
13531
13532  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13533  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13534
13535  else
13536    # We're on a posix platform. Hooray! :)
13537    path="$BOOT_JDK"
13538    has_space=`$ECHO "$path" | $GREP " "`
13539    if test "x$has_space" != x; then
13540      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13541$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13542      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13543    fi
13544
13545    # Use eval to expand a potential ~
13546    eval path="$path"
13547    if test ! -f "$path" && test ! -d "$path"; then
13548      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13549    fi
13550
13551    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13552  fi
13553
13554              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13555$as_echo_n "checking for Boot JDK... " >&6; }
13556              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13557$as_echo "$BOOT_JDK" >&6; }
13558              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13559$as_echo_n "checking Boot JDK version... " >&6; }
13560              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13561              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13562$as_echo "$BOOT_JDK_VERSION" >&6; }
13563            fi # end check jdk version
13564          fi # end check rt.jar
13565        fi # end check javac
13566      fi # end check java
13567    fi # end check boot jdk found
13568  fi
13569
13570    done
13571  fi
13572
13573  fi
13574
13575
13576    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13577    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13578      # Do we have a bin/java?
13579      if test ! -x "$BOOT_JDK/bin/java"; then
13580        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13581$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13582        BOOT_JDK_FOUND=no
13583      else
13584        # Do we have a bin/javac?
13585        if test ! -x "$BOOT_JDK/bin/javac"; then
13586          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13587$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13588          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13589$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13590          BOOT_JDK_FOUND=no
13591        else
13592          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13593          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13594            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13595$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13596            BOOT_JDK_FOUND=no
13597          else
13598            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13599            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13600
13601            # Extra M4 quote needed to protect [] in grep expression.
13602            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13603            if test "x$FOUND_VERSION_78" = x; then
13604              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13605$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13606              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13607$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13608              BOOT_JDK_FOUND=no
13609            else
13610              # We're done! :-)
13611              BOOT_JDK_FOUND=yes
13612
13613  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13614
13615  # Input might be given as Windows format, start by converting to
13616  # unix format.
13617  path="$BOOT_JDK"
13618  new_path=`$CYGPATH -u "$path"`
13619
13620  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13621  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13622  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13623  # "foo.exe" is OK but "foo" is an error.
13624  #
13625  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13626  # It is also a way to make sure we got the proper file name for the real test later on.
13627  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13628  if test "x$test_shortpath" = x; then
13629    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13630$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13631    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13632  fi
13633
13634  # Call helper function which possibly converts this using DOS-style short mode.
13635  # If so, the updated path is stored in $new_path.
13636
13637  input_path="$new_path"
13638  # Check if we need to convert this using DOS-style short mode. If the path
13639  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13640  # take no chances and rewrite it.
13641  # Note: m4 eats our [], so we need to use [ and ] instead.
13642  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13643  if test "x$has_forbidden_chars" != x; then
13644    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13645    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13646    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13647    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13648      # Going to short mode and back again did indeed matter. Since short mode is
13649      # case insensitive, let's make it lowercase to improve readability.
13650      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13651      # Now convert it back to Unix-stile (cygpath)
13652      input_path=`$CYGPATH -u "$shortmode_path"`
13653      new_path="$input_path"
13654    fi
13655  fi
13656
13657  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13658  if test "x$test_cygdrive_prefix" = x; then
13659    # As a simple fix, exclude /usr/bin since it's not a real path.
13660    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13661      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13662      # a path prefixed by /cygdrive for fixpath to work.
13663      new_path="$CYGWIN_ROOT_PATH$input_path"
13664    fi
13665  fi
13666
13667
13668  if test "x$path" != "x$new_path"; then
13669    BOOT_JDK="$new_path"
13670    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13671$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13672  fi
13673
13674  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13675
13676  path="$BOOT_JDK"
13677  has_colon=`$ECHO $path | $GREP ^.:`
13678  new_path="$path"
13679  if test "x$has_colon" = x; then
13680    # Not in mixed or Windows style, start by that.
13681    new_path=`cmd //c echo $path`
13682  fi
13683
13684
13685  input_path="$new_path"
13686  # Check if we need to convert this using DOS-style short mode. If the path
13687  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13688  # take no chances and rewrite it.
13689  # Note: m4 eats our [], so we need to use [ and ] instead.
13690  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13691  if test "x$has_forbidden_chars" != x; then
13692    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13693    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13694  fi
13695
13696
13697  windows_path="$new_path"
13698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13699    unix_path=`$CYGPATH -u "$windows_path"`
13700    new_path="$unix_path"
13701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13702    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13703    new_path="$unix_path"
13704  fi
13705
13706  if test "x$path" != "x$new_path"; then
13707    BOOT_JDK="$new_path"
13708    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13709$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13710  fi
13711
13712  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13713  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13714
13715  else
13716    # We're on a posix platform. Hooray! :)
13717    path="$BOOT_JDK"
13718    has_space=`$ECHO "$path" | $GREP " "`
13719    if test "x$has_space" != x; then
13720      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13721$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13722      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13723    fi
13724
13725    # Use eval to expand a potential ~
13726    eval path="$path"
13727    if test ! -f "$path" && test ! -d "$path"; then
13728      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13729    fi
13730
13731    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13732  fi
13733
13734              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13735$as_echo_n "checking for Boot JDK... " >&6; }
13736              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13737$as_echo "$BOOT_JDK" >&6; }
13738              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13739$as_echo_n "checking Boot JDK version... " >&6; }
13740              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13741              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13742$as_echo "$BOOT_JDK_VERSION" >&6; }
13743            fi # end check jdk version
13744          fi # end check rt.jar
13745        fi # end check javac
13746      fi # end check java
13747    fi # end check boot jdk found
13748  fi
13749
13750
13751  if test "x$BOOT_JDK_FOUND" = xno; then
13752    # Now execute the test
13753
13754  if test "x$ProgramFiles" != x; then
13755    VIRTUAL_DIR="$ProgramFiles/Java"
13756
13757  windows_path="$VIRTUAL_DIR"
13758  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13759    unix_path=`$CYGPATH -u "$windows_path"`
13760    VIRTUAL_DIR="$unix_path"
13761  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13762    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13763    VIRTUAL_DIR="$unix_path"
13764  fi
13765
13766
13767  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13768  BOOT_JDK_SUFFIX=""
13769  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13770  if test "x$ALL_JDKS_FOUND" != x; then
13771    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13772
13773  if test "x$BOOT_JDK_FOUND" = xno; then
13774    # Now execute the test
13775
13776        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13777        if test -d "$BOOT_JDK"; then
13778          BOOT_JDK_FOUND=maybe
13779          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13780$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13781        fi
13782
13783
13784    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13785    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13786      # Do we have a bin/java?
13787      if test ! -x "$BOOT_JDK/bin/java"; then
13788        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13789$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13790        BOOT_JDK_FOUND=no
13791      else
13792        # Do we have a bin/javac?
13793        if test ! -x "$BOOT_JDK/bin/javac"; then
13794          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13795$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13796          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13797$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13798          BOOT_JDK_FOUND=no
13799        else
13800          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13801          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13802            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13803$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13804            BOOT_JDK_FOUND=no
13805          else
13806            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13807            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13808
13809            # Extra M4 quote needed to protect [] in grep expression.
13810            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13811            if test "x$FOUND_VERSION_78" = x; then
13812              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13813$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13814              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13815$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13816              BOOT_JDK_FOUND=no
13817            else
13818              # We're done! :-)
13819              BOOT_JDK_FOUND=yes
13820
13821  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13822
13823  # Input might be given as Windows format, start by converting to
13824  # unix format.
13825  path="$BOOT_JDK"
13826  new_path=`$CYGPATH -u "$path"`
13827
13828  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13829  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13830  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13831  # "foo.exe" is OK but "foo" is an error.
13832  #
13833  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13834  # It is also a way to make sure we got the proper file name for the real test later on.
13835  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13836  if test "x$test_shortpath" = x; then
13837    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13838$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13839    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13840  fi
13841
13842  # Call helper function which possibly converts this using DOS-style short mode.
13843  # If so, the updated path is stored in $new_path.
13844
13845  input_path="$new_path"
13846  # Check if we need to convert this using DOS-style short mode. If the path
13847  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13848  # take no chances and rewrite it.
13849  # Note: m4 eats our [], so we need to use [ and ] instead.
13850  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13851  if test "x$has_forbidden_chars" != x; then
13852    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13853    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13854    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13855    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13856      # Going to short mode and back again did indeed matter. Since short mode is
13857      # case insensitive, let's make it lowercase to improve readability.
13858      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13859      # Now convert it back to Unix-stile (cygpath)
13860      input_path=`$CYGPATH -u "$shortmode_path"`
13861      new_path="$input_path"
13862    fi
13863  fi
13864
13865  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13866  if test "x$test_cygdrive_prefix" = x; then
13867    # As a simple fix, exclude /usr/bin since it's not a real path.
13868    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13869      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13870      # a path prefixed by /cygdrive for fixpath to work.
13871      new_path="$CYGWIN_ROOT_PATH$input_path"
13872    fi
13873  fi
13874
13875
13876  if test "x$path" != "x$new_path"; then
13877    BOOT_JDK="$new_path"
13878    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13879$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13880  fi
13881
13882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13883
13884  path="$BOOT_JDK"
13885  has_colon=`$ECHO $path | $GREP ^.:`
13886  new_path="$path"
13887  if test "x$has_colon" = x; then
13888    # Not in mixed or Windows style, start by that.
13889    new_path=`cmd //c echo $path`
13890  fi
13891
13892
13893  input_path="$new_path"
13894  # Check if we need to convert this using DOS-style short mode. If the path
13895  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13896  # take no chances and rewrite it.
13897  # Note: m4 eats our [], so we need to use [ and ] instead.
13898  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13899  if test "x$has_forbidden_chars" != x; then
13900    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13901    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13902  fi
13903
13904
13905  windows_path="$new_path"
13906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13907    unix_path=`$CYGPATH -u "$windows_path"`
13908    new_path="$unix_path"
13909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13910    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13911    new_path="$unix_path"
13912  fi
13913
13914  if test "x$path" != "x$new_path"; then
13915    BOOT_JDK="$new_path"
13916    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13917$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13918  fi
13919
13920  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13921  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13922
13923  else
13924    # We're on a posix platform. Hooray! :)
13925    path="$BOOT_JDK"
13926    has_space=`$ECHO "$path" | $GREP " "`
13927    if test "x$has_space" != x; then
13928      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13929$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13930      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13931    fi
13932
13933    # Use eval to expand a potential ~
13934    eval path="$path"
13935    if test ! -f "$path" && test ! -d "$path"; then
13936      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13937    fi
13938
13939    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13940  fi
13941
13942              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13943$as_echo_n "checking for Boot JDK... " >&6; }
13944              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13945$as_echo "$BOOT_JDK" >&6; }
13946              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13947$as_echo_n "checking Boot JDK version... " >&6; }
13948              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13949              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13950$as_echo "$BOOT_JDK_VERSION" >&6; }
13951            fi # end check jdk version
13952          fi # end check rt.jar
13953        fi # end check javac
13954      fi # end check java
13955    fi # end check boot jdk found
13956  fi
13957
13958    done
13959  fi
13960
13961  fi
13962
13963
13964    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13965    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13966      # Do we have a bin/java?
13967      if test ! -x "$BOOT_JDK/bin/java"; then
13968        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13969$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13970        BOOT_JDK_FOUND=no
13971      else
13972        # Do we have a bin/javac?
13973        if test ! -x "$BOOT_JDK/bin/javac"; then
13974          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13975$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13976          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13977$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13978          BOOT_JDK_FOUND=no
13979        else
13980          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13981          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13982            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13983$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13984            BOOT_JDK_FOUND=no
13985          else
13986            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13987            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13988
13989            # Extra M4 quote needed to protect [] in grep expression.
13990            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13991            if test "x$FOUND_VERSION_78" = x; then
13992              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13993$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13994              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13995$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13996              BOOT_JDK_FOUND=no
13997            else
13998              # We're done! :-)
13999              BOOT_JDK_FOUND=yes
14000
14001  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14002
14003  # Input might be given as Windows format, start by converting to
14004  # unix format.
14005  path="$BOOT_JDK"
14006  new_path=`$CYGPATH -u "$path"`
14007
14008  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14009  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14010  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14011  # "foo.exe" is OK but "foo" is an error.
14012  #
14013  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14014  # It is also a way to make sure we got the proper file name for the real test later on.
14015  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14016  if test "x$test_shortpath" = x; then
14017    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14018$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14019    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14020  fi
14021
14022  # Call helper function which possibly converts this using DOS-style short mode.
14023  # If so, the updated path is stored in $new_path.
14024
14025  input_path="$new_path"
14026  # Check if we need to convert this using DOS-style short mode. If the path
14027  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14028  # take no chances and rewrite it.
14029  # Note: m4 eats our [], so we need to use [ and ] instead.
14030  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14031  if test "x$has_forbidden_chars" != x; then
14032    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14033    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14034    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14035    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14036      # Going to short mode and back again did indeed matter. Since short mode is
14037      # case insensitive, let's make it lowercase to improve readability.
14038      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14039      # Now convert it back to Unix-stile (cygpath)
14040      input_path=`$CYGPATH -u "$shortmode_path"`
14041      new_path="$input_path"
14042    fi
14043  fi
14044
14045  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14046  if test "x$test_cygdrive_prefix" = x; then
14047    # As a simple fix, exclude /usr/bin since it's not a real path.
14048    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14049      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14050      # a path prefixed by /cygdrive for fixpath to work.
14051      new_path="$CYGWIN_ROOT_PATH$input_path"
14052    fi
14053  fi
14054
14055
14056  if test "x$path" != "x$new_path"; then
14057    BOOT_JDK="$new_path"
14058    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14059$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14060  fi
14061
14062  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14063
14064  path="$BOOT_JDK"
14065  has_colon=`$ECHO $path | $GREP ^.:`
14066  new_path="$path"
14067  if test "x$has_colon" = x; then
14068    # Not in mixed or Windows style, start by that.
14069    new_path=`cmd //c echo $path`
14070  fi
14071
14072
14073  input_path="$new_path"
14074  # Check if we need to convert this using DOS-style short mode. If the path
14075  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14076  # take no chances and rewrite it.
14077  # Note: m4 eats our [], so we need to use [ and ] instead.
14078  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14079  if test "x$has_forbidden_chars" != x; then
14080    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14081    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14082  fi
14083
14084
14085  windows_path="$new_path"
14086  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14087    unix_path=`$CYGPATH -u "$windows_path"`
14088    new_path="$unix_path"
14089  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14090    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14091    new_path="$unix_path"
14092  fi
14093
14094  if test "x$path" != "x$new_path"; then
14095    BOOT_JDK="$new_path"
14096    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14097$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14098  fi
14099
14100  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14101  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14102
14103  else
14104    # We're on a posix platform. Hooray! :)
14105    path="$BOOT_JDK"
14106    has_space=`$ECHO "$path" | $GREP " "`
14107    if test "x$has_space" != x; then
14108      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14109$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14110      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14111    fi
14112
14113    # Use eval to expand a potential ~
14114    eval path="$path"
14115    if test ! -f "$path" && test ! -d "$path"; then
14116      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14117    fi
14118
14119    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14120  fi
14121
14122              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14123$as_echo_n "checking for Boot JDK... " >&6; }
14124              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14125$as_echo "$BOOT_JDK" >&6; }
14126              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14127$as_echo_n "checking Boot JDK version... " >&6; }
14128              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14129              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14130$as_echo "$BOOT_JDK_VERSION" >&6; }
14131            fi # end check jdk version
14132          fi # end check rt.jar
14133        fi # end check javac
14134      fi # end check java
14135    fi # end check boot jdk found
14136  fi
14137
14138
14139  if test "x$BOOT_JDK_FOUND" = xno; then
14140    # Now execute the test
14141
14142  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
14143  BOOT_JDK_SUFFIX=""
14144  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14145  if test "x$ALL_JDKS_FOUND" != x; then
14146    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14147
14148  if test "x$BOOT_JDK_FOUND" = xno; then
14149    # Now execute the test
14150
14151        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14152        if test -d "$BOOT_JDK"; then
14153          BOOT_JDK_FOUND=maybe
14154          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14155$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14156        fi
14157
14158
14159    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14160    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14161      # Do we have a bin/java?
14162      if test ! -x "$BOOT_JDK/bin/java"; then
14163        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14164$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14165        BOOT_JDK_FOUND=no
14166      else
14167        # Do we have a bin/javac?
14168        if test ! -x "$BOOT_JDK/bin/javac"; then
14169          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14170$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14171          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14172$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14173          BOOT_JDK_FOUND=no
14174        else
14175          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14176          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14177            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14178$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14179            BOOT_JDK_FOUND=no
14180          else
14181            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14182            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14183
14184            # Extra M4 quote needed to protect [] in grep expression.
14185            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14186            if test "x$FOUND_VERSION_78" = x; then
14187              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14188$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14189              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14190$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14191              BOOT_JDK_FOUND=no
14192            else
14193              # We're done! :-)
14194              BOOT_JDK_FOUND=yes
14195
14196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14197
14198  # Input might be given as Windows format, start by converting to
14199  # unix format.
14200  path="$BOOT_JDK"
14201  new_path=`$CYGPATH -u "$path"`
14202
14203  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14204  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14205  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14206  # "foo.exe" is OK but "foo" is an error.
14207  #
14208  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14209  # It is also a way to make sure we got the proper file name for the real test later on.
14210  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14211  if test "x$test_shortpath" = x; then
14212    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14213$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14214    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14215  fi
14216
14217  # Call helper function which possibly converts this using DOS-style short mode.
14218  # If so, the updated path is stored in $new_path.
14219
14220  input_path="$new_path"
14221  # Check if we need to convert this using DOS-style short mode. If the path
14222  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14223  # take no chances and rewrite it.
14224  # Note: m4 eats our [], so we need to use [ and ] instead.
14225  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14226  if test "x$has_forbidden_chars" != x; then
14227    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14228    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14229    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14230    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14231      # Going to short mode and back again did indeed matter. Since short mode is
14232      # case insensitive, let's make it lowercase to improve readability.
14233      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14234      # Now convert it back to Unix-stile (cygpath)
14235      input_path=`$CYGPATH -u "$shortmode_path"`
14236      new_path="$input_path"
14237    fi
14238  fi
14239
14240  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14241  if test "x$test_cygdrive_prefix" = x; then
14242    # As a simple fix, exclude /usr/bin since it's not a real path.
14243    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14244      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14245      # a path prefixed by /cygdrive for fixpath to work.
14246      new_path="$CYGWIN_ROOT_PATH$input_path"
14247    fi
14248  fi
14249
14250
14251  if test "x$path" != "x$new_path"; then
14252    BOOT_JDK="$new_path"
14253    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14254$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14255  fi
14256
14257  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14258
14259  path="$BOOT_JDK"
14260  has_colon=`$ECHO $path | $GREP ^.:`
14261  new_path="$path"
14262  if test "x$has_colon" = x; then
14263    # Not in mixed or Windows style, start by that.
14264    new_path=`cmd //c echo $path`
14265  fi
14266
14267
14268  input_path="$new_path"
14269  # Check if we need to convert this using DOS-style short mode. If the path
14270  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14271  # take no chances and rewrite it.
14272  # Note: m4 eats our [], so we need to use [ and ] instead.
14273  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14274  if test "x$has_forbidden_chars" != x; then
14275    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14276    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14277  fi
14278
14279
14280  windows_path="$new_path"
14281  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14282    unix_path=`$CYGPATH -u "$windows_path"`
14283    new_path="$unix_path"
14284  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14285    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14286    new_path="$unix_path"
14287  fi
14288
14289  if test "x$path" != "x$new_path"; then
14290    BOOT_JDK="$new_path"
14291    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14292$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14293  fi
14294
14295  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14296  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14297
14298  else
14299    # We're on a posix platform. Hooray! :)
14300    path="$BOOT_JDK"
14301    has_space=`$ECHO "$path" | $GREP " "`
14302    if test "x$has_space" != x; then
14303      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14304$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14305      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14306    fi
14307
14308    # Use eval to expand a potential ~
14309    eval path="$path"
14310    if test ! -f "$path" && test ! -d "$path"; then
14311      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14312    fi
14313
14314    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14315  fi
14316
14317              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14318$as_echo_n "checking for Boot JDK... " >&6; }
14319              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14320$as_echo "$BOOT_JDK" >&6; }
14321              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14322$as_echo_n "checking Boot JDK version... " >&6; }
14323              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14324              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14325$as_echo "$BOOT_JDK_VERSION" >&6; }
14326            fi # end check jdk version
14327          fi # end check rt.jar
14328        fi # end check javac
14329      fi # end check java
14330    fi # end check boot jdk found
14331  fi
14332
14333    done
14334  fi
14335
14336
14337    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14338    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14339      # Do we have a bin/java?
14340      if test ! -x "$BOOT_JDK/bin/java"; then
14341        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14342$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14343        BOOT_JDK_FOUND=no
14344      else
14345        # Do we have a bin/javac?
14346        if test ! -x "$BOOT_JDK/bin/javac"; then
14347          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14348$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14349          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14350$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14351          BOOT_JDK_FOUND=no
14352        else
14353          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14354          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14355            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14356$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14357            BOOT_JDK_FOUND=no
14358          else
14359            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14360            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14361
14362            # Extra M4 quote needed to protect [] in grep expression.
14363            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14364            if test "x$FOUND_VERSION_78" = x; then
14365              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14366$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14367              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14368$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14369              BOOT_JDK_FOUND=no
14370            else
14371              # We're done! :-)
14372              BOOT_JDK_FOUND=yes
14373
14374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14375
14376  # Input might be given as Windows format, start by converting to
14377  # unix format.
14378  path="$BOOT_JDK"
14379  new_path=`$CYGPATH -u "$path"`
14380
14381  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14382  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14383  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14384  # "foo.exe" is OK but "foo" is an error.
14385  #
14386  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14387  # It is also a way to make sure we got the proper file name for the real test later on.
14388  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14389  if test "x$test_shortpath" = x; then
14390    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14391$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14392    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14393  fi
14394
14395  # Call helper function which possibly converts this using DOS-style short mode.
14396  # If so, the updated path is stored in $new_path.
14397
14398  input_path="$new_path"
14399  # Check if we need to convert this using DOS-style short mode. If the path
14400  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14401  # take no chances and rewrite it.
14402  # Note: m4 eats our [], so we need to use [ and ] instead.
14403  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14404  if test "x$has_forbidden_chars" != x; then
14405    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14406    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14407    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14408    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14409      # Going to short mode and back again did indeed matter. Since short mode is
14410      # case insensitive, let's make it lowercase to improve readability.
14411      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14412      # Now convert it back to Unix-stile (cygpath)
14413      input_path=`$CYGPATH -u "$shortmode_path"`
14414      new_path="$input_path"
14415    fi
14416  fi
14417
14418  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14419  if test "x$test_cygdrive_prefix" = x; then
14420    # As a simple fix, exclude /usr/bin since it's not a real path.
14421    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14422      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14423      # a path prefixed by /cygdrive for fixpath to work.
14424      new_path="$CYGWIN_ROOT_PATH$input_path"
14425    fi
14426  fi
14427
14428
14429  if test "x$path" != "x$new_path"; then
14430    BOOT_JDK="$new_path"
14431    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14432$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14433  fi
14434
14435  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14436
14437  path="$BOOT_JDK"
14438  has_colon=`$ECHO $path | $GREP ^.:`
14439  new_path="$path"
14440  if test "x$has_colon" = x; then
14441    # Not in mixed or Windows style, start by that.
14442    new_path=`cmd //c echo $path`
14443  fi
14444
14445
14446  input_path="$new_path"
14447  # Check if we need to convert this using DOS-style short mode. If the path
14448  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14449  # take no chances and rewrite it.
14450  # Note: m4 eats our [], so we need to use [ and ] instead.
14451  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14452  if test "x$has_forbidden_chars" != x; then
14453    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14454    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14455  fi
14456
14457
14458  windows_path="$new_path"
14459  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14460    unix_path=`$CYGPATH -u "$windows_path"`
14461    new_path="$unix_path"
14462  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14463    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14464    new_path="$unix_path"
14465  fi
14466
14467  if test "x$path" != "x$new_path"; then
14468    BOOT_JDK="$new_path"
14469    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14470$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14471  fi
14472
14473  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14474  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14475
14476  else
14477    # We're on a posix platform. Hooray! :)
14478    path="$BOOT_JDK"
14479    has_space=`$ECHO "$path" | $GREP " "`
14480    if test "x$has_space" != x; then
14481      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14482$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14483      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14484    fi
14485
14486    # Use eval to expand a potential ~
14487    eval path="$path"
14488    if test ! -f "$path" && test ! -d "$path"; then
14489      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14490    fi
14491
14492    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14493  fi
14494
14495              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14496$as_echo_n "checking for Boot JDK... " >&6; }
14497              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14498$as_echo "$BOOT_JDK" >&6; }
14499              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14500$as_echo_n "checking Boot JDK version... " >&6; }
14501              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14502              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14503$as_echo "$BOOT_JDK_VERSION" >&6; }
14504            fi # end check jdk version
14505          fi # end check rt.jar
14506        fi # end check javac
14507      fi # end check java
14508    fi # end check boot jdk found
14509  fi
14510
14511  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14512
14513  if test "x$BOOT_JDK_FOUND" = xno; then
14514    # Now execute the test
14515
14516  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14517  BOOT_JDK_SUFFIX="/Contents/Home"
14518  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14519  if test "x$ALL_JDKS_FOUND" != x; then
14520    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14521
14522  if test "x$BOOT_JDK_FOUND" = xno; then
14523    # Now execute the test
14524
14525        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14526        if test -d "$BOOT_JDK"; then
14527          BOOT_JDK_FOUND=maybe
14528          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14529$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14530        fi
14531
14532
14533    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14534    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14535      # Do we have a bin/java?
14536      if test ! -x "$BOOT_JDK/bin/java"; then
14537        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14538$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14539        BOOT_JDK_FOUND=no
14540      else
14541        # Do we have a bin/javac?
14542        if test ! -x "$BOOT_JDK/bin/javac"; then
14543          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14544$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14545          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14546$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14547          BOOT_JDK_FOUND=no
14548        else
14549          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14550          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14551            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14552$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14553            BOOT_JDK_FOUND=no
14554          else
14555            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14556            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14557
14558            # Extra M4 quote needed to protect [] in grep expression.
14559            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14560            if test "x$FOUND_VERSION_78" = x; then
14561              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14562$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14563              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14564$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14565              BOOT_JDK_FOUND=no
14566            else
14567              # We're done! :-)
14568              BOOT_JDK_FOUND=yes
14569
14570  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14571
14572  # Input might be given as Windows format, start by converting to
14573  # unix format.
14574  path="$BOOT_JDK"
14575  new_path=`$CYGPATH -u "$path"`
14576
14577  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14578  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14579  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14580  # "foo.exe" is OK but "foo" is an error.
14581  #
14582  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14583  # It is also a way to make sure we got the proper file name for the real test later on.
14584  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14585  if test "x$test_shortpath" = x; then
14586    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14587$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14588    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14589  fi
14590
14591  # Call helper function which possibly converts this using DOS-style short mode.
14592  # If so, the updated path is stored in $new_path.
14593
14594  input_path="$new_path"
14595  # Check if we need to convert this using DOS-style short mode. If the path
14596  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14597  # take no chances and rewrite it.
14598  # Note: m4 eats our [], so we need to use [ and ] instead.
14599  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14600  if test "x$has_forbidden_chars" != x; then
14601    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14602    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14603    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14604    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14605      # Going to short mode and back again did indeed matter. Since short mode is
14606      # case insensitive, let's make it lowercase to improve readability.
14607      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14608      # Now convert it back to Unix-stile (cygpath)
14609      input_path=`$CYGPATH -u "$shortmode_path"`
14610      new_path="$input_path"
14611    fi
14612  fi
14613
14614  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14615  if test "x$test_cygdrive_prefix" = x; then
14616    # As a simple fix, exclude /usr/bin since it's not a real path.
14617    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14618      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14619      # a path prefixed by /cygdrive for fixpath to work.
14620      new_path="$CYGWIN_ROOT_PATH$input_path"
14621    fi
14622  fi
14623
14624
14625  if test "x$path" != "x$new_path"; then
14626    BOOT_JDK="$new_path"
14627    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14628$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14629  fi
14630
14631  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14632
14633  path="$BOOT_JDK"
14634  has_colon=`$ECHO $path | $GREP ^.:`
14635  new_path="$path"
14636  if test "x$has_colon" = x; then
14637    # Not in mixed or Windows style, start by that.
14638    new_path=`cmd //c echo $path`
14639  fi
14640
14641
14642  input_path="$new_path"
14643  # Check if we need to convert this using DOS-style short mode. If the path
14644  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14645  # take no chances and rewrite it.
14646  # Note: m4 eats our [], so we need to use [ and ] instead.
14647  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14648  if test "x$has_forbidden_chars" != x; then
14649    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14650    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14651  fi
14652
14653
14654  windows_path="$new_path"
14655  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14656    unix_path=`$CYGPATH -u "$windows_path"`
14657    new_path="$unix_path"
14658  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14659    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14660    new_path="$unix_path"
14661  fi
14662
14663  if test "x$path" != "x$new_path"; then
14664    BOOT_JDK="$new_path"
14665    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14666$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14667  fi
14668
14669  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14670  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14671
14672  else
14673    # We're on a posix platform. Hooray! :)
14674    path="$BOOT_JDK"
14675    has_space=`$ECHO "$path" | $GREP " "`
14676    if test "x$has_space" != x; then
14677      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14678$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14679      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14680    fi
14681
14682    # Use eval to expand a potential ~
14683    eval path="$path"
14684    if test ! -f "$path" && test ! -d "$path"; then
14685      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14686    fi
14687
14688    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14689  fi
14690
14691              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14692$as_echo_n "checking for Boot JDK... " >&6; }
14693              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14694$as_echo "$BOOT_JDK" >&6; }
14695              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14696$as_echo_n "checking Boot JDK version... " >&6; }
14697              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14698              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14699$as_echo "$BOOT_JDK_VERSION" >&6; }
14700            fi # end check jdk version
14701          fi # end check rt.jar
14702        fi # end check javac
14703      fi # end check java
14704    fi # end check boot jdk found
14705  fi
14706
14707    done
14708  fi
14709
14710
14711    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14712    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14713      # Do we have a bin/java?
14714      if test ! -x "$BOOT_JDK/bin/java"; then
14715        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14716$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14717        BOOT_JDK_FOUND=no
14718      else
14719        # Do we have a bin/javac?
14720        if test ! -x "$BOOT_JDK/bin/javac"; then
14721          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14722$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14723          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14724$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14725          BOOT_JDK_FOUND=no
14726        else
14727          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14728          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14729            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14730$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14731            BOOT_JDK_FOUND=no
14732          else
14733            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14734            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14735
14736            # Extra M4 quote needed to protect [] in grep expression.
14737            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14738            if test "x$FOUND_VERSION_78" = x; then
14739              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14740$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14741              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14742$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14743              BOOT_JDK_FOUND=no
14744            else
14745              # We're done! :-)
14746              BOOT_JDK_FOUND=yes
14747
14748  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14749
14750  # Input might be given as Windows format, start by converting to
14751  # unix format.
14752  path="$BOOT_JDK"
14753  new_path=`$CYGPATH -u "$path"`
14754
14755  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14756  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14757  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14758  # "foo.exe" is OK but "foo" is an error.
14759  #
14760  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14761  # It is also a way to make sure we got the proper file name for the real test later on.
14762  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14763  if test "x$test_shortpath" = x; then
14764    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14765$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14766    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14767  fi
14768
14769  # Call helper function which possibly converts this using DOS-style short mode.
14770  # If so, the updated path is stored in $new_path.
14771
14772  input_path="$new_path"
14773  # Check if we need to convert this using DOS-style short mode. If the path
14774  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14775  # take no chances and rewrite it.
14776  # Note: m4 eats our [], so we need to use [ and ] instead.
14777  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14778  if test "x$has_forbidden_chars" != x; then
14779    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14780    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14781    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14782    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14783      # Going to short mode and back again did indeed matter. Since short mode is
14784      # case insensitive, let's make it lowercase to improve readability.
14785      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14786      # Now convert it back to Unix-stile (cygpath)
14787      input_path=`$CYGPATH -u "$shortmode_path"`
14788      new_path="$input_path"
14789    fi
14790  fi
14791
14792  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14793  if test "x$test_cygdrive_prefix" = x; then
14794    # As a simple fix, exclude /usr/bin since it's not a real path.
14795    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14796      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14797      # a path prefixed by /cygdrive for fixpath to work.
14798      new_path="$CYGWIN_ROOT_PATH$input_path"
14799    fi
14800  fi
14801
14802
14803  if test "x$path" != "x$new_path"; then
14804    BOOT_JDK="$new_path"
14805    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14806$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14807  fi
14808
14809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14810
14811  path="$BOOT_JDK"
14812  has_colon=`$ECHO $path | $GREP ^.:`
14813  new_path="$path"
14814  if test "x$has_colon" = x; then
14815    # Not in mixed or Windows style, start by that.
14816    new_path=`cmd //c echo $path`
14817  fi
14818
14819
14820  input_path="$new_path"
14821  # Check if we need to convert this using DOS-style short mode. If the path
14822  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14823  # take no chances and rewrite it.
14824  # Note: m4 eats our [], so we need to use [ and ] instead.
14825  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14826  if test "x$has_forbidden_chars" != x; then
14827    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14828    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14829  fi
14830
14831
14832  windows_path="$new_path"
14833  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14834    unix_path=`$CYGPATH -u "$windows_path"`
14835    new_path="$unix_path"
14836  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14837    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14838    new_path="$unix_path"
14839  fi
14840
14841  if test "x$path" != "x$new_path"; then
14842    BOOT_JDK="$new_path"
14843    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14844$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14845  fi
14846
14847  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14848  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14849
14850  else
14851    # We're on a posix platform. Hooray! :)
14852    path="$BOOT_JDK"
14853    has_space=`$ECHO "$path" | $GREP " "`
14854    if test "x$has_space" != x; then
14855      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14856$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14857      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14858    fi
14859
14860    # Use eval to expand a potential ~
14861    eval path="$path"
14862    if test ! -f "$path" && test ! -d "$path"; then
14863      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14864    fi
14865
14866    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14867  fi
14868
14869              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14870$as_echo_n "checking for Boot JDK... " >&6; }
14871              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14872$as_echo "$BOOT_JDK" >&6; }
14873              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14874$as_echo_n "checking Boot JDK version... " >&6; }
14875              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14876              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14877$as_echo "$BOOT_JDK_VERSION" >&6; }
14878            fi # end check jdk version
14879          fi # end check rt.jar
14880        fi # end check javac
14881      fi # end check java
14882    fi # end check boot jdk found
14883  fi
14884
14885
14886  if test "x$BOOT_JDK_FOUND" = xno; then
14887    # Now execute the test
14888
14889  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14890  BOOT_JDK_SUFFIX="/Contents/Home"
14891  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14892  if test "x$ALL_JDKS_FOUND" != x; then
14893    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14894
14895  if test "x$BOOT_JDK_FOUND" = xno; then
14896    # Now execute the test
14897
14898        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14899        if test -d "$BOOT_JDK"; then
14900          BOOT_JDK_FOUND=maybe
14901          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14902$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14903        fi
14904
14905
14906    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14907    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14908      # Do we have a bin/java?
14909      if test ! -x "$BOOT_JDK/bin/java"; then
14910        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14911$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14912        BOOT_JDK_FOUND=no
14913      else
14914        # Do we have a bin/javac?
14915        if test ! -x "$BOOT_JDK/bin/javac"; then
14916          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14917$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14918          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14919$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14920          BOOT_JDK_FOUND=no
14921        else
14922          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14923          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14924            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14925$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14926            BOOT_JDK_FOUND=no
14927          else
14928            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14929            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14930
14931            # Extra M4 quote needed to protect [] in grep expression.
14932            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14933            if test "x$FOUND_VERSION_78" = x; then
14934              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14935$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14936              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14937$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14938              BOOT_JDK_FOUND=no
14939            else
14940              # We're done! :-)
14941              BOOT_JDK_FOUND=yes
14942
14943  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14944
14945  # Input might be given as Windows format, start by converting to
14946  # unix format.
14947  path="$BOOT_JDK"
14948  new_path=`$CYGPATH -u "$path"`
14949
14950  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14951  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14952  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14953  # "foo.exe" is OK but "foo" is an error.
14954  #
14955  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14956  # It is also a way to make sure we got the proper file name for the real test later on.
14957  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14958  if test "x$test_shortpath" = x; then
14959    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14960$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14961    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14962  fi
14963
14964  # Call helper function which possibly converts this using DOS-style short mode.
14965  # If so, the updated path is stored in $new_path.
14966
14967  input_path="$new_path"
14968  # Check if we need to convert this using DOS-style short mode. If the path
14969  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14970  # take no chances and rewrite it.
14971  # Note: m4 eats our [], so we need to use [ and ] instead.
14972  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14973  if test "x$has_forbidden_chars" != x; then
14974    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14975    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14976    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14977    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14978      # Going to short mode and back again did indeed matter. Since short mode is
14979      # case insensitive, let's make it lowercase to improve readability.
14980      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14981      # Now convert it back to Unix-stile (cygpath)
14982      input_path=`$CYGPATH -u "$shortmode_path"`
14983      new_path="$input_path"
14984    fi
14985  fi
14986
14987  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14988  if test "x$test_cygdrive_prefix" = x; then
14989    # As a simple fix, exclude /usr/bin since it's not a real path.
14990    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14991      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14992      # a path prefixed by /cygdrive for fixpath to work.
14993      new_path="$CYGWIN_ROOT_PATH$input_path"
14994    fi
14995  fi
14996
14997
14998  if test "x$path" != "x$new_path"; then
14999    BOOT_JDK="$new_path"
15000    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15001$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15002  fi
15003
15004  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15005
15006  path="$BOOT_JDK"
15007  has_colon=`$ECHO $path | $GREP ^.:`
15008  new_path="$path"
15009  if test "x$has_colon" = x; then
15010    # Not in mixed or Windows style, start by that.
15011    new_path=`cmd //c echo $path`
15012  fi
15013
15014
15015  input_path="$new_path"
15016  # Check if we need to convert this using DOS-style short mode. If the path
15017  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15018  # take no chances and rewrite it.
15019  # Note: m4 eats our [], so we need to use [ and ] instead.
15020  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15021  if test "x$has_forbidden_chars" != x; then
15022    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15023    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15024  fi
15025
15026
15027  windows_path="$new_path"
15028  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15029    unix_path=`$CYGPATH -u "$windows_path"`
15030    new_path="$unix_path"
15031  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15032    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15033    new_path="$unix_path"
15034  fi
15035
15036  if test "x$path" != "x$new_path"; then
15037    BOOT_JDK="$new_path"
15038    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15039$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15040  fi
15041
15042  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15043  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15044
15045  else
15046    # We're on a posix platform. Hooray! :)
15047    path="$BOOT_JDK"
15048    has_space=`$ECHO "$path" | $GREP " "`
15049    if test "x$has_space" != x; then
15050      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15051$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15052      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15053    fi
15054
15055    # Use eval to expand a potential ~
15056    eval path="$path"
15057    if test ! -f "$path" && test ! -d "$path"; then
15058      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15059    fi
15060
15061    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15062  fi
15063
15064              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15065$as_echo_n "checking for Boot JDK... " >&6; }
15066              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15067$as_echo "$BOOT_JDK" >&6; }
15068              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15069$as_echo_n "checking Boot JDK version... " >&6; }
15070              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15071              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15072$as_echo "$BOOT_JDK_VERSION" >&6; }
15073            fi # end check jdk version
15074          fi # end check rt.jar
15075        fi # end check javac
15076      fi # end check java
15077    fi # end check boot jdk found
15078  fi
15079
15080    done
15081  fi
15082
15083
15084    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15085    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15086      # Do we have a bin/java?
15087      if test ! -x "$BOOT_JDK/bin/java"; then
15088        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15089$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15090        BOOT_JDK_FOUND=no
15091      else
15092        # Do we have a bin/javac?
15093        if test ! -x "$BOOT_JDK/bin/javac"; then
15094          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15095$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15096          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15097$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15098          BOOT_JDK_FOUND=no
15099        else
15100          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15101          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15102            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15103$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15104            BOOT_JDK_FOUND=no
15105          else
15106            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15107            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15108
15109            # Extra M4 quote needed to protect [] in grep expression.
15110            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15111            if test "x$FOUND_VERSION_78" = x; then
15112              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15113$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15114              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15115$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15116              BOOT_JDK_FOUND=no
15117            else
15118              # We're done! :-)
15119              BOOT_JDK_FOUND=yes
15120
15121  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15122
15123  # Input might be given as Windows format, start by converting to
15124  # unix format.
15125  path="$BOOT_JDK"
15126  new_path=`$CYGPATH -u "$path"`
15127
15128  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15129  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15130  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15131  # "foo.exe" is OK but "foo" is an error.
15132  #
15133  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15134  # It is also a way to make sure we got the proper file name for the real test later on.
15135  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15136  if test "x$test_shortpath" = x; then
15137    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15138$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15139    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15140  fi
15141
15142  # Call helper function which possibly converts this using DOS-style short mode.
15143  # If so, the updated path is stored in $new_path.
15144
15145  input_path="$new_path"
15146  # Check if we need to convert this using DOS-style short mode. If the path
15147  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15148  # take no chances and rewrite it.
15149  # Note: m4 eats our [], so we need to use [ and ] instead.
15150  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15151  if test "x$has_forbidden_chars" != x; then
15152    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15153    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15154    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15155    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15156      # Going to short mode and back again did indeed matter. Since short mode is
15157      # case insensitive, let's make it lowercase to improve readability.
15158      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15159      # Now convert it back to Unix-stile (cygpath)
15160      input_path=`$CYGPATH -u "$shortmode_path"`
15161      new_path="$input_path"
15162    fi
15163  fi
15164
15165  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15166  if test "x$test_cygdrive_prefix" = x; then
15167    # As a simple fix, exclude /usr/bin since it's not a real path.
15168    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15169      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15170      # a path prefixed by /cygdrive for fixpath to work.
15171      new_path="$CYGWIN_ROOT_PATH$input_path"
15172    fi
15173  fi
15174
15175
15176  if test "x$path" != "x$new_path"; then
15177    BOOT_JDK="$new_path"
15178    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15179$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15180  fi
15181
15182  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15183
15184  path="$BOOT_JDK"
15185  has_colon=`$ECHO $path | $GREP ^.:`
15186  new_path="$path"
15187  if test "x$has_colon" = x; then
15188    # Not in mixed or Windows style, start by that.
15189    new_path=`cmd //c echo $path`
15190  fi
15191
15192
15193  input_path="$new_path"
15194  # Check if we need to convert this using DOS-style short mode. If the path
15195  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15196  # take no chances and rewrite it.
15197  # Note: m4 eats our [], so we need to use [ and ] instead.
15198  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15199  if test "x$has_forbidden_chars" != x; then
15200    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15201    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15202  fi
15203
15204
15205  windows_path="$new_path"
15206  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15207    unix_path=`$CYGPATH -u "$windows_path"`
15208    new_path="$unix_path"
15209  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15210    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15211    new_path="$unix_path"
15212  fi
15213
15214  if test "x$path" != "x$new_path"; then
15215    BOOT_JDK="$new_path"
15216    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15217$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15218  fi
15219
15220  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15221  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15222
15223  else
15224    # We're on a posix platform. Hooray! :)
15225    path="$BOOT_JDK"
15226    has_space=`$ECHO "$path" | $GREP " "`
15227    if test "x$has_space" != x; then
15228      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15229$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15230      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15231    fi
15232
15233    # Use eval to expand a potential ~
15234    eval path="$path"
15235    if test ! -f "$path" && test ! -d "$path"; then
15236      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15237    fi
15238
15239    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15240  fi
15241
15242              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15243$as_echo_n "checking for Boot JDK... " >&6; }
15244              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15245$as_echo "$BOOT_JDK" >&6; }
15246              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15247$as_echo_n "checking Boot JDK version... " >&6; }
15248              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15249              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15250$as_echo "$BOOT_JDK_VERSION" >&6; }
15251            fi # end check jdk version
15252          fi # end check rt.jar
15253        fi # end check javac
15254      fi # end check java
15255    fi # end check boot jdk found
15256  fi
15257
15258  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
15259
15260  if test "x$BOOT_JDK_FOUND" = xno; then
15261    # Now execute the test
15262
15263  BOOT_JDK_PREFIX="/usr/lib/jvm"
15264  BOOT_JDK_SUFFIX=""
15265  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
15266  if test "x$ALL_JDKS_FOUND" != x; then
15267    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
15268
15269  if test "x$BOOT_JDK_FOUND" = xno; then
15270    # Now execute the test
15271
15272        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
15273        if test -d "$BOOT_JDK"; then
15274          BOOT_JDK_FOUND=maybe
15275          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
15276$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
15277        fi
15278
15279
15280    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15281    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15282      # Do we have a bin/java?
15283      if test ! -x "$BOOT_JDK/bin/java"; then
15284        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15285$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15286        BOOT_JDK_FOUND=no
15287      else
15288        # Do we have a bin/javac?
15289        if test ! -x "$BOOT_JDK/bin/javac"; then
15290          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15291$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15292          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15293$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15294          BOOT_JDK_FOUND=no
15295        else
15296          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15297          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15298            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15299$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15300            BOOT_JDK_FOUND=no
15301          else
15302            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15303            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15304
15305            # Extra M4 quote needed to protect [] in grep expression.
15306            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15307            if test "x$FOUND_VERSION_78" = x; then
15308              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15309$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15310              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15311$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15312              BOOT_JDK_FOUND=no
15313            else
15314              # We're done! :-)
15315              BOOT_JDK_FOUND=yes
15316
15317  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15318
15319  # Input might be given as Windows format, start by converting to
15320  # unix format.
15321  path="$BOOT_JDK"
15322  new_path=`$CYGPATH -u "$path"`
15323
15324  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15325  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15326  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15327  # "foo.exe" is OK but "foo" is an error.
15328  #
15329  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15330  # It is also a way to make sure we got the proper file name for the real test later on.
15331  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15332  if test "x$test_shortpath" = x; then
15333    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15334$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15335    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15336  fi
15337
15338  # Call helper function which possibly converts this using DOS-style short mode.
15339  # If so, the updated path is stored in $new_path.
15340
15341  input_path="$new_path"
15342  # Check if we need to convert this using DOS-style short mode. If the path
15343  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15344  # take no chances and rewrite it.
15345  # Note: m4 eats our [], so we need to use [ and ] instead.
15346  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15347  if test "x$has_forbidden_chars" != x; then
15348    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15349    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15350    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15351    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15352      # Going to short mode and back again did indeed matter. Since short mode is
15353      # case insensitive, let's make it lowercase to improve readability.
15354      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15355      # Now convert it back to Unix-stile (cygpath)
15356      input_path=`$CYGPATH -u "$shortmode_path"`
15357      new_path="$input_path"
15358    fi
15359  fi
15360
15361  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15362  if test "x$test_cygdrive_prefix" = x; then
15363    # As a simple fix, exclude /usr/bin since it's not a real path.
15364    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15365      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15366      # a path prefixed by /cygdrive for fixpath to work.
15367      new_path="$CYGWIN_ROOT_PATH$input_path"
15368    fi
15369  fi
15370
15371
15372  if test "x$path" != "x$new_path"; then
15373    BOOT_JDK="$new_path"
15374    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15375$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15376  fi
15377
15378  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15379
15380  path="$BOOT_JDK"
15381  has_colon=`$ECHO $path | $GREP ^.:`
15382  new_path="$path"
15383  if test "x$has_colon" = x; then
15384    # Not in mixed or Windows style, start by that.
15385    new_path=`cmd //c echo $path`
15386  fi
15387
15388
15389  input_path="$new_path"
15390  # Check if we need to convert this using DOS-style short mode. If the path
15391  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15392  # take no chances and rewrite it.
15393  # Note: m4 eats our [], so we need to use [ and ] instead.
15394  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15395  if test "x$has_forbidden_chars" != x; then
15396    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15397    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15398  fi
15399
15400
15401  windows_path="$new_path"
15402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15403    unix_path=`$CYGPATH -u "$windows_path"`
15404    new_path="$unix_path"
15405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15406    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15407    new_path="$unix_path"
15408  fi
15409
15410  if test "x$path" != "x$new_path"; then
15411    BOOT_JDK="$new_path"
15412    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15413$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15414  fi
15415
15416  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15417  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15418
15419  else
15420    # We're on a posix platform. Hooray! :)
15421    path="$BOOT_JDK"
15422    has_space=`$ECHO "$path" | $GREP " "`
15423    if test "x$has_space" != x; then
15424      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15425$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15426      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15427    fi
15428
15429    # Use eval to expand a potential ~
15430    eval path="$path"
15431    if test ! -f "$path" && test ! -d "$path"; then
15432      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15433    fi
15434
15435    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15436  fi
15437
15438              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15439$as_echo_n "checking for Boot JDK... " >&6; }
15440              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15441$as_echo "$BOOT_JDK" >&6; }
15442              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15443$as_echo_n "checking Boot JDK version... " >&6; }
15444              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15445              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15446$as_echo "$BOOT_JDK_VERSION" >&6; }
15447            fi # end check jdk version
15448          fi # end check rt.jar
15449        fi # end check javac
15450      fi # end check java
15451    fi # end check boot jdk found
15452  fi
15453
15454    done
15455  fi
15456
15457
15458    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15459    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15460      # Do we have a bin/java?
15461      if test ! -x "$BOOT_JDK/bin/java"; then
15462        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15463$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15464        BOOT_JDK_FOUND=no
15465      else
15466        # Do we have a bin/javac?
15467        if test ! -x "$BOOT_JDK/bin/javac"; then
15468          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15469$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15470          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15471$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15472          BOOT_JDK_FOUND=no
15473        else
15474          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15475          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15476            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15477$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15478            BOOT_JDK_FOUND=no
15479          else
15480            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15481            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15482
15483            # Extra M4 quote needed to protect [] in grep expression.
15484            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15485            if test "x$FOUND_VERSION_78" = x; then
15486              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15487$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15488              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15489$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15490              BOOT_JDK_FOUND=no
15491            else
15492              # We're done! :-)
15493              BOOT_JDK_FOUND=yes
15494
15495  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15496
15497  # Input might be given as Windows format, start by converting to
15498  # unix format.
15499  path="$BOOT_JDK"
15500  new_path=`$CYGPATH -u "$path"`
15501
15502  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15503  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15504  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15505  # "foo.exe" is OK but "foo" is an error.
15506  #
15507  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15508  # It is also a way to make sure we got the proper file name for the real test later on.
15509  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15510  if test "x$test_shortpath" = x; then
15511    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15512$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15513    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15514  fi
15515
15516  # Call helper function which possibly converts this using DOS-style short mode.
15517  # If so, the updated path is stored in $new_path.
15518
15519  input_path="$new_path"
15520  # Check if we need to convert this using DOS-style short mode. If the path
15521  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15522  # take no chances and rewrite it.
15523  # Note: m4 eats our [], so we need to use [ and ] instead.
15524  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15525  if test "x$has_forbidden_chars" != x; then
15526    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15527    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15528    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15529    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15530      # Going to short mode and back again did indeed matter. Since short mode is
15531      # case insensitive, let's make it lowercase to improve readability.
15532      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15533      # Now convert it back to Unix-stile (cygpath)
15534      input_path=`$CYGPATH -u "$shortmode_path"`
15535      new_path="$input_path"
15536    fi
15537  fi
15538
15539  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15540  if test "x$test_cygdrive_prefix" = x; then
15541    # As a simple fix, exclude /usr/bin since it's not a real path.
15542    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15543      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15544      # a path prefixed by /cygdrive for fixpath to work.
15545      new_path="$CYGWIN_ROOT_PATH$input_path"
15546    fi
15547  fi
15548
15549
15550  if test "x$path" != "x$new_path"; then
15551    BOOT_JDK="$new_path"
15552    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15553$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15554  fi
15555
15556  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15557
15558  path="$BOOT_JDK"
15559  has_colon=`$ECHO $path | $GREP ^.:`
15560  new_path="$path"
15561  if test "x$has_colon" = x; then
15562    # Not in mixed or Windows style, start by that.
15563    new_path=`cmd //c echo $path`
15564  fi
15565
15566
15567  input_path="$new_path"
15568  # Check if we need to convert this using DOS-style short mode. If the path
15569  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15570  # take no chances and rewrite it.
15571  # Note: m4 eats our [], so we need to use [ and ] instead.
15572  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15573  if test "x$has_forbidden_chars" != x; then
15574    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15575    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15576  fi
15577
15578
15579  windows_path="$new_path"
15580  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15581    unix_path=`$CYGPATH -u "$windows_path"`
15582    new_path="$unix_path"
15583  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15584    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15585    new_path="$unix_path"
15586  fi
15587
15588  if test "x$path" != "x$new_path"; then
15589    BOOT_JDK="$new_path"
15590    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15591$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15592  fi
15593
15594  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15595  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15596
15597  else
15598    # We're on a posix platform. Hooray! :)
15599    path="$BOOT_JDK"
15600    has_space=`$ECHO "$path" | $GREP " "`
15601    if test "x$has_space" != x; then
15602      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15603$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15604      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15605    fi
15606
15607    # Use eval to expand a potential ~
15608    eval path="$path"
15609    if test ! -f "$path" && test ! -d "$path"; then
15610      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15611    fi
15612
15613    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15614  fi
15615
15616              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15617$as_echo_n "checking for Boot JDK... " >&6; }
15618              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15619$as_echo "$BOOT_JDK" >&6; }
15620              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15621$as_echo_n "checking Boot JDK version... " >&6; }
15622              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15623              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15624$as_echo "$BOOT_JDK_VERSION" >&6; }
15625            fi # end check jdk version
15626          fi # end check rt.jar
15627        fi # end check javac
15628      fi # end check java
15629    fi # end check boot jdk found
15630  fi
15631
15632  fi
15633
15634
15635    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15636    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15637      # Do we have a bin/java?
15638      if test ! -x "$BOOT_JDK/bin/java"; then
15639        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15640$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15641        BOOT_JDK_FOUND=no
15642      else
15643        # Do we have a bin/javac?
15644        if test ! -x "$BOOT_JDK/bin/javac"; then
15645          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15646$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15647          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15648$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15649          BOOT_JDK_FOUND=no
15650        else
15651          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15652          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15653            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15654$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15655            BOOT_JDK_FOUND=no
15656          else
15657            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15658            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15659
15660            # Extra M4 quote needed to protect [] in grep expression.
15661            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15662            if test "x$FOUND_VERSION_78" = x; then
15663              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15664$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15665              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15666$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15667              BOOT_JDK_FOUND=no
15668            else
15669              # We're done! :-)
15670              BOOT_JDK_FOUND=yes
15671
15672  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15673
15674  # Input might be given as Windows format, start by converting to
15675  # unix format.
15676  path="$BOOT_JDK"
15677  new_path=`$CYGPATH -u "$path"`
15678
15679  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15680  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15681  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15682  # "foo.exe" is OK but "foo" is an error.
15683  #
15684  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15685  # It is also a way to make sure we got the proper file name for the real test later on.
15686  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15687  if test "x$test_shortpath" = x; then
15688    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15689$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15690    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15691  fi
15692
15693  # Call helper function which possibly converts this using DOS-style short mode.
15694  # If so, the updated path is stored in $new_path.
15695
15696  input_path="$new_path"
15697  # Check if we need to convert this using DOS-style short mode. If the path
15698  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15699  # take no chances and rewrite it.
15700  # Note: m4 eats our [], so we need to use [ and ] instead.
15701  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15702  if test "x$has_forbidden_chars" != x; then
15703    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15704    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15705    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15706    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15707      # Going to short mode and back again did indeed matter. Since short mode is
15708      # case insensitive, let's make it lowercase to improve readability.
15709      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15710      # Now convert it back to Unix-stile (cygpath)
15711      input_path=`$CYGPATH -u "$shortmode_path"`
15712      new_path="$input_path"
15713    fi
15714  fi
15715
15716  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15717  if test "x$test_cygdrive_prefix" = x; then
15718    # As a simple fix, exclude /usr/bin since it's not a real path.
15719    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15720      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15721      # a path prefixed by /cygdrive for fixpath to work.
15722      new_path="$CYGWIN_ROOT_PATH$input_path"
15723    fi
15724  fi
15725
15726
15727  if test "x$path" != "x$new_path"; then
15728    BOOT_JDK="$new_path"
15729    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15730$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15731  fi
15732
15733  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15734
15735  path="$BOOT_JDK"
15736  has_colon=`$ECHO $path | $GREP ^.:`
15737  new_path="$path"
15738  if test "x$has_colon" = x; then
15739    # Not in mixed or Windows style, start by that.
15740    new_path=`cmd //c echo $path`
15741  fi
15742
15743
15744  input_path="$new_path"
15745  # Check if we need to convert this using DOS-style short mode. If the path
15746  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15747  # take no chances and rewrite it.
15748  # Note: m4 eats our [], so we need to use [ and ] instead.
15749  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15750  if test "x$has_forbidden_chars" != x; then
15751    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15752    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15753  fi
15754
15755
15756  windows_path="$new_path"
15757  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15758    unix_path=`$CYGPATH -u "$windows_path"`
15759    new_path="$unix_path"
15760  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15761    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15762    new_path="$unix_path"
15763  fi
15764
15765  if test "x$path" != "x$new_path"; then
15766    BOOT_JDK="$new_path"
15767    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15768$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15769  fi
15770
15771  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15772  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15773
15774  else
15775    # We're on a posix platform. Hooray! :)
15776    path="$BOOT_JDK"
15777    has_space=`$ECHO "$path" | $GREP " "`
15778    if test "x$has_space" != x; then
15779      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15780$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15781      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15782    fi
15783
15784    # Use eval to expand a potential ~
15785    eval path="$path"
15786    if test ! -f "$path" && test ! -d "$path"; then
15787      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15788    fi
15789
15790    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15791  fi
15792
15793              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15794$as_echo_n "checking for Boot JDK... " >&6; }
15795              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15796$as_echo "$BOOT_JDK" >&6; }
15797              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15798$as_echo_n "checking Boot JDK version... " >&6; }
15799              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15800              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15801$as_echo "$BOOT_JDK_VERSION" >&6; }
15802            fi # end check jdk version
15803          fi # end check rt.jar
15804        fi # end check javac
15805      fi # end check java
15806    fi # end check boot jdk found
15807  fi
15808
15809
15810  # If we haven't found anything yet, we've truly lost. Give up.
15811  if test "x$BOOT_JDK_FOUND" = xno; then
15812
15813  # Print a helpful message on how to acquire the necessary build dependency.
15814  # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15815  MISSING_DEPENDENCY=openjdk
15816
15817  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15818    cygwin_help $MISSING_DEPENDENCY
15819  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15820    msys_help $MISSING_DEPENDENCY
15821  else
15822    PKGHANDLER_COMMAND=
15823
15824    case $PKGHANDLER in
15825      apt-get)
15826        apt_help     $MISSING_DEPENDENCY ;;
15827      yum)
15828        yum_help     $MISSING_DEPENDENCY ;;
15829      port)
15830        port_help    $MISSING_DEPENDENCY ;;
15831      pkgutil)
15832        pkgutil_help $MISSING_DEPENDENCY ;;
15833      pkgadd)
15834        pkgadd_help  $MISSING_DEPENDENCY ;;
15835      * )
15836        break ;;
15837    esac
15838
15839    if test "x$PKGHANDLER_COMMAND" != x; then
15840      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15841    fi
15842  fi
15843
15844    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15845$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15846    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15847$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15848    as_fn_error $? "Cannot continue" "$LINENO" 5
15849  fi
15850
15851  # Setup proper paths for what we found
15852  BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15853  if test ! -f "$BOOT_RTJAR"; then
15854    # On MacOSX it is called classes.jar
15855    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15856    if test -f "$BOOT_RTJAR"; then
15857      # Remove the ..
15858      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15859    fi
15860  fi
15861  BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15862  BOOT_JDK="$BOOT_JDK"
15863
15864
15865
15866
15867  # Setup tools from the Boot JDK.
15868
15869  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15870$as_echo_n "checking for java in Boot JDK... " >&6; }
15871  JAVA=$BOOT_JDK/bin/java
15872  if test ! -x $JAVA; then
15873    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15874$as_echo "not found" >&6; }
15875    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15876$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15877    as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15878  fi
15879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15880$as_echo "ok" >&6; }
15881
15882
15883  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15884$as_echo_n "checking for javac in Boot JDK... " >&6; }
15885  JAVAC=$BOOT_JDK/bin/javac
15886  if test ! -x $JAVAC; then
15887    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15888$as_echo "not found" >&6; }
15889    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15890$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15891    as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15892  fi
15893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15894$as_echo "ok" >&6; }
15895
15896
15897  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15898$as_echo_n "checking for javah in Boot JDK... " >&6; }
15899  JAVAH=$BOOT_JDK/bin/javah
15900  if test ! -x $JAVAH; then
15901    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15902$as_echo "not found" >&6; }
15903    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15904$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15905    as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15906  fi
15907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15908$as_echo "ok" >&6; }
15909
15910
15911  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15912$as_echo_n "checking for javap in Boot JDK... " >&6; }
15913  JAVAP=$BOOT_JDK/bin/javap
15914  if test ! -x $JAVAP; then
15915    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15916$as_echo "not found" >&6; }
15917    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15918$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15919    as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15920  fi
15921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15922$as_echo "ok" >&6; }
15923
15924
15925  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15926$as_echo_n "checking for jar in Boot JDK... " >&6; }
15927  JAR=$BOOT_JDK/bin/jar
15928  if test ! -x $JAR; then
15929    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15930$as_echo "not found" >&6; }
15931    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15932$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15933    as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15934  fi
15935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15936$as_echo "ok" >&6; }
15937
15938
15939  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15940$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15941  RMIC=$BOOT_JDK/bin/rmic
15942  if test ! -x $RMIC; then
15943    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15944$as_echo "not found" >&6; }
15945    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15946$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15947    as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15948  fi
15949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15950$as_echo "ok" >&6; }
15951
15952
15953  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15954$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15955  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15956  if test ! -x $NATIVE2ASCII; then
15957    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15958$as_echo "not found" >&6; }
15959    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15960$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15961    as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15962  fi
15963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15964$as_echo "ok" >&6; }
15965
15966
15967  # Finally, set some other options...
15968
15969  # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15970  BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15971
15972
15973
15974
15975  ##############################################################################
15976  #
15977  # Specify options for anything that is run with the Boot JDK.
15978  #
15979
15980# Check whether --with-boot-jdk-jvmargs was given.
15981if test "${with_boot_jdk_jvmargs+set}" = set; then :
15982  withval=$with_boot_jdk_jvmargs;
15983fi
15984
15985
15986  if test "x$with_boot_jdk_jvmargs" = x; then
15987    # Not all JVM:s accept the same arguments on the command line.
15988    # OpenJDK specific increase in thread stack for JDK build,
15989    # well more specifically, when running javac.
15990    if test "x$BUILD_NUM_BITS" = x32; then
15991      STACK_SIZE=768
15992    else
15993      # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15994      # since 64-bit pointers are pushed on the stach. Apparently, we need
15995      # to increase the stack space when javacing the JDK....
15996      STACK_SIZE=1536
15997    fi
15998
15999    # Minimum amount of heap memory.
16000
16001  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
16002  $ECHO "Command: $JAVA -Xms64M -version" >&5
16003  OUTPUT=`$JAVA -Xms64M -version 2>&1`
16004  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16005  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16006  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16007    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
16008    JVM_ARG_OK=true
16009  else
16010    $ECHO "Arg failed:" >&5
16011    $ECHO "$OUTPUT" >&5
16012    JVM_ARG_OK=false
16013  fi
16014
16015    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
16016      # Why does macosx need more heap? Its the huge JDK batch.
16017
16018  $ECHO "Check if jvm arg is ok: -Xmx1600M" >&5
16019  $ECHO "Command: $JAVA -Xmx1600M -version" >&5
16020  OUTPUT=`$JAVA -Xmx1600M -version 2>&1`
16021  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16022  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16023  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16024    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
16025    JVM_ARG_OK=true
16026  else
16027    $ECHO "Arg failed:" >&5
16028    $ECHO "$OUTPUT" >&5
16029    JVM_ARG_OK=false
16030  fi
16031
16032    else
16033
16034  $ECHO "Check if jvm arg is ok: -Xmx1100M" >&5
16035  $ECHO "Command: $JAVA -Xmx1100M -version" >&5
16036  OUTPUT=`$JAVA -Xmx1100M -version 2>&1`
16037  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16038  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16039  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16040    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
16041    JVM_ARG_OK=true
16042  else
16043    $ECHO "Arg failed:" >&5
16044    $ECHO "$OUTPUT" >&5
16045    JVM_ARG_OK=false
16046  fi
16047
16048    fi
16049    # When is adding -client something that speeds up the JVM?
16050    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
16051
16052  $ECHO "Check if jvm arg is ok: -XX:PermSize=32m" >&5
16053  $ECHO "Command: $JAVA -XX:PermSize=32m -version" >&5
16054  OUTPUT=`$JAVA -XX:PermSize=32m -version 2>&1`
16055  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16056  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16057  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16058    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
16059    JVM_ARG_OK=true
16060  else
16061    $ECHO "Arg failed:" >&5
16062    $ECHO "$OUTPUT" >&5
16063    JVM_ARG_OK=false
16064  fi
16065
16066
16067  $ECHO "Check if jvm arg is ok: -XX:MaxPermSize=160m" >&5
16068  $ECHO "Command: $JAVA -XX:MaxPermSize=160m -version" >&5
16069  OUTPUT=`$JAVA -XX:MaxPermSize=160m -version 2>&1`
16070  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16071  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16072  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16073    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
16074    JVM_ARG_OK=true
16075  else
16076    $ECHO "Arg failed:" >&5
16077    $ECHO "$OUTPUT" >&5
16078    JVM_ARG_OK=false
16079  fi
16080
16081
16082  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
16083  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
16084  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
16085  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16086  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16087  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16088    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
16089    JVM_ARG_OK=true
16090  else
16091    $ECHO "Arg failed:" >&5
16092    $ECHO "$OUTPUT" >&5
16093    JVM_ARG_OK=false
16094  fi
16095
16096    # Disable special log output when a debug build is used as Boot JDK...
16097
16098  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
16099  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
16100  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
16101  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16102  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16103  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16104    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
16105    JVM_ARG_OK=true
16106  else
16107    $ECHO "Arg failed:" >&5
16108    $ECHO "$OUTPUT" >&5
16109    JVM_ARG_OK=false
16110  fi
16111
16112  fi
16113
16114  BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
16115
16116
16117
16118###############################################################################
16119#
16120# Configure the sources to use. We can add or override individual directories.
16121#
16122###############################################################################
16123
16124
16125  # Where are the sources. Any of these can be overridden
16126  # using --with-override-corba and the likes.
16127  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
16128  CORBA_TOPDIR="$SRC_ROOT/corba"
16129  JAXP_TOPDIR="$SRC_ROOT/jaxp"
16130  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
16131  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
16132  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
16133  JDK_TOPDIR="$SRC_ROOT/jdk"
16134
16135
16136
16137
16138
16139
16140
16141
16142
16143
16144  ###############################################################################
16145  #
16146  # Pickup additional source for a component from outside of the source root
16147  # or override source for a component.
16148  #
16149
16150# Check whether --with-add-source-root was given.
16151if test "${with_add_source_root+set}" = set; then :
16152  withval=$with_add_source_root;
16153fi
16154
16155
16156
16157# Check whether --with-override-source-root was given.
16158if test "${with_override_source_root+set}" = set; then :
16159  withval=$with_override_source_root;
16160fi
16161
16162
16163
16164# Check whether --with-adds-and-overrides was given.
16165if test "${with_adds_and_overrides+set}" = set; then :
16166  withval=$with_adds_and_overrides;
16167fi
16168
16169
16170  if test "x$with_adds_and_overrides" != x; then
16171    with_add_source_root="$with_adds_and_overrides/adds"
16172    with_override_source_root="$with_adds_and_overrides/overrides"
16173  fi
16174
16175  if test "x$with_add_source_root" != x; then
16176    if ! test -d $with_add_source_root; then
16177      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
16178    fi
16179    CURDIR="$PWD"
16180    cd "$with_add_source_root"
16181    ADD_SRC_ROOT="`pwd`"
16182    cd "$CURDIR"
16183    # Verify that the addon source root does not have any root makefiles.
16184    # If it does, then it is usually an error, prevent this.
16185    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
16186      test -f $with_add_source_root/langtools/make/Makefile; then
16187      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
16188    fi
16189    if test -f $with_add_source_root/corba/makefiles/Makefile || \
16190      test -f $with_add_source_root/corba/make/Makefile; then
16191      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
16192    fi
16193    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
16194      test -f $with_add_source_root/jaxp/make/Makefile; then
16195      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
16196    fi
16197    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
16198      test -f $with_add_source_root/jaxws/make/Makefile; then
16199      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
16200    fi
16201    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
16202      test -f $with_add_source_root/hotspot/make/Makefile; then
16203      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
16204    fi
16205    if test -f $with_add_source_root/nashorn/makefiles/Makefile || \
16206      test -f $with_add_source_root/nashorn/make/Makefile; then
16207      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
16208    fi
16209    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
16210      test -f $with_add_source_root/jdk/make/Makefile; then
16211      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
16212    fi
16213  fi
16214
16215
16216  if test "x$with_override_source_root" != x; then
16217    if ! test -d $with_override_source_root; then
16218      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
16219    fi
16220    CURDIR="$PWD"
16221    cd "$with_override_source_root"
16222    OVERRIDE_SRC_ROOT="`pwd`"
16223    cd "$CURDIR"
16224    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
16225      test -f $with_override_source_root/langtools/make/Makefile; then
16226      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
16227    fi
16228    if test -f $with_override_source_root/corba/makefiles/Makefile || \
16229      test -f $with_override_source_root/corba/make/Makefile; then
16230      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
16231    fi
16232    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
16233      test -f $with_override_source_root/jaxp/make/Makefile; then
16234      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
16235    fi
16236    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
16237      test -f $with_override_source_root/jaxws/make/Makefile; then
16238      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
16239    fi
16240    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
16241      test -f $with_override_source_root/hotspot/make/Makefile; then
16242      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
16243    fi
16244    if test -f $with_override_source_root/nashorn/makefiles/Makefile || \
16245      test -f $with_override_source_root/nashorn/make/Makefile; then
16246      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
16247    fi
16248    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
16249      test -f $with_override_source_root/jdk/make/Makefile; then
16250      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
16251    fi
16252  fi
16253
16254
16255  ###############################################################################
16256  #
16257  # Override a repo completely, this is used for example when you have 3 small
16258  # development sandboxes of the langtools sources and want to avoid having 3 full
16259  # OpenJDK sources checked out on disk.
16260  #
16261  # Assuming that the 3 langtools sandboxes are located here:
16262  # /home/fredrik/sandbox1/langtools
16263  # /home/fredrik/sandbox2/langtools
16264  # /home/fredrik/sandbox3/langtools
16265  #
16266  # From the source root you create build subdirs manually:
16267  #     mkdir -p build1 build2 build3
16268  # in each build directory run:
16269  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
16270  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
16271  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
16272  #
16273
16274
16275# Check whether --with-override-langtools was given.
16276if test "${with_override_langtools+set}" = set; then :
16277  withval=$with_override_langtools;
16278fi
16279
16280
16281
16282# Check whether --with-override-corba was given.
16283if test "${with_override_corba+set}" = set; then :
16284  withval=$with_override_corba;
16285fi
16286
16287
16288
16289# Check whether --with-override-jaxp was given.
16290if test "${with_override_jaxp+set}" = set; then :
16291  withval=$with_override_jaxp;
16292fi
16293
16294
16295
16296# Check whether --with-override-jaxws was given.
16297if test "${with_override_jaxws+set}" = set; then :
16298  withval=$with_override_jaxws;
16299fi
16300
16301
16302
16303# Check whether --with-override-hotspot was given.
16304if test "${with_override_hotspot+set}" = set; then :
16305  withval=$with_override_hotspot;
16306fi
16307
16308
16309
16310# Check whether --with-override-nashorn was given.
16311if test "${with_override_nashorn+set}" = set; then :
16312  withval=$with_override_nashorn;
16313fi
16314
16315
16316
16317# Check whether --with-override-jdk was given.
16318if test "${with_override_jdk+set}" = set; then :
16319  withval=$with_override_jdk;
16320fi
16321
16322
16323  if test "x$with_override_langtools" != x; then
16324    CURDIR="$PWD"
16325    cd "$with_override_langtools"
16326    LANGTOOLS_TOPDIR="`pwd`"
16327    cd "$CURDIR"
16328    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
16329      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
16330    fi
16331    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
16332$as_echo_n "checking if langtools should be overridden... " >&6; }
16333    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
16334$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
16335  fi
16336  if test "x$with_override_corba" != x; then
16337    CURDIR="$PWD"
16338    cd "$with_override_corba"
16339    CORBA_TOPDIR="`pwd`"
16340    cd "$CURDIR"
16341    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
16342      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
16343    fi
16344    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
16345$as_echo_n "checking if corba should be overridden... " >&6; }
16346    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
16347$as_echo "yes with $CORBA_TOPDIR" >&6; }
16348  fi
16349  if test "x$with_override_jaxp" != x; then
16350    CURDIR="$PWD"
16351    cd "$with_override_jaxp"
16352    JAXP_TOPDIR="`pwd`"
16353    cd "$CURDIR"
16354    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
16355      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
16356    fi
16357    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
16358$as_echo_n "checking if jaxp should be overridden... " >&6; }
16359    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
16360$as_echo "yes with $JAXP_TOPDIR" >&6; }
16361  fi
16362  if test "x$with_override_jaxws" != x; then
16363    CURDIR="$PWD"
16364    cd "$with_override_jaxws"
16365    JAXWS_TOPDIR="`pwd`"
16366    cd "$CURDIR"
16367    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
16368      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
16369    fi
16370    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
16371$as_echo_n "checking if jaxws should be overridden... " >&6; }
16372    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
16373$as_echo "yes with $JAXWS_TOPDIR" >&6; }
16374  fi
16375  if test "x$with_override_hotspot" != x; then
16376    CURDIR="$PWD"
16377    cd "$with_override_hotspot"
16378    HOTSPOT_TOPDIR="`pwd`"
16379    cd "$CURDIR"
16380    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
16381        ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
16382      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
16383    fi
16384    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
16385$as_echo_n "checking if hotspot should be overridden... " >&6; }
16386    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
16387$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
16388  fi
16389  if test "x$with_override_nashorn" != x; then
16390    CURDIR="$PWD"
16391    cd "$with_override_nashorn"
16392    NASHORN_TOPDIR="`pwd`"
16393    cd "$CURDIR"
16394    if ! test -f $NASHORN_TOPDIR/makefiles/Makefile; then
16395      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
16396    fi
16397    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
16398$as_echo_n "checking if nashorn should be overridden... " >&6; }
16399    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
16400$as_echo "yes with $NASHORN_TOPDIR" >&6; }
16401  fi
16402  if test "x$with_override_jdk" != x; then
16403    CURDIR="$PWD"
16404    cd "$with_override_jdk"
16405    JDK_TOPDIR="`pwd`"
16406    cd "$CURDIR"
16407    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
16408      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
16409    fi
16410    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
16411$as_echo_n "checking if JDK should be overridden... " >&6; }
16412    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
16413$as_echo "yes with $JDK_TOPDIR" >&6; }
16414  fi
16415
16416
16417  BUILD_OUTPUT="$OUTPUT_ROOT"
16418
16419
16420  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
16421  BUILD_HOTSPOT=true
16422
16423
16424
16425# Check whether --with-import-hotspot was given.
16426if test "${with_import_hotspot+set}" = set; then :
16427  withval=$with_import_hotspot;
16428fi
16429
16430  if test "x$with_import_hotspot" != x; then
16431    CURDIR="$PWD"
16432    cd "$with_import_hotspot"
16433    HOTSPOT_DIST="`pwd`"
16434    cd "$CURDIR"
16435    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
16436      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
16437    fi
16438    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
16439$as_echo_n "checking if hotspot should be imported... " >&6; }
16440    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
16441$as_echo "yes from $HOTSPOT_DIST" >&6; }
16442    BUILD_HOTSPOT=false
16443  fi
16444
16445  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
16446
16447
16448###############################################################################
16449#
16450# Setup the toolchain (compilers etc), i.e. the tools that need to be
16451# cross-compilation aware.
16452#
16453###############################################################################
16454
16455
16456  ###############################################################################
16457  #
16458  # Configure the development tool paths and potential sysroot.
16459  #
16460  ac_ext=cpp
16461ac_cpp='$CXXCPP $CPPFLAGS'
16462ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16463ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16464ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16465
16466
16467  # The option used to specify the target .o,.a or .so file.
16468  # When compiling, how to specify the to be created object file.
16469  CC_OUT_OPTION='-o$(SPACE)'
16470  # When linking, how to specify the to be created executable.
16471  EXE_OUT_OPTION='-o$(SPACE)'
16472  # When linking, how to specify the to be created dynamically linkable library.
16473  LD_OUT_OPTION='-o$(SPACE)'
16474  # When archiving, how to specify the to be create static archive for object files.
16475  AR_OUT_OPTION='rcs$(SPACE)'
16476
16477
16478
16479
16480
16481# Locate the actual tools
16482
16483
16484# Check whether --with-jtreg was given.
16485if test "${with_jtreg+set}" = set; then :
16486  withval=$with_jtreg;
16487else
16488  with_jtreg=no
16489fi
16490
16491
16492  if test "x$with_jtreg" = xno; then
16493    # jtreg disabled
16494    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16495$as_echo_n "checking for jtreg... " >&6; }
16496    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16497$as_echo "no" >&6; }
16498  else
16499    if test "x$with_jtreg" != xyes; then
16500      # with path specified.
16501      JT_HOME="$with_jtreg"
16502    fi
16503
16504    if test "x$JT_HOME" != x; then
16505      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16506$as_echo_n "checking for jtreg... " >&6; }
16507
16508      # use JT_HOME enviroment var.
16509
16510  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16511
16512  # Input might be given as Windows format, start by converting to
16513  # unix format.
16514  path="$JT_HOME"
16515  new_path=`$CYGPATH -u "$path"`
16516
16517  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16518  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16519  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16520  # "foo.exe" is OK but "foo" is an error.
16521  #
16522  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16523  # It is also a way to make sure we got the proper file name for the real test later on.
16524  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16525  if test "x$test_shortpath" = x; then
16526    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16527$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16528    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
16529  fi
16530
16531  # Call helper function which possibly converts this using DOS-style short mode.
16532  # If so, the updated path is stored in $new_path.
16533
16534  input_path="$new_path"
16535  # Check if we need to convert this using DOS-style short mode. If the path
16536  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16537  # take no chances and rewrite it.
16538  # Note: m4 eats our [], so we need to use [ and ] instead.
16539  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16540  if test "x$has_forbidden_chars" != x; then
16541    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16542    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16543    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16544    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16545      # Going to short mode and back again did indeed matter. Since short mode is
16546      # case insensitive, let's make it lowercase to improve readability.
16547      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16548      # Now convert it back to Unix-stile (cygpath)
16549      input_path=`$CYGPATH -u "$shortmode_path"`
16550      new_path="$input_path"
16551    fi
16552  fi
16553
16554  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16555  if test "x$test_cygdrive_prefix" = x; then
16556    # As a simple fix, exclude /usr/bin since it's not a real path.
16557    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16558      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16559      # a path prefixed by /cygdrive for fixpath to work.
16560      new_path="$CYGWIN_ROOT_PATH$input_path"
16561    fi
16562  fi
16563
16564
16565  if test "x$path" != "x$new_path"; then
16566    JT_HOME="$new_path"
16567    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16568$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16569  fi
16570
16571  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16572
16573  path="$JT_HOME"
16574  has_colon=`$ECHO $path | $GREP ^.:`
16575  new_path="$path"
16576  if test "x$has_colon" = x; then
16577    # Not in mixed or Windows style, start by that.
16578    new_path=`cmd //c echo $path`
16579  fi
16580
16581
16582  input_path="$new_path"
16583  # Check if we need to convert this using DOS-style short mode. If the path
16584  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16585  # take no chances and rewrite it.
16586  # Note: m4 eats our [], so we need to use [ and ] instead.
16587  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16588  if test "x$has_forbidden_chars" != x; then
16589    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16590    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16591  fi
16592
16593
16594  windows_path="$new_path"
16595  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16596    unix_path=`$CYGPATH -u "$windows_path"`
16597    new_path="$unix_path"
16598  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16599    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16600    new_path="$unix_path"
16601  fi
16602
16603  if test "x$path" != "x$new_path"; then
16604    JT_HOME="$new_path"
16605    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16606$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16607  fi
16608
16609  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16610  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16611
16612  else
16613    # We're on a posix platform. Hooray! :)
16614    path="$JT_HOME"
16615    has_space=`$ECHO "$path" | $GREP " "`
16616    if test "x$has_space" != x; then
16617      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16618$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16619      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16620    fi
16621
16622    # Use eval to expand a potential ~
16623    eval path="$path"
16624    if test ! -f "$path" && test ! -d "$path"; then
16625      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
16626    fi
16627
16628    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
16629  fi
16630
16631
16632      # jtreg win32 script works for everybody
16633      JTREGEXE="$JT_HOME/win32/bin/jtreg"
16634
16635      if test ! -f "$JTREGEXE"; then
16636        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
16637      fi
16638
16639      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16640$as_echo "$JTREGEXE" >&6; }
16641    else
16642      # try to find jtreg on path
16643
16644  for ac_prog in jtreg
16645do
16646  # Extract the first word of "$ac_prog", so it can be a program name with args.
16647set dummy $ac_prog; ac_word=$2
16648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16649$as_echo_n "checking for $ac_word... " >&6; }
16650if ${ac_cv_path_JTREGEXE+:} false; then :
16651  $as_echo_n "(cached) " >&6
16652else
16653  case $JTREGEXE in
16654  [\\/]* | ?:[\\/]*)
16655  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
16656  ;;
16657  *)
16658  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16659for as_dir in $PATH
16660do
16661  IFS=$as_save_IFS
16662  test -z "$as_dir" && as_dir=.
16663    for ac_exec_ext in '' $ac_executable_extensions; do
16664  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16665    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
16666    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16667    break 2
16668  fi
16669done
16670  done
16671IFS=$as_save_IFS
16672
16673  ;;
16674esac
16675fi
16676JTREGEXE=$ac_cv_path_JTREGEXE
16677if test -n "$JTREGEXE"; then
16678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16679$as_echo "$JTREGEXE" >&6; }
16680else
16681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16682$as_echo "no" >&6; }
16683fi
16684
16685
16686  test -n "$JTREGEXE" && break
16687done
16688
16689
16690  if test "x$JTREGEXE" = x; then
16691    if test "xjtreg" = x; then
16692      PROG_NAME=jtregexe
16693    else
16694      PROG_NAME=jtreg
16695    fi
16696    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
16697$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
16698    as_fn_error $? "Cannot continue" "$LINENO" 5
16699  fi
16700
16701
16702      JT_HOME="`$DIRNAME $JTREGEXE`"
16703    fi
16704  fi
16705
16706
16707
16708
16709
16710  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16711
16712  # Store path to cygwin link.exe to help excluding it when searching for
16713  # VS linker. This must be done before changing the PATH when looking for VS.
16714  # Extract the first word of "link", so it can be a program name with args.
16715set dummy link; ac_word=$2
16716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16717$as_echo_n "checking for $ac_word... " >&6; }
16718if ${ac_cv_path_CYGWIN_LINK+:} false; then :
16719  $as_echo_n "(cached) " >&6
16720else
16721  case $CYGWIN_LINK in
16722  [\\/]* | ?:[\\/]*)
16723  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16724  ;;
16725  *)
16726  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16727for as_dir in $PATH
16728do
16729  IFS=$as_save_IFS
16730  test -z "$as_dir" && as_dir=.
16731    for ac_exec_ext in '' $ac_executable_extensions; do
16732  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16733    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16735    break 2
16736  fi
16737done
16738  done
16739IFS=$as_save_IFS
16740
16741  ;;
16742esac
16743fi
16744CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16745if test -n "$CYGWIN_LINK"; then
16746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16747$as_echo "$CYGWIN_LINK" >&6; }
16748else
16749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16750$as_echo "no" >&6; }
16751fi
16752
16753
16754  if test "x$CYGWIN_LINK" != x; then
16755    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16756$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16757    "$CYGWIN_LINK" --version > /dev/null
16758    if test $? -eq 0 ; then
16759      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16760$as_echo "yes" >&6; }
16761    else
16762      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16763$as_echo "no" >&6; }
16764      # This might be the VS linker. Don't exclude it later on.
16765      CYGWIN_LINK=""
16766    fi
16767  fi
16768
16769  # First-hand choice is to locate and run the vsvars bat file.
16770
16771  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16772    VCVARSFILE="vc/bin/vcvars32.bat"
16773  else
16774    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16775  fi
16776
16777  VS_ENV_CMD=""
16778  VS_ENV_ARGS=""
16779  if test "x$with_toolsdir" != x; then
16780
16781  if test "x$VS_ENV_CMD" = x; then
16782    VS100BASE="$with_toolsdir/../.."
16783    METHOD="--with-tools-dir"
16784
16785  windows_path="$VS100BASE"
16786  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16787    unix_path=`$CYGPATH -u "$windows_path"`
16788    VS100BASE="$unix_path"
16789  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16790    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16791    VS100BASE="$unix_path"
16792  fi
16793
16794    if test -d "$VS100BASE"; then
16795      if test -f "$VS100BASE/$VCVARSFILE"; then
16796        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16797$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16798        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16799      else
16800        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16801$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16802        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16803$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16804      fi
16805    fi
16806  fi
16807
16808  fi
16809
16810  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16811    # Having specified an argument which is incorrect will produce an instant failure;
16812    # we should not go on looking
16813    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16814$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16815    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16816$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16817    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16818  fi
16819
16820  if test "x$VS100COMNTOOLS" != x; then
16821
16822  if test "x$VS_ENV_CMD" = x; then
16823    VS100BASE="$VS100COMNTOOLS/../.."
16824    METHOD="VS100COMNTOOLS variable"
16825
16826  windows_path="$VS100BASE"
16827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16828    unix_path=`$CYGPATH -u "$windows_path"`
16829    VS100BASE="$unix_path"
16830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16831    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16832    VS100BASE="$unix_path"
16833  fi
16834
16835    if test -d "$VS100BASE"; then
16836      if test -f "$VS100BASE/$VCVARSFILE"; then
16837        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16838$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16839        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16840      else
16841        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16842$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16843        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16844$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16845      fi
16846    fi
16847  fi
16848
16849  fi
16850  if test "x$PROGRAMFILES" != x; then
16851
16852  if test "x$VS_ENV_CMD" = x; then
16853    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16854    METHOD="well-known name"
16855
16856  windows_path="$VS100BASE"
16857  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16858    unix_path=`$CYGPATH -u "$windows_path"`
16859    VS100BASE="$unix_path"
16860  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16861    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16862    VS100BASE="$unix_path"
16863  fi
16864
16865    if test -d "$VS100BASE"; then
16866      if test -f "$VS100BASE/$VCVARSFILE"; then
16867        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16868$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16869        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16870      else
16871        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16872$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16873        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16874$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16875      fi
16876    fi
16877  fi
16878
16879  fi
16880
16881  if test "x$VS_ENV_CMD" = x; then
16882    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16883    METHOD="well-known name"
16884
16885  windows_path="$VS100BASE"
16886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16887    unix_path=`$CYGPATH -u "$windows_path"`
16888    VS100BASE="$unix_path"
16889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16890    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16891    VS100BASE="$unix_path"
16892  fi
16893
16894    if test -d "$VS100BASE"; then
16895      if test -f "$VS100BASE/$VCVARSFILE"; then
16896        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16897$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16898        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16899      else
16900        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16901$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16902        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16903$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16904      fi
16905    fi
16906  fi
16907
16908
16909  if test "x$VS_ENV_CMD" = x; then
16910    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16911    METHOD="well-known name"
16912
16913  windows_path="$VS100BASE"
16914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16915    unix_path=`$CYGPATH -u "$windows_path"`
16916    VS100BASE="$unix_path"
16917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16918    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16919    VS100BASE="$unix_path"
16920  fi
16921
16922    if test -d "$VS100BASE"; then
16923      if test -f "$VS100BASE/$VCVARSFILE"; then
16924        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16925$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16926        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16927      else
16928        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16929$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16930        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16931$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16932      fi
16933    fi
16934  fi
16935
16936
16937  if test "x$ProgramW6432" != x; then
16938
16939  if test "x$VS_ENV_CMD" = x; then
16940    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16941    METHOD="well-known name"
16942
16943  windows_path="$WIN_SDK_BASE"
16944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16945    unix_path=`$CYGPATH -u "$windows_path"`
16946    WIN_SDK_BASE="$unix_path"
16947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16948    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16949    WIN_SDK_BASE="$unix_path"
16950  fi
16951
16952    if test -d "$WIN_SDK_BASE"; then
16953      # There have been cases of partial or broken SDK installations. A missing
16954      # lib dir is not going to work.
16955      if test ! -d "$WIN_SDK_BASE/../lib"; then
16956        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16957$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16958        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16959$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16960      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16961        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16962$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16963        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16964        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16965          VS_ENV_ARGS="/x86"
16966        else
16967          VS_ENV_ARGS="/x64"
16968        fi
16969      else
16970        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16971$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16972        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16973$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16974      fi
16975    fi
16976  fi
16977
16978  fi
16979  if test "x$PROGRAMW6432" != x; then
16980
16981  if test "x$VS_ENV_CMD" = x; then
16982    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16983    METHOD="well-known name"
16984
16985  windows_path="$WIN_SDK_BASE"
16986  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16987    unix_path=`$CYGPATH -u "$windows_path"`
16988    WIN_SDK_BASE="$unix_path"
16989  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16990    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16991    WIN_SDK_BASE="$unix_path"
16992  fi
16993
16994    if test -d "$WIN_SDK_BASE"; then
16995      # There have been cases of partial or broken SDK installations. A missing
16996      # lib dir is not going to work.
16997      if test ! -d "$WIN_SDK_BASE/../lib"; then
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, lib dir is missing. Ignoring" >&5
17001$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17002      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17003        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17004$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17005        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17006        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17007          VS_ENV_ARGS="/x86"
17008        else
17009          VS_ENV_ARGS="/x64"
17010        fi
17011      else
17012        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17013$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17014        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17015$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17016      fi
17017    fi
17018  fi
17019
17020  fi
17021  if test "x$PROGRAMFILES" != x; then
17022
17023  if test "x$VS_ENV_CMD" = x; then
17024    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
17025    METHOD="well-known name"
17026
17027  windows_path="$WIN_SDK_BASE"
17028  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17029    unix_path=`$CYGPATH -u "$windows_path"`
17030    WIN_SDK_BASE="$unix_path"
17031  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17032    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17033    WIN_SDK_BASE="$unix_path"
17034  fi
17035
17036    if test -d "$WIN_SDK_BASE"; then
17037      # There have been cases of partial or broken SDK installations. A missing
17038      # lib dir is not going to work.
17039      if test ! -d "$WIN_SDK_BASE/../lib"; then
17040        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17041$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17042        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17043$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17044      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17045        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17046$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17047        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17048        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17049          VS_ENV_ARGS="/x86"
17050        else
17051          VS_ENV_ARGS="/x64"
17052        fi
17053      else
17054        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17055$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17056        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17057$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17058      fi
17059    fi
17060  fi
17061
17062  fi
17063
17064  if test "x$VS_ENV_CMD" = x; then
17065    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
17066    METHOD="well-known name"
17067
17068  windows_path="$WIN_SDK_BASE"
17069  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17070    unix_path=`$CYGPATH -u "$windows_path"`
17071    WIN_SDK_BASE="$unix_path"
17072  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17073    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17074    WIN_SDK_BASE="$unix_path"
17075  fi
17076
17077    if test -d "$WIN_SDK_BASE"; then
17078      # There have been cases of partial or broken SDK installations. A missing
17079      # lib dir is not going to work.
17080      if test ! -d "$WIN_SDK_BASE/../lib"; then
17081        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17082$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17083        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17084$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17085      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17086        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17087$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17088        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17089        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17090          VS_ENV_ARGS="/x86"
17091        else
17092          VS_ENV_ARGS="/x64"
17093        fi
17094      else
17095        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17096$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17097        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17098$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17099      fi
17100    fi
17101  fi
17102
17103
17104  if test "x$VS_ENV_CMD" = x; then
17105    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
17106    METHOD="well-known name"
17107
17108  windows_path="$WIN_SDK_BASE"
17109  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17110    unix_path=`$CYGPATH -u "$windows_path"`
17111    WIN_SDK_BASE="$unix_path"
17112  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17113    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17114    WIN_SDK_BASE="$unix_path"
17115  fi
17116
17117    if test -d "$WIN_SDK_BASE"; then
17118      # There have been cases of partial or broken SDK installations. A missing
17119      # lib dir is not going to work.
17120      if test ! -d "$WIN_SDK_BASE/../lib"; then
17121        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17122$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17123        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17124$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17125      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17126        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17127$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17128        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17129        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17130          VS_ENV_ARGS="/x86"
17131        else
17132          VS_ENV_ARGS="/x64"
17133        fi
17134      else
17135        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17136$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17137        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17138$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17139      fi
17140    fi
17141  fi
17142
17143
17144  if test "x$VS_ENV_CMD" != x; then
17145    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
17146
17147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17148
17149  # First separate the path from the arguments. This will split at the first
17150  # space.
17151  complete="$VS_ENV_CMD"
17152  path="${complete%% *}"
17153  tmp="$complete EOL"
17154  arguments="${tmp#* }"
17155
17156  # Input might be given as Windows format, start by converting to
17157  # unix format.
17158  new_path=`$CYGPATH -u "$path"`
17159
17160  # Now try to locate executable using which
17161  new_path=`$WHICH "$new_path" 2> /dev/null`
17162  # bat and cmd files are not always considered executable in cygwin causing which
17163  # to not find them
17164  if test "x$new_path" = x \
17165      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17166      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17167    new_path=`$CYGPATH -u "$path"`
17168  fi
17169  if test "x$new_path" = x; then
17170    # Oops. Which didn't find the executable.
17171    # The splitting of arguments from the executable at a space might have been incorrect,
17172    # since paths with space are more likely in Windows. Give it another try with the whole
17173    # argument.
17174    path="$complete"
17175    arguments="EOL"
17176    new_path=`$CYGPATH -u "$path"`
17177    new_path=`$WHICH "$new_path" 2> /dev/null`
17178    # bat and cmd files are not always considered executable in cygwin causing which
17179    # to not find them
17180    if test "x$new_path" = x \
17181        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17182        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17183      new_path=`$CYGPATH -u "$path"`
17184    fi
17185    if test "x$new_path" = x; then
17186      # It's still not found. Now this is an unrecoverable error.
17187      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17188$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17189      has_space=`$ECHO "$complete" | $GREP " "`
17190      if test "x$has_space" != x; then
17191        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17192$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17193      fi
17194      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17195    fi
17196  fi
17197
17198  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17199  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17200  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17201  # "foo.exe" is OK but "foo" is an error.
17202  #
17203  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17204  # It is also a way to make sure we got the proper file name for the real test later on.
17205  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17206  if test "x$test_shortpath" = x; then
17207    # Short path failed, file does not exist as specified.
17208    # Try adding .exe or .cmd
17209    if test -f "${new_path}.exe"; then
17210      input_to_shortpath="${new_path}.exe"
17211    elif test -f "${new_path}.cmd"; then
17212      input_to_shortpath="${new_path}.cmd"
17213    else
17214      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
17215$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
17216      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17217$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17218      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17219    fi
17220  else
17221    input_to_shortpath="$new_path"
17222  fi
17223
17224  # Call helper function which possibly converts this using DOS-style short mode.
17225  # If so, the updated path is stored in $new_path.
17226  new_path="$input_to_shortpath"
17227
17228  input_path="$input_to_shortpath"
17229  # Check if we need to convert this using DOS-style short mode. If the path
17230  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17231  # take no chances and rewrite it.
17232  # Note: m4 eats our [], so we need to use [ and ] instead.
17233  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17234  if test "x$has_forbidden_chars" != x; then
17235    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17236    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17237    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17238    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17239      # Going to short mode and back again did indeed matter. Since short mode is
17240      # case insensitive, let's make it lowercase to improve readability.
17241      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17242      # Now convert it back to Unix-stile (cygpath)
17243      input_path=`$CYGPATH -u "$shortmode_path"`
17244      new_path="$input_path"
17245    fi
17246  fi
17247
17248  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17249  if test "x$test_cygdrive_prefix" = x; then
17250    # As a simple fix, exclude /usr/bin since it's not a real path.
17251    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17252      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17253      # a path prefixed by /cygdrive for fixpath to work.
17254      new_path="$CYGWIN_ROOT_PATH$input_path"
17255    fi
17256  fi
17257
17258  # remove trailing .exe if any
17259  new_path="${new_path/%.exe/}"
17260
17261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17262
17263  # First separate the path from the arguments. This will split at the first
17264  # space.
17265  complete="$VS_ENV_CMD"
17266  path="${complete%% *}"
17267  tmp="$complete EOL"
17268  arguments="${tmp#* }"
17269
17270  # Input might be given as Windows format, start by converting to
17271  # unix format.
17272  new_path="$path"
17273
17274  windows_path="$new_path"
17275  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17276    unix_path=`$CYGPATH -u "$windows_path"`
17277    new_path="$unix_path"
17278  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17279    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17280    new_path="$unix_path"
17281  fi
17282
17283
17284  # Now try to locate executable using which
17285  new_path=`$WHICH "$new_path" 2> /dev/null`
17286
17287  if test "x$new_path" = x; then
17288    # Oops. Which didn't find the executable.
17289    # The splitting of arguments from the executable at a space might have been incorrect,
17290    # since paths with space are more likely in Windows. Give it another try with the whole
17291    # argument.
17292    path="$complete"
17293    arguments="EOL"
17294    new_path="$path"
17295
17296  windows_path="$new_path"
17297  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17298    unix_path=`$CYGPATH -u "$windows_path"`
17299    new_path="$unix_path"
17300  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17301    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17302    new_path="$unix_path"
17303  fi
17304
17305
17306    new_path=`$WHICH "$new_path" 2> /dev/null`
17307
17308    if test "x$new_path" = x; then
17309      # It's still not found. Now this is an unrecoverable error.
17310      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17311$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17312      has_space=`$ECHO "$complete" | $GREP " "`
17313      if test "x$has_space" != x; then
17314        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17315$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17316      fi
17317      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17318    fi
17319  fi
17320
17321  # Now new_path has a complete unix path to the binary
17322  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17323    # Keep paths in /bin as-is, but remove trailing .exe if any
17324    new_path="${new_path/%.exe/}"
17325    # Do not save /bin paths to all_fixpath_prefixes!
17326  else
17327    # Not in mixed or Windows style, start by that.
17328    new_path=`cmd //c echo $new_path`
17329
17330  input_path="$new_path"
17331  # Check if we need to convert this using DOS-style short mode. If the path
17332  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17333  # take no chances and rewrite it.
17334  # Note: m4 eats our [], so we need to use [ and ] instead.
17335  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17336  if test "x$has_forbidden_chars" != x; then
17337    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17338    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17339  fi
17340
17341    # Output is in $new_path
17342
17343  windows_path="$new_path"
17344  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17345    unix_path=`$CYGPATH -u "$windows_path"`
17346    new_path="$unix_path"
17347  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17348    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17349    new_path="$unix_path"
17350  fi
17351
17352    # remove trailing .exe if any
17353    new_path="${new_path/%.exe/}"
17354
17355    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17356    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17357  fi
17358
17359  else
17360    # We're on a posix platform. Hooray! :)
17361    # First separate the path from the arguments. This will split at the first
17362    # space.
17363    complete="$VS_ENV_CMD"
17364    path="${complete%% *}"
17365    tmp="$complete EOL"
17366    arguments="${tmp#* }"
17367
17368    # Cannot rely on the command "which" here since it doesn't always work.
17369    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17370    if test -z "$is_absolute_path"; then
17371      # Path to executable is not absolute. Find it.
17372      IFS_save="$IFS"
17373      IFS=:
17374      for p in $PATH; do
17375        if test -f "$p/$path" && test -x "$p/$path"; then
17376          new_path="$p/$path"
17377          break
17378        fi
17379      done
17380      IFS="$IFS_save"
17381    else
17382      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
17383$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
17384      new_path="$path"
17385    fi
17386
17387    if test "x$new_path" = x; then
17388      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17389$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17390      has_space=`$ECHO "$complete" | $GREP " "`
17391      if test "x$has_space" != x; then
17392        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17393$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17394      fi
17395      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17396    fi
17397  fi
17398
17399  # Now join together the path and the arguments once again
17400  if test "x$arguments" != xEOL; then
17401    new_complete="$new_path ${arguments% *}"
17402  else
17403    new_complete="$new_path"
17404  fi
17405
17406  if test "x$complete" != "x$new_complete"; then
17407    VS_ENV_CMD="$new_complete"
17408    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
17409$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
17410  fi
17411
17412
17413    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
17414    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
17415$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
17416    cd $OUTPUT_ROOT
17417    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
17418    # to autoconf standards.
17419
17420    #----
17421
17422    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
17423    # but calculate the difference in Cygwin environment before/after running it and then
17424    # apply the diff.
17425
17426    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
17427      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
17428      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
17429      _dosbash=`cygpath -a -w -s \`which bash\`.*`
17430    else
17431      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
17432      _dosbash=`cmd //c echo \`which bash\``
17433    fi
17434
17435    # generate the set of exported vars before/after the vs10 setup
17436    $ECHO "@echo off"                                           >  localdevenvtmp.bat
17437    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
17438    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
17439    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
17440
17441    # Now execute the newly created bat file.
17442    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
17443    cmd /c localdevenvtmp.bat | cat
17444
17445    # apply the diff (less some non-vs10 vars named by "!")
17446    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
17447    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
17448    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
17449
17450    # cleanup
17451    $RM localdevenvtmp*
17452    #----
17453    cd $CURDIR
17454    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
17455      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17456$as_echo "no" >&6; }
17457      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
17458$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
17459      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17460$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17461      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17462$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17463      as_fn_error $? "Cannot continue" "$LINENO" 5
17464    fi
17465
17466    # Now set all paths and other env variables. This will allow the rest of
17467    # the configure script to find and run the compiler in the proper way.
17468    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
17469$as_echo "$as_me: Setting extracted environment variables" >&6;}
17470    . $OUTPUT_ROOT/localdevenv.sh
17471  else
17472    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
17473    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
17474$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
17475  fi
17476
17477  # At this point, we should have corrent variables in the environment, or we can't continue.
17478  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
17479$as_echo_n "checking for Visual Studio variables... " >&6; }
17480
17481  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
17482    if test "x$INCLUDE" = x || test "x$LIB" = x; then
17483      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
17484$as_echo "present but broken" >&6; }
17485      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
17486    else
17487      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17488$as_echo "ok" >&6; }
17489      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
17490      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
17491      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
17492      # Remove any paths containing # (typically F#) as that messes up make
17493      PATH=`$ECHO "$PATH" | $SED 's/[^:#]*#[^:]*://g'`
17494      VS_PATH="$PATH"
17495
17496
17497
17498    fi
17499  else
17500    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17501$as_echo "not found" >&6; }
17502
17503    if test "x$VS_ENV_CMD" = x; then
17504      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
17505$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
17506      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
17507$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
17508    else
17509      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
17510$as_echo "$as_me: Running the extraction script failed." >&6;}
17511    fi
17512    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17513$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17514    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17515$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17516    as_fn_error $? "Cannot continue" "$LINENO" 5
17517  fi
17518
17519
17520
17521# Check whether --with-msvcr-dll was given.
17522if test "${with_msvcr_dll+set}" = set; then :
17523  withval=$with_msvcr_dll;
17524fi
17525
17526
17527  if test "x$with_msvcr_dll" != x; then
17528    # If given explicitely by user, do not probe. If not present, fail directly.
17529
17530  POSSIBLE_MSVCR_DLL="$with_msvcr_dll"
17531  METHOD="--with-msvcr-dll"
17532  if test -e "$POSSIBLE_MSVCR_DLL"; then
17533    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17534$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17535
17536    # Need to check if the found msvcr is correct architecture
17537    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17538$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17539    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17540    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17541      CORRECT_MSVCR_ARCH=386
17542    else
17543      CORRECT_MSVCR_ARCH=x86-64
17544    fi
17545    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17546      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17547$as_echo "ok" >&6; }
17548      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17549      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17550$as_echo_n "checking for msvcr100.dll... " >&6; }
17551      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17552$as_echo "$MSVCR_DLL" >&6; }
17553    else
17554      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17555$as_echo "incorrect, ignoring" >&6; }
17556      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17557$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17558    fi
17559  fi
17560
17561    if test "x$MSVCR_DLL" = x; then
17562      as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5
17563    fi
17564  fi
17565
17566  if test "x$MSVCR_DLL" = x; then
17567    # Probe: Using well-known location from Visual Studio 10.0
17568    if test "x$VCINSTALLDIR" != x; then
17569      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
17570
17571  windows_path="$CYGWIN_VC_INSTALL_DIR"
17572  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17573    unix_path=`$CYGPATH -u "$windows_path"`
17574    CYGWIN_VC_INSTALL_DIR="$unix_path"
17575  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17576    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17577    CYGWIN_VC_INSTALL_DIR="$unix_path"
17578  fi
17579
17580      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17581        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
17582      else
17583        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
17584      fi
17585
17586  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17587  METHOD="well-known location in VCINSTALLDIR"
17588  if test -e "$POSSIBLE_MSVCR_DLL"; then
17589    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17590$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17591
17592    # Need to check if the found msvcr is correct architecture
17593    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17594$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17595    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17596    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17597      CORRECT_MSVCR_ARCH=386
17598    else
17599      CORRECT_MSVCR_ARCH=x86-64
17600    fi
17601    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17602      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17603$as_echo "ok" >&6; }
17604      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17605      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17606$as_echo_n "checking for msvcr100.dll... " >&6; }
17607      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17608$as_echo "$MSVCR_DLL" >&6; }
17609    else
17610      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17611$as_echo "incorrect, ignoring" >&6; }
17612      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17613$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17614    fi
17615  fi
17616
17617    fi
17618  fi
17619
17620  if test "x$MSVCR_DLL" = x; then
17621    # Probe: Check in the Boot JDK directory.
17622    POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
17623
17624  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17625  METHOD="well-known location in Boot JDK"
17626  if test -e "$POSSIBLE_MSVCR_DLL"; then
17627    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17628$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17629
17630    # Need to check if the found msvcr is correct architecture
17631    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17632$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17633    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17634    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17635      CORRECT_MSVCR_ARCH=386
17636    else
17637      CORRECT_MSVCR_ARCH=x86-64
17638    fi
17639    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17640      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17641$as_echo "ok" >&6; }
17642      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17643      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17644$as_echo_n "checking for msvcr100.dll... " >&6; }
17645      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17646$as_echo "$MSVCR_DLL" >&6; }
17647    else
17648      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17649$as_echo "incorrect, ignoring" >&6; }
17650      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17651$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17652    fi
17653  fi
17654
17655  fi
17656
17657  if test "x$MSVCR_DLL" = x; then
17658    # Probe: Look in the Windows system32 directory
17659    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
17660
17661  windows_path="$CYGWIN_SYSTEMROOT"
17662  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17663    unix_path=`$CYGPATH -u "$windows_path"`
17664    CYGWIN_SYSTEMROOT="$unix_path"
17665  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17666    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17667    CYGWIN_SYSTEMROOT="$unix_path"
17668  fi
17669
17670    POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
17671
17672  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17673  METHOD="well-known location in SYSTEMROOT"
17674  if test -e "$POSSIBLE_MSVCR_DLL"; then
17675    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17676$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17677
17678    # Need to check if the found msvcr is correct architecture
17679    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17680$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17681    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17682    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17683      CORRECT_MSVCR_ARCH=386
17684    else
17685      CORRECT_MSVCR_ARCH=x86-64
17686    fi
17687    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17688      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17689$as_echo "ok" >&6; }
17690      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17691      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17692$as_echo_n "checking for msvcr100.dll... " >&6; }
17693      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17694$as_echo "$MSVCR_DLL" >&6; }
17695    else
17696      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17697$as_echo "incorrect, ignoring" >&6; }
17698      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17699$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17700    fi
17701  fi
17702
17703  fi
17704
17705  if test "x$MSVCR_DLL" = x; then
17706    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
17707    if test "x$VS100COMNTOOLS" != x; then
17708      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
17709
17710  windows_path="$CYGWIN_VS_TOOLS_DIR"
17711  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17712    unix_path=`$CYGPATH -u "$windows_path"`
17713    CYGWIN_VS_TOOLS_DIR="$unix_path"
17714  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17715    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17716    CYGWIN_VS_TOOLS_DIR="$unix_path"
17717  fi
17718
17719      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17720        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
17721      else
17722        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
17723      fi
17724
17725  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17726  METHOD="search of VS100COMNTOOLS"
17727  if test -e "$POSSIBLE_MSVCR_DLL"; then
17728    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17729$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17730
17731    # Need to check if the found msvcr is correct architecture
17732    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17733$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17734    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17735    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17736      CORRECT_MSVCR_ARCH=386
17737    else
17738      CORRECT_MSVCR_ARCH=x86-64
17739    fi
17740    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17741      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17742$as_echo "ok" >&6; }
17743      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17744      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17745$as_echo_n "checking for msvcr100.dll... " >&6; }
17746      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17747$as_echo "$MSVCR_DLL" >&6; }
17748    else
17749      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17750$as_echo "incorrect, ignoring" >&6; }
17751      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17752$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17753    fi
17754  fi
17755
17756    fi
17757  fi
17758
17759  if test "x$MSVCR_DLL" = x; then
17760    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
17761    # (This was the original behaviour; kept since it might turn up something)
17762    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
17763      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17764        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
17765      else
17766        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
17767        if test "x$POSSIBLE_MSVCR_DLL" = x; then
17768          # We're grasping at straws now...
17769          POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
17770        fi
17771      fi
17772
17773
17774  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17775  METHOD="search of VCINSTALLDIR"
17776  if test -e "$POSSIBLE_MSVCR_DLL"; then
17777    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17778$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17779
17780    # Need to check if the found msvcr is correct architecture
17781    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17782$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17783    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17784    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17785      CORRECT_MSVCR_ARCH=386
17786    else
17787      CORRECT_MSVCR_ARCH=x86-64
17788    fi
17789    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17790      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17791$as_echo "ok" >&6; }
17792      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17793      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17794$as_echo_n "checking for msvcr100.dll... " >&6; }
17795      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17796$as_echo "$MSVCR_DLL" >&6; }
17797    else
17798      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17799$as_echo "incorrect, ignoring" >&6; }
17800      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17801$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17802    fi
17803  fi
17804
17805    fi
17806  fi
17807
17808  if test "x$MSVCR_DLL" = x; then
17809    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17810$as_echo_n "checking for msvcr100.dll... " >&6; }
17811    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17812$as_echo "no" >&6; }
17813    as_fn_error $? "Could not find msvcr100.dll. Please specify using --with-msvcr-dll." "$LINENO" 5
17814  fi
17815
17816
17817  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17818
17819  # Input might be given as Windows format, start by converting to
17820  # unix format.
17821  path="$MSVCR_DLL"
17822  new_path=`$CYGPATH -u "$path"`
17823
17824  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17825  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17826  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17827  # "foo.exe" is OK but "foo" is an error.
17828  #
17829  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17830  # It is also a way to make sure we got the proper file name for the real test later on.
17831  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17832  if test "x$test_shortpath" = x; then
17833    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17834$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17835    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
17836  fi
17837
17838  # Call helper function which possibly converts this using DOS-style short mode.
17839  # If so, the updated path is stored in $new_path.
17840
17841  input_path="$new_path"
17842  # Check if we need to convert this using DOS-style short mode. If the path
17843  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17844  # take no chances and rewrite it.
17845  # Note: m4 eats our [], so we need to use [ and ] instead.
17846  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17847  if test "x$has_forbidden_chars" != x; then
17848    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17849    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17850    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17851    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17852      # Going to short mode and back again did indeed matter. Since short mode is
17853      # case insensitive, let's make it lowercase to improve readability.
17854      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17855      # Now convert it back to Unix-stile (cygpath)
17856      input_path=`$CYGPATH -u "$shortmode_path"`
17857      new_path="$input_path"
17858    fi
17859  fi
17860
17861  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17862  if test "x$test_cygdrive_prefix" = x; then
17863    # As a simple fix, exclude /usr/bin since it's not a real path.
17864    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17865      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17866      # a path prefixed by /cygdrive for fixpath to work.
17867      new_path="$CYGWIN_ROOT_PATH$input_path"
17868    fi
17869  fi
17870
17871
17872  if test "x$path" != "x$new_path"; then
17873    MSVCR_DLL="$new_path"
17874    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17875$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17876  fi
17877
17878  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17879
17880  path="$MSVCR_DLL"
17881  has_colon=`$ECHO $path | $GREP ^.:`
17882  new_path="$path"
17883  if test "x$has_colon" = x; then
17884    # Not in mixed or Windows style, start by that.
17885    new_path=`cmd //c echo $path`
17886  fi
17887
17888
17889  input_path="$new_path"
17890  # Check if we need to convert this using DOS-style short mode. If the path
17891  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17892  # take no chances and rewrite it.
17893  # Note: m4 eats our [], so we need to use [ and ] instead.
17894  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17895  if test "x$has_forbidden_chars" != x; then
17896    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17897    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17898  fi
17899
17900
17901  windows_path="$new_path"
17902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17903    unix_path=`$CYGPATH -u "$windows_path"`
17904    new_path="$unix_path"
17905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17906    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17907    new_path="$unix_path"
17908  fi
17909
17910  if test "x$path" != "x$new_path"; then
17911    MSVCR_DLL="$new_path"
17912    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17913$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17914  fi
17915
17916  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17917  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17918
17919  else
17920    # We're on a posix platform. Hooray! :)
17921    path="$MSVCR_DLL"
17922    has_space=`$ECHO "$path" | $GREP " "`
17923    if test "x$has_space" != x; then
17924      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17925$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17926      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17927    fi
17928
17929    # Use eval to expand a potential ~
17930    eval path="$path"
17931    if test ! -f "$path" && test ! -d "$path"; then
17932      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
17933    fi
17934
17935    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
17936  fi
17937
17938
17939
17940
17941# Check whether --with-dxsdk was given.
17942if test "${with_dxsdk+set}" = set; then :
17943  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
17944$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
17945fi
17946
17947
17948
17949
17950# Check whether --with-dxsdk-lib was given.
17951if test "${with_dxsdk_lib+set}" = set; then :
17952  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
17953$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
17954fi
17955
17956
17957
17958
17959# Check whether --with-dxsdk-include was given.
17960if test "${with_dxsdk_include+set}" = set; then :
17961  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
17962$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
17963fi
17964
17965
17966  fi
17967
17968
17969
17970  # If --build AND --host is set, then the configure script will find any
17971  # cross compilation tools in the PATH. Cross compilation tools
17972  # follows the cross compilation standard where they are prefixed with ${host}.
17973  # For example the binary i686-sun-solaris2.10-gcc
17974  # will cross compile for i686-sun-solaris2.10
17975  # If neither of build and host is not set, then build=host and the
17976  # default compiler found in the path will be used.
17977  # Setting only --host, does not seem to be really supported.
17978  # Please set both --build and --host if you want to cross compile.
17979
17980  if test "x$COMPILE_TYPE" = "xcross"; then
17981    # Now we to find a C/C++ compiler that can build executables for the build
17982    # platform. We can't use the AC_PROG_CC macro, since it can only be used
17983    # once. Also, we need to do this before adding a tools dir to the path,
17984    # otherwise we might pick up cross-compilers which don't use standard naming.
17985    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
17986    # to wait until they are properly discovered.
17987    for ac_prog in cl cc gcc
17988do
17989  # Extract the first word of "$ac_prog", so it can be a program name with args.
17990set dummy $ac_prog; ac_word=$2
17991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17992$as_echo_n "checking for $ac_word... " >&6; }
17993if ${ac_cv_path_BUILD_CC+:} false; then :
17994  $as_echo_n "(cached) " >&6
17995else
17996  case $BUILD_CC in
17997  [\\/]* | ?:[\\/]*)
17998  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
17999  ;;
18000  *)
18001  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18002for as_dir in $PATH
18003do
18004  IFS=$as_save_IFS
18005  test -z "$as_dir" && as_dir=.
18006    for ac_exec_ext in '' $ac_executable_extensions; do
18007  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18008    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
18009    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18010    break 2
18011  fi
18012done
18013  done
18014IFS=$as_save_IFS
18015
18016  ;;
18017esac
18018fi
18019BUILD_CC=$ac_cv_path_BUILD_CC
18020if test -n "$BUILD_CC"; then
18021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
18022$as_echo "$BUILD_CC" >&6; }
18023else
18024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18025$as_echo "no" >&6; }
18026fi
18027
18028
18029  test -n "$BUILD_CC" && break
18030done
18031
18032
18033  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18034
18035  # First separate the path from the arguments. This will split at the first
18036  # space.
18037  complete="$BUILD_CC"
18038  path="${complete%% *}"
18039  tmp="$complete EOL"
18040  arguments="${tmp#* }"
18041
18042  # Input might be given as Windows format, start by converting to
18043  # unix format.
18044  new_path=`$CYGPATH -u "$path"`
18045
18046  # Now try to locate executable using which
18047  new_path=`$WHICH "$new_path" 2> /dev/null`
18048  # bat and cmd files are not always considered executable in cygwin causing which
18049  # to not find them
18050  if test "x$new_path" = x \
18051      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18052      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18053    new_path=`$CYGPATH -u "$path"`
18054  fi
18055  if test "x$new_path" = x; then
18056    # Oops. Which didn't find the executable.
18057    # The splitting of arguments from the executable at a space might have been incorrect,
18058    # since paths with space are more likely in Windows. Give it another try with the whole
18059    # argument.
18060    path="$complete"
18061    arguments="EOL"
18062    new_path=`$CYGPATH -u "$path"`
18063    new_path=`$WHICH "$new_path" 2> /dev/null`
18064    # bat and cmd files are not always considered executable in cygwin causing which
18065    # to not find them
18066    if test "x$new_path" = x \
18067        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18068        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18069      new_path=`$CYGPATH -u "$path"`
18070    fi
18071    if test "x$new_path" = x; then
18072      # It's still not found. Now this is an unrecoverable error.
18073      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18074$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18075      has_space=`$ECHO "$complete" | $GREP " "`
18076      if test "x$has_space" != x; then
18077        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18078$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18079      fi
18080      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18081    fi
18082  fi
18083
18084  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18085  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18086  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18087  # "foo.exe" is OK but "foo" is an error.
18088  #
18089  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18090  # It is also a way to make sure we got the proper file name for the real test later on.
18091  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18092  if test "x$test_shortpath" = x; then
18093    # Short path failed, file does not exist as specified.
18094    # Try adding .exe or .cmd
18095    if test -f "${new_path}.exe"; then
18096      input_to_shortpath="${new_path}.exe"
18097    elif test -f "${new_path}.cmd"; then
18098      input_to_shortpath="${new_path}.cmd"
18099    else
18100      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
18101$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
18102      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18103$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18104      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18105    fi
18106  else
18107    input_to_shortpath="$new_path"
18108  fi
18109
18110  # Call helper function which possibly converts this using DOS-style short mode.
18111  # If so, the updated path is stored in $new_path.
18112  new_path="$input_to_shortpath"
18113
18114  input_path="$input_to_shortpath"
18115  # Check if we need to convert this using DOS-style short mode. If the path
18116  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18117  # take no chances and rewrite it.
18118  # Note: m4 eats our [], so we need to use [ and ] instead.
18119  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18120  if test "x$has_forbidden_chars" != x; then
18121    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18122    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18123    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18124    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18125      # Going to short mode and back again did indeed matter. Since short mode is
18126      # case insensitive, let's make it lowercase to improve readability.
18127      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18128      # Now convert it back to Unix-stile (cygpath)
18129      input_path=`$CYGPATH -u "$shortmode_path"`
18130      new_path="$input_path"
18131    fi
18132  fi
18133
18134  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18135  if test "x$test_cygdrive_prefix" = x; then
18136    # As a simple fix, exclude /usr/bin since it's not a real path.
18137    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18138      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18139      # a path prefixed by /cygdrive for fixpath to work.
18140      new_path="$CYGWIN_ROOT_PATH$input_path"
18141    fi
18142  fi
18143
18144  # remove trailing .exe if any
18145  new_path="${new_path/%.exe/}"
18146
18147  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18148
18149  # First separate the path from the arguments. This will split at the first
18150  # space.
18151  complete="$BUILD_CC"
18152  path="${complete%% *}"
18153  tmp="$complete EOL"
18154  arguments="${tmp#* }"
18155
18156  # Input might be given as Windows format, start by converting to
18157  # unix format.
18158  new_path="$path"
18159
18160  windows_path="$new_path"
18161  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18162    unix_path=`$CYGPATH -u "$windows_path"`
18163    new_path="$unix_path"
18164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18165    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18166    new_path="$unix_path"
18167  fi
18168
18169
18170  # Now try to locate executable using which
18171  new_path=`$WHICH "$new_path" 2> /dev/null`
18172
18173  if test "x$new_path" = x; then
18174    # Oops. Which didn't find the executable.
18175    # The splitting of arguments from the executable at a space might have been incorrect,
18176    # since paths with space are more likely in Windows. Give it another try with the whole
18177    # argument.
18178    path="$complete"
18179    arguments="EOL"
18180    new_path="$path"
18181
18182  windows_path="$new_path"
18183  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18184    unix_path=`$CYGPATH -u "$windows_path"`
18185    new_path="$unix_path"
18186  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18187    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18188    new_path="$unix_path"
18189  fi
18190
18191
18192    new_path=`$WHICH "$new_path" 2> /dev/null`
18193
18194    if test "x$new_path" = x; then
18195      # It's still not found. Now this is an unrecoverable error.
18196      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18197$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18198      has_space=`$ECHO "$complete" | $GREP " "`
18199      if test "x$has_space" != x; then
18200        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18201$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18202      fi
18203      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18204    fi
18205  fi
18206
18207  # Now new_path has a complete unix path to the binary
18208  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18209    # Keep paths in /bin as-is, but remove trailing .exe if any
18210    new_path="${new_path/%.exe/}"
18211    # Do not save /bin paths to all_fixpath_prefixes!
18212  else
18213    # Not in mixed or Windows style, start by that.
18214    new_path=`cmd //c echo $new_path`
18215
18216  input_path="$new_path"
18217  # Check if we need to convert this using DOS-style short mode. If the path
18218  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18219  # take no chances and rewrite it.
18220  # Note: m4 eats our [], so we need to use [ and ] instead.
18221  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18222  if test "x$has_forbidden_chars" != x; then
18223    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18224    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18225  fi
18226
18227    # Output is in $new_path
18228
18229  windows_path="$new_path"
18230  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18231    unix_path=`$CYGPATH -u "$windows_path"`
18232    new_path="$unix_path"
18233  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18234    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18235    new_path="$unix_path"
18236  fi
18237
18238    # remove trailing .exe if any
18239    new_path="${new_path/%.exe/}"
18240
18241    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18242    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18243  fi
18244
18245  else
18246    # We're on a posix platform. Hooray! :)
18247    # First separate the path from the arguments. This will split at the first
18248    # space.
18249    complete="$BUILD_CC"
18250    path="${complete%% *}"
18251    tmp="$complete EOL"
18252    arguments="${tmp#* }"
18253
18254    # Cannot rely on the command "which" here since it doesn't always work.
18255    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18256    if test -z "$is_absolute_path"; then
18257      # Path to executable is not absolute. Find it.
18258      IFS_save="$IFS"
18259      IFS=:
18260      for p in $PATH; do
18261        if test -f "$p/$path" && test -x "$p/$path"; then
18262          new_path="$p/$path"
18263          break
18264        fi
18265      done
18266      IFS="$IFS_save"
18267    else
18268      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
18269$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
18270      new_path="$path"
18271    fi
18272
18273    if test "x$new_path" = x; then
18274      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18275$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18276      has_space=`$ECHO "$complete" | $GREP " "`
18277      if test "x$has_space" != x; then
18278        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18279$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18280      fi
18281      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18282    fi
18283  fi
18284
18285  # Now join together the path and the arguments once again
18286  if test "x$arguments" != xEOL; then
18287    new_complete="$new_path ${arguments% *}"
18288  else
18289    new_complete="$new_path"
18290  fi
18291
18292  if test "x$complete" != "x$new_complete"; then
18293    BUILD_CC="$new_complete"
18294    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
18295$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
18296  fi
18297
18298    for ac_prog in cl CC g++
18299do
18300  # Extract the first word of "$ac_prog", so it can be a program name with args.
18301set dummy $ac_prog; ac_word=$2
18302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18303$as_echo_n "checking for $ac_word... " >&6; }
18304if ${ac_cv_path_BUILD_CXX+:} false; then :
18305  $as_echo_n "(cached) " >&6
18306else
18307  case $BUILD_CXX in
18308  [\\/]* | ?:[\\/]*)
18309  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
18310  ;;
18311  *)
18312  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18313for as_dir in $PATH
18314do
18315  IFS=$as_save_IFS
18316  test -z "$as_dir" && as_dir=.
18317    for ac_exec_ext in '' $ac_executable_extensions; do
18318  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18319    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
18320    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18321    break 2
18322  fi
18323done
18324  done
18325IFS=$as_save_IFS
18326
18327  ;;
18328esac
18329fi
18330BUILD_CXX=$ac_cv_path_BUILD_CXX
18331if test -n "$BUILD_CXX"; then
18332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
18333$as_echo "$BUILD_CXX" >&6; }
18334else
18335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18336$as_echo "no" >&6; }
18337fi
18338
18339
18340  test -n "$BUILD_CXX" && break
18341done
18342
18343
18344  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18345
18346  # First separate the path from the arguments. This will split at the first
18347  # space.
18348  complete="$BUILD_CXX"
18349  path="${complete%% *}"
18350  tmp="$complete EOL"
18351  arguments="${tmp#* }"
18352
18353  # Input might be given as Windows format, start by converting to
18354  # unix format.
18355  new_path=`$CYGPATH -u "$path"`
18356
18357  # Now try to locate executable using which
18358  new_path=`$WHICH "$new_path" 2> /dev/null`
18359  # bat and cmd files are not always considered executable in cygwin causing which
18360  # to not find them
18361  if test "x$new_path" = x \
18362      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18363      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18364    new_path=`$CYGPATH -u "$path"`
18365  fi
18366  if test "x$new_path" = x; then
18367    # Oops. Which didn't find the executable.
18368    # The splitting of arguments from the executable at a space might have been incorrect,
18369    # since paths with space are more likely in Windows. Give it another try with the whole
18370    # argument.
18371    path="$complete"
18372    arguments="EOL"
18373    new_path=`$CYGPATH -u "$path"`
18374    new_path=`$WHICH "$new_path" 2> /dev/null`
18375    # bat and cmd files are not always considered executable in cygwin causing which
18376    # to not find them
18377    if test "x$new_path" = x \
18378        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18379        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18380      new_path=`$CYGPATH -u "$path"`
18381    fi
18382    if test "x$new_path" = x; then
18383      # It's still not found. Now this is an unrecoverable error.
18384      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18385$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18386      has_space=`$ECHO "$complete" | $GREP " "`
18387      if test "x$has_space" != x; then
18388        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18389$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18390      fi
18391      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18392    fi
18393  fi
18394
18395  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18396  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18397  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18398  # "foo.exe" is OK but "foo" is an error.
18399  #
18400  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18401  # It is also a way to make sure we got the proper file name for the real test later on.
18402  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18403  if test "x$test_shortpath" = x; then
18404    # Short path failed, file does not exist as specified.
18405    # Try adding .exe or .cmd
18406    if test -f "${new_path}.exe"; then
18407      input_to_shortpath="${new_path}.exe"
18408    elif test -f "${new_path}.cmd"; then
18409      input_to_shortpath="${new_path}.cmd"
18410    else
18411      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
18412$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
18413      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18414$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18415      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18416    fi
18417  else
18418    input_to_shortpath="$new_path"
18419  fi
18420
18421  # Call helper function which possibly converts this using DOS-style short mode.
18422  # If so, the updated path is stored in $new_path.
18423  new_path="$input_to_shortpath"
18424
18425  input_path="$input_to_shortpath"
18426  # Check if we need to convert this using DOS-style short mode. If the path
18427  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18428  # take no chances and rewrite it.
18429  # Note: m4 eats our [], so we need to use [ and ] instead.
18430  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18431  if test "x$has_forbidden_chars" != x; then
18432    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18433    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18434    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18435    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18436      # Going to short mode and back again did indeed matter. Since short mode is
18437      # case insensitive, let's make it lowercase to improve readability.
18438      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18439      # Now convert it back to Unix-stile (cygpath)
18440      input_path=`$CYGPATH -u "$shortmode_path"`
18441      new_path="$input_path"
18442    fi
18443  fi
18444
18445  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18446  if test "x$test_cygdrive_prefix" = x; then
18447    # As a simple fix, exclude /usr/bin since it's not a real path.
18448    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18449      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18450      # a path prefixed by /cygdrive for fixpath to work.
18451      new_path="$CYGWIN_ROOT_PATH$input_path"
18452    fi
18453  fi
18454
18455  # remove trailing .exe if any
18456  new_path="${new_path/%.exe/}"
18457
18458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18459
18460  # First separate the path from the arguments. This will split at the first
18461  # space.
18462  complete="$BUILD_CXX"
18463  path="${complete%% *}"
18464  tmp="$complete EOL"
18465  arguments="${tmp#* }"
18466
18467  # Input might be given as Windows format, start by converting to
18468  # unix format.
18469  new_path="$path"
18470
18471  windows_path="$new_path"
18472  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18473    unix_path=`$CYGPATH -u "$windows_path"`
18474    new_path="$unix_path"
18475  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18476    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18477    new_path="$unix_path"
18478  fi
18479
18480
18481  # Now try to locate executable using which
18482  new_path=`$WHICH "$new_path" 2> /dev/null`
18483
18484  if test "x$new_path" = x; then
18485    # Oops. Which didn't find the executable.
18486    # The splitting of arguments from the executable at a space might have been incorrect,
18487    # since paths with space are more likely in Windows. Give it another try with the whole
18488    # argument.
18489    path="$complete"
18490    arguments="EOL"
18491    new_path="$path"
18492
18493  windows_path="$new_path"
18494  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18495    unix_path=`$CYGPATH -u "$windows_path"`
18496    new_path="$unix_path"
18497  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18498    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18499    new_path="$unix_path"
18500  fi
18501
18502
18503    new_path=`$WHICH "$new_path" 2> /dev/null`
18504
18505    if test "x$new_path" = x; then
18506      # It's still not found. Now this is an unrecoverable error.
18507      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18508$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18509      has_space=`$ECHO "$complete" | $GREP " "`
18510      if test "x$has_space" != x; then
18511        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18512$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18513      fi
18514      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18515    fi
18516  fi
18517
18518  # Now new_path has a complete unix path to the binary
18519  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18520    # Keep paths in /bin as-is, but remove trailing .exe if any
18521    new_path="${new_path/%.exe/}"
18522    # Do not save /bin paths to all_fixpath_prefixes!
18523  else
18524    # Not in mixed or Windows style, start by that.
18525    new_path=`cmd //c echo $new_path`
18526
18527  input_path="$new_path"
18528  # Check if we need to convert this using DOS-style short mode. If the path
18529  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18530  # take no chances and rewrite it.
18531  # Note: m4 eats our [], so we need to use [ and ] instead.
18532  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18533  if test "x$has_forbidden_chars" != x; then
18534    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18535    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18536  fi
18537
18538    # Output is in $new_path
18539
18540  windows_path="$new_path"
18541  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18542    unix_path=`$CYGPATH -u "$windows_path"`
18543    new_path="$unix_path"
18544  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18545    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18546    new_path="$unix_path"
18547  fi
18548
18549    # remove trailing .exe if any
18550    new_path="${new_path/%.exe/}"
18551
18552    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18553    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18554  fi
18555
18556  else
18557    # We're on a posix platform. Hooray! :)
18558    # First separate the path from the arguments. This will split at the first
18559    # space.
18560    complete="$BUILD_CXX"
18561    path="${complete%% *}"
18562    tmp="$complete EOL"
18563    arguments="${tmp#* }"
18564
18565    # Cannot rely on the command "which" here since it doesn't always work.
18566    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18567    if test -z "$is_absolute_path"; then
18568      # Path to executable is not absolute. Find it.
18569      IFS_save="$IFS"
18570      IFS=:
18571      for p in $PATH; do
18572        if test -f "$p/$path" && test -x "$p/$path"; then
18573          new_path="$p/$path"
18574          break
18575        fi
18576      done
18577      IFS="$IFS_save"
18578    else
18579      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18580$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18581      new_path="$path"
18582    fi
18583
18584    if test "x$new_path" = x; then
18585      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18586$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18587      has_space=`$ECHO "$complete" | $GREP " "`
18588      if test "x$has_space" != x; then
18589        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18590$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18591      fi
18592      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18593    fi
18594  fi
18595
18596  # Now join together the path and the arguments once again
18597  if test "x$arguments" != xEOL; then
18598    new_complete="$new_path ${arguments% *}"
18599  else
18600    new_complete="$new_path"
18601  fi
18602
18603  if test "x$complete" != "x$new_complete"; then
18604    BUILD_CXX="$new_complete"
18605    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18606$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18607  fi
18608
18609    # Extract the first word of "ld", so it can be a program name with args.
18610set dummy ld; ac_word=$2
18611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18612$as_echo_n "checking for $ac_word... " >&6; }
18613if ${ac_cv_path_BUILD_LD+:} false; then :
18614  $as_echo_n "(cached) " >&6
18615else
18616  case $BUILD_LD in
18617  [\\/]* | ?:[\\/]*)
18618  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18619  ;;
18620  *)
18621  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18622for as_dir in $PATH
18623do
18624  IFS=$as_save_IFS
18625  test -z "$as_dir" && as_dir=.
18626    for ac_exec_ext in '' $ac_executable_extensions; do
18627  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18628    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18629    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18630    break 2
18631  fi
18632done
18633  done
18634IFS=$as_save_IFS
18635
18636  ;;
18637esac
18638fi
18639BUILD_LD=$ac_cv_path_BUILD_LD
18640if test -n "$BUILD_LD"; then
18641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18642$as_echo "$BUILD_LD" >&6; }
18643else
18644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18645$as_echo "no" >&6; }
18646fi
18647
18648
18649
18650  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18651
18652  # First separate the path from the arguments. This will split at the first
18653  # space.
18654  complete="$BUILD_LD"
18655  path="${complete%% *}"
18656  tmp="$complete EOL"
18657  arguments="${tmp#* }"
18658
18659  # Input might be given as Windows format, start by converting to
18660  # unix format.
18661  new_path=`$CYGPATH -u "$path"`
18662
18663  # Now try to locate executable using which
18664  new_path=`$WHICH "$new_path" 2> /dev/null`
18665  # bat and cmd files are not always considered executable in cygwin causing which
18666  # to not find them
18667  if test "x$new_path" = x \
18668      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18669      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18670    new_path=`$CYGPATH -u "$path"`
18671  fi
18672  if test "x$new_path" = x; then
18673    # Oops. Which didn't find the executable.
18674    # The splitting of arguments from the executable at a space might have been incorrect,
18675    # since paths with space are more likely in Windows. Give it another try with the whole
18676    # argument.
18677    path="$complete"
18678    arguments="EOL"
18679    new_path=`$CYGPATH -u "$path"`
18680    new_path=`$WHICH "$new_path" 2> /dev/null`
18681    # bat and cmd files are not always considered executable in cygwin causing which
18682    # to not find them
18683    if test "x$new_path" = x \
18684        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18685        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18686      new_path=`$CYGPATH -u "$path"`
18687    fi
18688    if test "x$new_path" = x; then
18689      # It's still not found. Now this is an unrecoverable error.
18690      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18691$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18692      has_space=`$ECHO "$complete" | $GREP " "`
18693      if test "x$has_space" != x; then
18694        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18695$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18696      fi
18697      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18698    fi
18699  fi
18700
18701  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18702  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18703  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18704  # "foo.exe" is OK but "foo" is an error.
18705  #
18706  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18707  # It is also a way to make sure we got the proper file name for the real test later on.
18708  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18709  if test "x$test_shortpath" = x; then
18710    # Short path failed, file does not exist as specified.
18711    # Try adding .exe or .cmd
18712    if test -f "${new_path}.exe"; then
18713      input_to_shortpath="${new_path}.exe"
18714    elif test -f "${new_path}.cmd"; then
18715      input_to_shortpath="${new_path}.cmd"
18716    else
18717      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18718$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18719      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18720$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18721      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18722    fi
18723  else
18724    input_to_shortpath="$new_path"
18725  fi
18726
18727  # Call helper function which possibly converts this using DOS-style short mode.
18728  # If so, the updated path is stored in $new_path.
18729  new_path="$input_to_shortpath"
18730
18731  input_path="$input_to_shortpath"
18732  # Check if we need to convert this using DOS-style short mode. If the path
18733  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18734  # take no chances and rewrite it.
18735  # Note: m4 eats our [], so we need to use [ and ] instead.
18736  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18737  if test "x$has_forbidden_chars" != x; then
18738    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18739    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18740    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18741    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18742      # Going to short mode and back again did indeed matter. Since short mode is
18743      # case insensitive, let's make it lowercase to improve readability.
18744      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18745      # Now convert it back to Unix-stile (cygpath)
18746      input_path=`$CYGPATH -u "$shortmode_path"`
18747      new_path="$input_path"
18748    fi
18749  fi
18750
18751  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18752  if test "x$test_cygdrive_prefix" = x; then
18753    # As a simple fix, exclude /usr/bin since it's not a real path.
18754    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18755      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18756      # a path prefixed by /cygdrive for fixpath to work.
18757      new_path="$CYGWIN_ROOT_PATH$input_path"
18758    fi
18759  fi
18760
18761  # remove trailing .exe if any
18762  new_path="${new_path/%.exe/}"
18763
18764  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18765
18766  # First separate the path from the arguments. This will split at the first
18767  # space.
18768  complete="$BUILD_LD"
18769  path="${complete%% *}"
18770  tmp="$complete EOL"
18771  arguments="${tmp#* }"
18772
18773  # Input might be given as Windows format, start by converting to
18774  # unix format.
18775  new_path="$path"
18776
18777  windows_path="$new_path"
18778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18779    unix_path=`$CYGPATH -u "$windows_path"`
18780    new_path="$unix_path"
18781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18782    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18783    new_path="$unix_path"
18784  fi
18785
18786
18787  # Now try to locate executable using which
18788  new_path=`$WHICH "$new_path" 2> /dev/null`
18789
18790  if test "x$new_path" = x; then
18791    # Oops. Which didn't find the executable.
18792    # The splitting of arguments from the executable at a space might have been incorrect,
18793    # since paths with space are more likely in Windows. Give it another try with the whole
18794    # argument.
18795    path="$complete"
18796    arguments="EOL"
18797    new_path="$path"
18798
18799  windows_path="$new_path"
18800  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18801    unix_path=`$CYGPATH -u "$windows_path"`
18802    new_path="$unix_path"
18803  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18804    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18805    new_path="$unix_path"
18806  fi
18807
18808
18809    new_path=`$WHICH "$new_path" 2> /dev/null`
18810
18811    if test "x$new_path" = x; then
18812      # It's still not found. Now this is an unrecoverable error.
18813      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18814$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18815      has_space=`$ECHO "$complete" | $GREP " "`
18816      if test "x$has_space" != x; then
18817        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18818$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18819      fi
18820      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18821    fi
18822  fi
18823
18824  # Now new_path has a complete unix path to the binary
18825  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18826    # Keep paths in /bin as-is, but remove trailing .exe if any
18827    new_path="${new_path/%.exe/}"
18828    # Do not save /bin paths to all_fixpath_prefixes!
18829  else
18830    # Not in mixed or Windows style, start by that.
18831    new_path=`cmd //c echo $new_path`
18832
18833  input_path="$new_path"
18834  # Check if we need to convert this using DOS-style short mode. If the path
18835  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18836  # take no chances and rewrite it.
18837  # Note: m4 eats our [], so we need to use [ and ] instead.
18838  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18839  if test "x$has_forbidden_chars" != x; then
18840    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18841    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18842  fi
18843
18844    # Output is in $new_path
18845
18846  windows_path="$new_path"
18847  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18848    unix_path=`$CYGPATH -u "$windows_path"`
18849    new_path="$unix_path"
18850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18851    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18852    new_path="$unix_path"
18853  fi
18854
18855    # remove trailing .exe if any
18856    new_path="${new_path/%.exe/}"
18857
18858    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18859    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18860  fi
18861
18862  else
18863    # We're on a posix platform. Hooray! :)
18864    # First separate the path from the arguments. This will split at the first
18865    # space.
18866    complete="$BUILD_LD"
18867    path="${complete%% *}"
18868    tmp="$complete EOL"
18869    arguments="${tmp#* }"
18870
18871    # Cannot rely on the command "which" here since it doesn't always work.
18872    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18873    if test -z "$is_absolute_path"; then
18874      # Path to executable is not absolute. Find it.
18875      IFS_save="$IFS"
18876      IFS=:
18877      for p in $PATH; do
18878        if test -f "$p/$path" && test -x "$p/$path"; then
18879          new_path="$p/$path"
18880          break
18881        fi
18882      done
18883      IFS="$IFS_save"
18884    else
18885      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
18886$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
18887      new_path="$path"
18888    fi
18889
18890    if test "x$new_path" = x; then
18891      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18892$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18893      has_space=`$ECHO "$complete" | $GREP " "`
18894      if test "x$has_space" != x; then
18895        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18896$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18897      fi
18898      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18899    fi
18900  fi
18901
18902  # Now join together the path and the arguments once again
18903  if test "x$arguments" != xEOL; then
18904    new_complete="$new_path ${arguments% *}"
18905  else
18906    new_complete="$new_path"
18907  fi
18908
18909  if test "x$complete" != "x$new_complete"; then
18910    BUILD_LD="$new_complete"
18911    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
18912$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
18913  fi
18914
18915  fi
18916
18917
18918
18919
18920  # If a devkit is found on the builddeps server, then prepend its path to the
18921  # PATH variable. If there are cross compilers available in the devkit, these
18922  # will be found by AC_PROG_CC et al.
18923  DEVKIT=
18924
18925
18926  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
18927    # Source the builddeps file again, to make sure it uses the latest variables!
18928    . $builddepsfile
18929    # Look for a target and build machine specific resource!
18930    eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
18931    if test "x$resource" = x; then
18932      # Ok, lets instead look for a target specific resource
18933      eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
18934    fi
18935    if test "x$resource" = x; then
18936      # Ok, lets instead look for a build specific resource
18937      eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
18938    fi
18939    if test "x$resource" = x; then
18940      # Ok, lets instead look for a generic resource
18941      # (The devkit comes from M4 and not the shell, thus no need for eval here.)
18942      resource=${builddep_devkit}
18943    fi
18944    if test "x$resource" != x; then
18945      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
18946$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
18947      # If the resource in the builddeps.conf file is an existing directory,
18948      # for example /java/linux/cups
18949      if test -d ${resource}; then
18950        depdir=${resource}
18951      else
18952
18953  # devkit is for example mymodule
18954  # $resource is for example libs/general/libmymod_1_2_3.zip
18955  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
18956  # $with_builddeps_dir is for example /localhome/builddeps
18957  # depdir is the name of the variable into which we store the depdir, eg MYMOD
18958  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
18959  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
18960  filename=`basename $resource`
18961  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
18962  filebase=${filename%%.*}
18963  extension=${filename#*.}
18964  installdir=$with_builddeps_dir/$filebase
18965  if test ! -f $installdir/$filename.unpacked; then
18966    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
18967$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
18968    if test ! -d $installdir; then
18969      mkdir -p $installdir
18970    fi
18971    if test ! -d $installdir; then
18972      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
18973    fi
18974    tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
18975    touch $tmpfile
18976    if test ! -f $tmpfile; then
18977      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
18978    fi
18979
18980  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
18981  # $tmpfile is the local file name for the downloaded file.
18982  VALID_TOOL=no
18983  if test "x$BDEPS_FTP" = xwget; then
18984    VALID_TOOL=yes
18985    wget -O $tmpfile $with_builddeps_server/$resource
18986  fi
18987  if test "x$BDEPS_FTP" = xlftp; then
18988    VALID_TOOL=yes
18989    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
18990  fi
18991  if test "x$BDEPS_FTP" = xftp; then
18992    VALID_TOOL=yes
18993    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
18994    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
18995    FTPUSERPWD=${FTPSERVER%%@*}
18996    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
18997      FTPUSER=${userpwd%%:*}
18998      FTPPWD=${userpwd#*@}
18999      FTPSERVER=${FTPSERVER#*@}
19000    else
19001      FTPUSER=ftp
19002      FTPPWD=ftp
19003    fi
19004    # the "pass" command does not work on some
19005    # ftp clients (read ftp.exe) but if it works,
19006    # passive mode is better!
19007    ( \
19008        echo "user $FTPUSER $FTPPWD"        ; \
19009        echo "pass"                         ; \
19010        echo "bin"                          ; \
19011        echo "get $FTPPATH $tmpfile"              ; \
19012    ) | ftp -in $FTPSERVER
19013  fi
19014  if test "x$VALID_TOOL" != xyes; then
19015    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
19016  fi
19017
19018    mv $tmpfile $installdir/$filename
19019    if test ! -s $installdir/$filename; then
19020      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
19021    fi
19022    case "$extension" in
19023      zip)  echo "Unzipping $installdir/$filename..."
19024        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
19025        ;;
19026      tar.gz) echo "Untaring $installdir/$filename..."
19027        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19028        ;;
19029      tgz) echo "Untaring $installdir/$filename..."
19030        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19031        ;;
19032      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
19033        ;;
19034    esac
19035  fi
19036  if test -f $installdir/$filename.unpacked; then
19037    depdir=$installdir
19038  fi
19039
19040      fi
19041      # Source the builddeps file again, because in the previous command, the depdir
19042      # was updated to point at the current build dependency install directory.
19043      . $builddepsfile
19044      # Now extract variables from the builddeps.conf files.
19045      theroot=${builddep_devkit_ROOT}
19046      thecflags=${builddep_devkit_CFLAGS}
19047      thelibs=${builddep_devkit_LIBS}
19048      if test "x$depdir" = x; then
19049        as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
19050      fi
19051      DEVKIT=$depdir
19052      if test "x$theroot" != x; then
19053        DEVKIT="$theroot"
19054      fi
19055      if test "x$thecflags" != x; then
19056        DEVKIT_CFLAGS="$thecflags"
19057      fi
19058      if test "x$thelibs" != x; then
19059        DEVKIT_LIBS="$thelibs"
19060      fi
19061
19062        # Found devkit
19063        PATH="$DEVKIT/bin:$PATH"
19064        SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
19065        if test "x$x_includes" = "xNONE"; then
19066          x_includes="$SYS_ROOT/usr/include/X11"
19067        fi
19068        if test "x$x_libraries" = "xNONE"; then
19069          x_libraries="$SYS_ROOT/usr/lib"
19070        fi
19071
19072
19073    fi
19074
19075  fi
19076
19077
19078  # Store the CFLAGS etal passed to the configure script.
19079  ORG_CFLAGS="$CFLAGS"
19080  ORG_CXXFLAGS="$CXXFLAGS"
19081  ORG_OBJCFLAGS="$OBJCFLAGS"
19082
19083  # autoconf magic only relies on PATH, so update it if tools dir is specified
19084  OLD_PATH="$PATH"
19085  if test "x$TOOLS_DIR" != x; then
19086    PATH=$TOOLS_DIR:$PATH
19087  fi
19088
19089
19090  ### Locate C compiler (CC)
19091
19092  # On windows, only cl.exe is supported.
19093  # On Solaris, cc is preferred to gcc.
19094  # Elsewhere, gcc is preferred to cc.
19095
19096  if test "x$CC" != x; then
19097    COMPILER_CHECK_LIST="$CC"
19098  elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
19099    COMPILER_CHECK_LIST="cl"
19100  elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
19101    COMPILER_CHECK_LIST="cc gcc"
19102  else
19103    COMPILER_CHECK_LIST="gcc cc"
19104  fi
19105
19106
19107  COMPILER_NAME=C
19108
19109  CC=
19110  # If TOOLS_DIR is set, check for all compiler names in there first
19111  # before checking the rest of the PATH.
19112  if test -n "$TOOLS_DIR"; then
19113    PATH_save="$PATH"
19114    PATH="$TOOLS_DIR"
19115    for ac_prog in $COMPILER_CHECK_LIST
19116do
19117  # Extract the first word of "$ac_prog", so it can be a program name with args.
19118set dummy $ac_prog; ac_word=$2
19119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19120$as_echo_n "checking for $ac_word... " >&6; }
19121if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
19122  $as_echo_n "(cached) " >&6
19123else
19124  case $TOOLS_DIR_CC in
19125  [\\/]* | ?:[\\/]*)
19126  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
19127  ;;
19128  *)
19129  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19130for as_dir in $PATH
19131do
19132  IFS=$as_save_IFS
19133  test -z "$as_dir" && as_dir=.
19134    for ac_exec_ext in '' $ac_executable_extensions; do
19135  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19136    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
19137    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19138    break 2
19139  fi
19140done
19141  done
19142IFS=$as_save_IFS
19143
19144  ;;
19145esac
19146fi
19147TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
19148if test -n "$TOOLS_DIR_CC"; then
19149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
19150$as_echo "$TOOLS_DIR_CC" >&6; }
19151else
19152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19153$as_echo "no" >&6; }
19154fi
19155
19156
19157  test -n "$TOOLS_DIR_CC" && break
19158done
19159
19160    CC=$TOOLS_DIR_CC
19161    PATH="$PATH_save"
19162  fi
19163
19164  # AC_PATH_PROGS can't be run multiple times with the same variable,
19165  # so create a new name for this run.
19166  if test "x$CC" = x; then
19167    for ac_prog in $COMPILER_CHECK_LIST
19168do
19169  # Extract the first word of "$ac_prog", so it can be a program name with args.
19170set dummy $ac_prog; ac_word=$2
19171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19172$as_echo_n "checking for $ac_word... " >&6; }
19173if ${ac_cv_path_POTENTIAL_CC+:} false; then :
19174  $as_echo_n "(cached) " >&6
19175else
19176  case $POTENTIAL_CC in
19177  [\\/]* | ?:[\\/]*)
19178  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
19179  ;;
19180  *)
19181  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19182for as_dir in $PATH
19183do
19184  IFS=$as_save_IFS
19185  test -z "$as_dir" && as_dir=.
19186    for ac_exec_ext in '' $ac_executable_extensions; do
19187  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19188    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
19189    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19190    break 2
19191  fi
19192done
19193  done
19194IFS=$as_save_IFS
19195
19196  ;;
19197esac
19198fi
19199POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
19200if test -n "$POTENTIAL_CC"; then
19201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
19202$as_echo "$POTENTIAL_CC" >&6; }
19203else
19204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19205$as_echo "no" >&6; }
19206fi
19207
19208
19209  test -n "$POTENTIAL_CC" && break
19210done
19211
19212    CC=$POTENTIAL_CC
19213  fi
19214
19215  if test "x$CC" = x; then
19216
19217  # Print a helpful message on how to acquire the necessary build dependency.
19218  # devkit is the help tag: freetyp2, cups, pulse, alsa etc
19219  MISSING_DEPENDENCY=devkit
19220
19221  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19222    cygwin_help $MISSING_DEPENDENCY
19223  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19224    msys_help $MISSING_DEPENDENCY
19225  else
19226    PKGHANDLER_COMMAND=
19227
19228    case $PKGHANDLER in
19229      apt-get)
19230        apt_help     $MISSING_DEPENDENCY ;;
19231      yum)
19232        yum_help     $MISSING_DEPENDENCY ;;
19233      port)
19234        port_help    $MISSING_DEPENDENCY ;;
19235      pkgutil)
19236        pkgutil_help $MISSING_DEPENDENCY ;;
19237      pkgadd)
19238        pkgadd_help  $MISSING_DEPENDENCY ;;
19239      * )
19240        break ;;
19241    esac
19242
19243    if test "x$PKGHANDLER_COMMAND" != x; then
19244      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19245    fi
19246  fi
19247
19248    as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19249  fi
19250
19251  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19252
19253  # First separate the path from the arguments. This will split at the first
19254  # space.
19255  complete="$CC"
19256  path="${complete%% *}"
19257  tmp="$complete EOL"
19258  arguments="${tmp#* }"
19259
19260  # Input might be given as Windows format, start by converting to
19261  # unix format.
19262  new_path=`$CYGPATH -u "$path"`
19263
19264  # Now try to locate executable using which
19265  new_path=`$WHICH "$new_path" 2> /dev/null`
19266  # bat and cmd files are not always considered executable in cygwin causing which
19267  # to not find them
19268  if test "x$new_path" = x \
19269      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19270      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19271    new_path=`$CYGPATH -u "$path"`
19272  fi
19273  if test "x$new_path" = x; then
19274    # Oops. Which didn't find the executable.
19275    # The splitting of arguments from the executable at a space might have been incorrect,
19276    # since paths with space are more likely in Windows. Give it another try with the whole
19277    # argument.
19278    path="$complete"
19279    arguments="EOL"
19280    new_path=`$CYGPATH -u "$path"`
19281    new_path=`$WHICH "$new_path" 2> /dev/null`
19282    # bat and cmd files are not always considered executable in cygwin causing which
19283    # to not find them
19284    if test "x$new_path" = x \
19285        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19286        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19287      new_path=`$CYGPATH -u "$path"`
19288    fi
19289    if test "x$new_path" = x; then
19290      # It's still not found. Now this is an unrecoverable error.
19291      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19292$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19293      has_space=`$ECHO "$complete" | $GREP " "`
19294      if test "x$has_space" != x; then
19295        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19296$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19297      fi
19298      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19299    fi
19300  fi
19301
19302  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19303  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19304  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19305  # "foo.exe" is OK but "foo" is an error.
19306  #
19307  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19308  # It is also a way to make sure we got the proper file name for the real test later on.
19309  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19310  if test "x$test_shortpath" = x; then
19311    # Short path failed, file does not exist as specified.
19312    # Try adding .exe or .cmd
19313    if test -f "${new_path}.exe"; then
19314      input_to_shortpath="${new_path}.exe"
19315    elif test -f "${new_path}.cmd"; then
19316      input_to_shortpath="${new_path}.cmd"
19317    else
19318      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
19319$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
19320      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19321$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19322      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19323    fi
19324  else
19325    input_to_shortpath="$new_path"
19326  fi
19327
19328  # Call helper function which possibly converts this using DOS-style short mode.
19329  # If so, the updated path is stored in $new_path.
19330  new_path="$input_to_shortpath"
19331
19332  input_path="$input_to_shortpath"
19333  # Check if we need to convert this using DOS-style short mode. If the path
19334  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19335  # take no chances and rewrite it.
19336  # Note: m4 eats our [], so we need to use [ and ] instead.
19337  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19338  if test "x$has_forbidden_chars" != x; then
19339    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19340    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19341    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19342    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19343      # Going to short mode and back again did indeed matter. Since short mode is
19344      # case insensitive, let's make it lowercase to improve readability.
19345      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19346      # Now convert it back to Unix-stile (cygpath)
19347      input_path=`$CYGPATH -u "$shortmode_path"`
19348      new_path="$input_path"
19349    fi
19350  fi
19351
19352  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19353  if test "x$test_cygdrive_prefix" = x; then
19354    # As a simple fix, exclude /usr/bin since it's not a real path.
19355    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19356      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19357      # a path prefixed by /cygdrive for fixpath to work.
19358      new_path="$CYGWIN_ROOT_PATH$input_path"
19359    fi
19360  fi
19361
19362  # remove trailing .exe if any
19363  new_path="${new_path/%.exe/}"
19364
19365  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19366
19367  # First separate the path from the arguments. This will split at the first
19368  # space.
19369  complete="$CC"
19370  path="${complete%% *}"
19371  tmp="$complete EOL"
19372  arguments="${tmp#* }"
19373
19374  # Input might be given as Windows format, start by converting to
19375  # unix format.
19376  new_path="$path"
19377
19378  windows_path="$new_path"
19379  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19380    unix_path=`$CYGPATH -u "$windows_path"`
19381    new_path="$unix_path"
19382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19383    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19384    new_path="$unix_path"
19385  fi
19386
19387
19388  # Now try to locate executable using which
19389  new_path=`$WHICH "$new_path" 2> /dev/null`
19390
19391  if test "x$new_path" = x; then
19392    # Oops. Which didn't find the executable.
19393    # The splitting of arguments from the executable at a space might have been incorrect,
19394    # since paths with space are more likely in Windows. Give it another try with the whole
19395    # argument.
19396    path="$complete"
19397    arguments="EOL"
19398    new_path="$path"
19399
19400  windows_path="$new_path"
19401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19402    unix_path=`$CYGPATH -u "$windows_path"`
19403    new_path="$unix_path"
19404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19406    new_path="$unix_path"
19407  fi
19408
19409
19410    new_path=`$WHICH "$new_path" 2> /dev/null`
19411
19412    if test "x$new_path" = x; then
19413      # It's still not found. Now this is an unrecoverable error.
19414      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19415$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19416      has_space=`$ECHO "$complete" | $GREP " "`
19417      if test "x$has_space" != x; then
19418        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19419$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19420      fi
19421      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19422    fi
19423  fi
19424
19425  # Now new_path has a complete unix path to the binary
19426  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19427    # Keep paths in /bin as-is, but remove trailing .exe if any
19428    new_path="${new_path/%.exe/}"
19429    # Do not save /bin paths to all_fixpath_prefixes!
19430  else
19431    # Not in mixed or Windows style, start by that.
19432    new_path=`cmd //c echo $new_path`
19433
19434  input_path="$new_path"
19435  # Check if we need to convert this using DOS-style short mode. If the path
19436  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19437  # take no chances and rewrite it.
19438  # Note: m4 eats our [], so we need to use [ and ] instead.
19439  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19440  if test "x$has_forbidden_chars" != x; then
19441    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19442    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19443  fi
19444
19445    # Output is in $new_path
19446
19447  windows_path="$new_path"
19448  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19449    unix_path=`$CYGPATH -u "$windows_path"`
19450    new_path="$unix_path"
19451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19452    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19453    new_path="$unix_path"
19454  fi
19455
19456    # remove trailing .exe if any
19457    new_path="${new_path/%.exe/}"
19458
19459    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19460    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19461  fi
19462
19463  else
19464    # We're on a posix platform. Hooray! :)
19465    # First separate the path from the arguments. This will split at the first
19466    # space.
19467    complete="$CC"
19468    path="${complete%% *}"
19469    tmp="$complete EOL"
19470    arguments="${tmp#* }"
19471
19472    # Cannot rely on the command "which" here since it doesn't always work.
19473    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19474    if test -z "$is_absolute_path"; then
19475      # Path to executable is not absolute. Find it.
19476      IFS_save="$IFS"
19477      IFS=:
19478      for p in $PATH; do
19479        if test -f "$p/$path" && test -x "$p/$path"; then
19480          new_path="$p/$path"
19481          break
19482        fi
19483      done
19484      IFS="$IFS_save"
19485    else
19486      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
19487$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
19488      new_path="$path"
19489    fi
19490
19491    if test "x$new_path" = x; then
19492      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19493$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19494      has_space=`$ECHO "$complete" | $GREP " "`
19495      if test "x$has_space" != x; then
19496        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19497$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19498      fi
19499      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19500    fi
19501  fi
19502
19503  # Now join together the path and the arguments once again
19504  if test "x$arguments" != xEOL; then
19505    new_complete="$new_path ${arguments% *}"
19506  else
19507    new_complete="$new_path"
19508  fi
19509
19510  if test "x$complete" != "x$new_complete"; then
19511    CC="$new_complete"
19512    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
19513$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
19514  fi
19515
19516  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
19517$as_echo_n "checking resolved symbolic links for CC... " >&6; }
19518  TEST_COMPILER="$CC"
19519
19520  if test "x$OPENJDK_BUILD_OS" != xwindows; then
19521    # Follow a chain of symbolic links. Use readlink
19522    # where it exists, else fall back to horribly
19523    # complicated shell code.
19524    if test "x$READLINK_TESTED" != yes; then
19525      # On MacOSX there is a readlink tool with a different
19526      # purpose than the GNU readlink tool. Check the found readlink.
19527      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19528      if test "x$ISGNU" = x; then
19529        # A readlink that we do not know how to use.
19530        # Are there other non-GNU readlinks out there?
19531        READLINK_TESTED=yes
19532        READLINK=
19533      fi
19534    fi
19535
19536    if test "x$READLINK" != x; then
19537      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19538    else
19539      # Save the current directory for restoring afterwards
19540      STARTDIR=$PWD
19541      COUNTER=0
19542      sym_link_dir=`$DIRNAME $TEST_COMPILER`
19543      sym_link_file=`$BASENAME $TEST_COMPILER`
19544      cd $sym_link_dir
19545      # Use -P flag to resolve symlinks in directories.
19546      cd `$THEPWDCMD -P`
19547      sym_link_dir=`$THEPWDCMD -P`
19548      # Resolve file symlinks
19549      while test $COUNTER -lt 20; do
19550        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19551        if test "x$ISLINK" == x; then
19552          # This is not a symbolic link! We are done!
19553          break
19554        fi
19555        # Again resolve directory symlinks since the target of the just found
19556        # link could be in a different directory
19557        cd `$DIRNAME $ISLINK`
19558        sym_link_dir=`$THEPWDCMD -P`
19559        sym_link_file=`$BASENAME $ISLINK`
19560        let COUNTER=COUNTER+1
19561      done
19562      cd $STARTDIR
19563      TEST_COMPILER=$sym_link_dir/$sym_link_file
19564    fi
19565  fi
19566
19567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19568$as_echo "$TEST_COMPILER" >&6; }
19569  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19570$as_echo_n "checking if CC is disguised ccache... " >&6; }
19571
19572  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19573  if test "x$COMPILER_BASENAME" = "xccache"; then
19574    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19575$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19576    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19577    # We want to control ccache invocation ourselves, so ignore this cc and try
19578    # searching again.
19579
19580    # Remove the path to the fake ccache cc from the PATH
19581    RETRY_COMPILER_SAVED_PATH="$PATH"
19582    COMPILER_DIRNAME=`$DIRNAME $CC`
19583    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19584
19585    # Try again looking for our compiler
19586    if test -n "$ac_tool_prefix"; then
19587  for ac_prog in $COMPILER_CHECK_LIST
19588  do
19589    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19590set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19592$as_echo_n "checking for $ac_word... " >&6; }
19593if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
19594  $as_echo_n "(cached) " >&6
19595else
19596  if test -n "$PROPER_COMPILER_CC"; then
19597  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19598else
19599as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19600for as_dir in $PATH
19601do
19602  IFS=$as_save_IFS
19603  test -z "$as_dir" && as_dir=.
19604    for ac_exec_ext in '' $ac_executable_extensions; do
19605  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19606    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19607    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19608    break 2
19609  fi
19610done
19611  done
19612IFS=$as_save_IFS
19613
19614fi
19615fi
19616PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19617if test -n "$PROPER_COMPILER_CC"; then
19618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19619$as_echo "$PROPER_COMPILER_CC" >&6; }
19620else
19621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19622$as_echo "no" >&6; }
19623fi
19624
19625
19626    test -n "$PROPER_COMPILER_CC" && break
19627  done
19628fi
19629if test -z "$PROPER_COMPILER_CC"; then
19630  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19631  for ac_prog in $COMPILER_CHECK_LIST
19632do
19633  # Extract the first word of "$ac_prog", so it can be a program name with args.
19634set dummy $ac_prog; ac_word=$2
19635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19636$as_echo_n "checking for $ac_word... " >&6; }
19637if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
19638  $as_echo_n "(cached) " >&6
19639else
19640  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19641  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19642else
19643as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19644for as_dir in $PATH
19645do
19646  IFS=$as_save_IFS
19647  test -z "$as_dir" && as_dir=.
19648    for ac_exec_ext in '' $ac_executable_extensions; do
19649  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19650    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19651    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19652    break 2
19653  fi
19654done
19655  done
19656IFS=$as_save_IFS
19657
19658fi
19659fi
19660ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19661if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19663$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19664else
19665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19666$as_echo "no" >&6; }
19667fi
19668
19669
19670  test -n "$ac_ct_PROPER_COMPILER_CC" && break
19671done
19672
19673  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19674    PROPER_COMPILER_CC=""
19675  else
19676    case $cross_compiling:$ac_tool_warned in
19677yes:)
19678{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19679$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19680ac_tool_warned=yes ;;
19681esac
19682    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19683  fi
19684fi
19685
19686
19687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19688
19689  # First separate the path from the arguments. This will split at the first
19690  # space.
19691  complete="$PROPER_COMPILER_CC"
19692  path="${complete%% *}"
19693  tmp="$complete EOL"
19694  arguments="${tmp#* }"
19695
19696  # Input might be given as Windows format, start by converting to
19697  # unix format.
19698  new_path=`$CYGPATH -u "$path"`
19699
19700  # Now try to locate executable using which
19701  new_path=`$WHICH "$new_path" 2> /dev/null`
19702  # bat and cmd files are not always considered executable in cygwin causing which
19703  # to not find them
19704  if test "x$new_path" = x \
19705      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19706      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19707    new_path=`$CYGPATH -u "$path"`
19708  fi
19709  if test "x$new_path" = x; then
19710    # Oops. Which didn't find the executable.
19711    # The splitting of arguments from the executable at a space might have been incorrect,
19712    # since paths with space are more likely in Windows. Give it another try with the whole
19713    # argument.
19714    path="$complete"
19715    arguments="EOL"
19716    new_path=`$CYGPATH -u "$path"`
19717    new_path=`$WHICH "$new_path" 2> /dev/null`
19718    # bat and cmd files are not always considered executable in cygwin causing which
19719    # to not find them
19720    if test "x$new_path" = x \
19721        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19722        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19723      new_path=`$CYGPATH -u "$path"`
19724    fi
19725    if test "x$new_path" = x; then
19726      # It's still not found. Now this is an unrecoverable error.
19727      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19728$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19729      has_space=`$ECHO "$complete" | $GREP " "`
19730      if test "x$has_space" != x; then
19731        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19732$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19733      fi
19734      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19735    fi
19736  fi
19737
19738  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19739  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19740  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19741  # "foo.exe" is OK but "foo" is an error.
19742  #
19743  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19744  # It is also a way to make sure we got the proper file name for the real test later on.
19745  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19746  if test "x$test_shortpath" = x; then
19747    # Short path failed, file does not exist as specified.
19748    # Try adding .exe or .cmd
19749    if test -f "${new_path}.exe"; then
19750      input_to_shortpath="${new_path}.exe"
19751    elif test -f "${new_path}.cmd"; then
19752      input_to_shortpath="${new_path}.cmd"
19753    else
19754      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
19755$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
19756      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19757$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19758      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19759    fi
19760  else
19761    input_to_shortpath="$new_path"
19762  fi
19763
19764  # Call helper function which possibly converts this using DOS-style short mode.
19765  # If so, the updated path is stored in $new_path.
19766  new_path="$input_to_shortpath"
19767
19768  input_path="$input_to_shortpath"
19769  # Check if we need to convert this using DOS-style short mode. If the path
19770  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19771  # take no chances and rewrite it.
19772  # Note: m4 eats our [], so we need to use [ and ] instead.
19773  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19774  if test "x$has_forbidden_chars" != x; then
19775    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19776    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19777    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19778    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19779      # Going to short mode and back again did indeed matter. Since short mode is
19780      # case insensitive, let's make it lowercase to improve readability.
19781      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19782      # Now convert it back to Unix-stile (cygpath)
19783      input_path=`$CYGPATH -u "$shortmode_path"`
19784      new_path="$input_path"
19785    fi
19786  fi
19787
19788  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19789  if test "x$test_cygdrive_prefix" = x; then
19790    # As a simple fix, exclude /usr/bin since it's not a real path.
19791    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19792      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19793      # a path prefixed by /cygdrive for fixpath to work.
19794      new_path="$CYGWIN_ROOT_PATH$input_path"
19795    fi
19796  fi
19797
19798  # remove trailing .exe if any
19799  new_path="${new_path/%.exe/}"
19800
19801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19802
19803  # First separate the path from the arguments. This will split at the first
19804  # space.
19805  complete="$PROPER_COMPILER_CC"
19806  path="${complete%% *}"
19807  tmp="$complete EOL"
19808  arguments="${tmp#* }"
19809
19810  # Input might be given as Windows format, start by converting to
19811  # unix format.
19812  new_path="$path"
19813
19814  windows_path="$new_path"
19815  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19816    unix_path=`$CYGPATH -u "$windows_path"`
19817    new_path="$unix_path"
19818  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19819    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19820    new_path="$unix_path"
19821  fi
19822
19823
19824  # Now try to locate executable using which
19825  new_path=`$WHICH "$new_path" 2> /dev/null`
19826
19827  if test "x$new_path" = x; then
19828    # Oops. Which didn't find the executable.
19829    # The splitting of arguments from the executable at a space might have been incorrect,
19830    # since paths with space are more likely in Windows. Give it another try with the whole
19831    # argument.
19832    path="$complete"
19833    arguments="EOL"
19834    new_path="$path"
19835
19836  windows_path="$new_path"
19837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19838    unix_path=`$CYGPATH -u "$windows_path"`
19839    new_path="$unix_path"
19840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19841    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19842    new_path="$unix_path"
19843  fi
19844
19845
19846    new_path=`$WHICH "$new_path" 2> /dev/null`
19847
19848    if test "x$new_path" = x; then
19849      # It's still not found. Now this is an unrecoverable error.
19850      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19851$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19852      has_space=`$ECHO "$complete" | $GREP " "`
19853      if test "x$has_space" != x; then
19854        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19855$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19856      fi
19857      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19858    fi
19859  fi
19860
19861  # Now new_path has a complete unix path to the binary
19862  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19863    # Keep paths in /bin as-is, but remove trailing .exe if any
19864    new_path="${new_path/%.exe/}"
19865    # Do not save /bin paths to all_fixpath_prefixes!
19866  else
19867    # Not in mixed or Windows style, start by that.
19868    new_path=`cmd //c echo $new_path`
19869
19870  input_path="$new_path"
19871  # Check if we need to convert this using DOS-style short mode. If the path
19872  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19873  # take no chances and rewrite it.
19874  # Note: m4 eats our [], so we need to use [ and ] instead.
19875  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19876  if test "x$has_forbidden_chars" != x; then
19877    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19878    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19879  fi
19880
19881    # Output is in $new_path
19882
19883  windows_path="$new_path"
19884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19885    unix_path=`$CYGPATH -u "$windows_path"`
19886    new_path="$unix_path"
19887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19888    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19889    new_path="$unix_path"
19890  fi
19891
19892    # remove trailing .exe if any
19893    new_path="${new_path/%.exe/}"
19894
19895    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19896    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19897  fi
19898
19899  else
19900    # We're on a posix platform. Hooray! :)
19901    # First separate the path from the arguments. This will split at the first
19902    # space.
19903    complete="$PROPER_COMPILER_CC"
19904    path="${complete%% *}"
19905    tmp="$complete EOL"
19906    arguments="${tmp#* }"
19907
19908    # Cannot rely on the command "which" here since it doesn't always work.
19909    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19910    if test -z "$is_absolute_path"; then
19911      # Path to executable is not absolute. Find it.
19912      IFS_save="$IFS"
19913      IFS=:
19914      for p in $PATH; do
19915        if test -f "$p/$path" && test -x "$p/$path"; then
19916          new_path="$p/$path"
19917          break
19918        fi
19919      done
19920      IFS="$IFS_save"
19921    else
19922      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
19923$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
19924      new_path="$path"
19925    fi
19926
19927    if test "x$new_path" = x; then
19928      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19929$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19930      has_space=`$ECHO "$complete" | $GREP " "`
19931      if test "x$has_space" != x; then
19932        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19933$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19934      fi
19935      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19936    fi
19937  fi
19938
19939  # Now join together the path and the arguments once again
19940  if test "x$arguments" != xEOL; then
19941    new_complete="$new_path ${arguments% *}"
19942  else
19943    new_complete="$new_path"
19944  fi
19945
19946  if test "x$complete" != "x$new_complete"; then
19947    PROPER_COMPILER_CC="$new_complete"
19948    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
19949$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
19950  fi
19951
19952    PATH="$RETRY_COMPILER_SAVED_PATH"
19953
19954    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
19955$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
19956
19957  if test "x$OPENJDK_BUILD_OS" != xwindows; then
19958    # Follow a chain of symbolic links. Use readlink
19959    # where it exists, else fall back to horribly
19960    # complicated shell code.
19961    if test "x$READLINK_TESTED" != yes; then
19962      # On MacOSX there is a readlink tool with a different
19963      # purpose than the GNU readlink tool. Check the found readlink.
19964      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19965      if test "x$ISGNU" = x; then
19966        # A readlink that we do not know how to use.
19967        # Are there other non-GNU readlinks out there?
19968        READLINK_TESTED=yes
19969        READLINK=
19970      fi
19971    fi
19972
19973    if test "x$READLINK" != x; then
19974      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
19975    else
19976      # Save the current directory for restoring afterwards
19977      STARTDIR=$PWD
19978      COUNTER=0
19979      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
19980      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
19981      cd $sym_link_dir
19982      # Use -P flag to resolve symlinks in directories.
19983      cd `$THEPWDCMD -P`
19984      sym_link_dir=`$THEPWDCMD -P`
19985      # Resolve file symlinks
19986      while test $COUNTER -lt 20; do
19987        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19988        if test "x$ISLINK" == x; then
19989          # This is not a symbolic link! We are done!
19990          break
19991        fi
19992        # Again resolve directory symlinks since the target of the just found
19993        # link could be in a different directory
19994        cd `$DIRNAME $ISLINK`
19995        sym_link_dir=`$THEPWDCMD -P`
19996        sym_link_file=`$BASENAME $ISLINK`
19997        let COUNTER=COUNTER+1
19998      done
19999      cd $STARTDIR
20000      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
20001    fi
20002  fi
20003
20004    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
20005$as_echo "$PROPER_COMPILER_CC" >&6; }
20006    CC="$PROPER_COMPILER_CC"
20007  else
20008    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
20009$as_echo "no, keeping CC" >&6; }
20010    CC="$TEST_COMPILER"
20011  fi
20012
20013  COMPILER=$CC
20014  COMPILER_NAME=$COMPILER_NAME
20015
20016  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
20017    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
20018    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
20019    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
20020    if test $? -ne 0; then
20021      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20022
20023      { $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
20024$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
20025      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
20026$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
20027      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20028    else
20029      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
20030      COMPILER_VENDOR="Sun Studio"
20031    fi
20032  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
20033    # First line typically looks something like:
20034    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
20035    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
20036    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
20037    COMPILER_VENDOR="Microsoft CL.EXE"
20038    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
20039    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
20040      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
20041        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
20042      fi
20043    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
20044      if test "x$COMPILER_CPU_TEST" != "xx64"; then
20045        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
20046      fi
20047    fi
20048  else
20049    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20050    # Check that this is likely to be GCC.
20051    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
20052    if test $? -ne 0; then
20053      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
20054$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
20055      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
20056$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
20057      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20058    fi
20059
20060    # First line typically looks something like:
20061    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
20062    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
20063    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
20064  fi
20065  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
20066  CC_VERSION="$COMPILER_VERSION"
20067  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
20068  CC_VENDOR="$COMPILER_VENDOR"
20069
20070  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
20071$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
20072
20073
20074  # Now that we have resolved CC ourself, let autoconf have its go at it
20075  ac_ext=c
20076ac_cpp='$CPP $CPPFLAGS'
20077ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20078ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20079ac_compiler_gnu=$ac_cv_c_compiler_gnu
20080if test -n "$ac_tool_prefix"; then
20081  for ac_prog in $CC
20082  do
20083    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20084set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20086$as_echo_n "checking for $ac_word... " >&6; }
20087if ${ac_cv_prog_CC+:} false; then :
20088  $as_echo_n "(cached) " >&6
20089else
20090  if test -n "$CC"; then
20091  ac_cv_prog_CC="$CC" # Let the user override the test.
20092else
20093as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20094for as_dir in $PATH
20095do
20096  IFS=$as_save_IFS
20097  test -z "$as_dir" && as_dir=.
20098    for ac_exec_ext in '' $ac_executable_extensions; do
20099  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20100    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
20101    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20102    break 2
20103  fi
20104done
20105  done
20106IFS=$as_save_IFS
20107
20108fi
20109fi
20110CC=$ac_cv_prog_CC
20111if test -n "$CC"; then
20112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
20113$as_echo "$CC" >&6; }
20114else
20115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20116$as_echo "no" >&6; }
20117fi
20118
20119
20120    test -n "$CC" && break
20121  done
20122fi
20123if test -z "$CC"; then
20124  ac_ct_CC=$CC
20125  for ac_prog in $CC
20126do
20127  # Extract the first word of "$ac_prog", so it can be a program name with args.
20128set dummy $ac_prog; ac_word=$2
20129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20130$as_echo_n "checking for $ac_word... " >&6; }
20131if ${ac_cv_prog_ac_ct_CC+:} false; then :
20132  $as_echo_n "(cached) " >&6
20133else
20134  if test -n "$ac_ct_CC"; then
20135  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
20136else
20137as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20138for as_dir in $PATH
20139do
20140  IFS=$as_save_IFS
20141  test -z "$as_dir" && as_dir=.
20142    for ac_exec_ext in '' $ac_executable_extensions; do
20143  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20144    ac_cv_prog_ac_ct_CC="$ac_prog"
20145    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20146    break 2
20147  fi
20148done
20149  done
20150IFS=$as_save_IFS
20151
20152fi
20153fi
20154ac_ct_CC=$ac_cv_prog_ac_ct_CC
20155if test -n "$ac_ct_CC"; then
20156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
20157$as_echo "$ac_ct_CC" >&6; }
20158else
20159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20160$as_echo "no" >&6; }
20161fi
20162
20163
20164  test -n "$ac_ct_CC" && break
20165done
20166
20167  if test "x$ac_ct_CC" = x; then
20168    CC=""
20169  else
20170    case $cross_compiling:$ac_tool_warned in
20171yes:)
20172{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20173$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20174ac_tool_warned=yes ;;
20175esac
20176    CC=$ac_ct_CC
20177  fi
20178fi
20179
20180
20181test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20182$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20183as_fn_error $? "no acceptable C compiler found in \$PATH
20184See \`config.log' for more details" "$LINENO" 5; }
20185
20186# Provide some information about the compiler.
20187$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
20188set X $ac_compile
20189ac_compiler=$2
20190for ac_option in --version -v -V -qversion; do
20191  { { ac_try="$ac_compiler $ac_option >&5"
20192case "(($ac_try" in
20193  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20194  *) ac_try_echo=$ac_try;;
20195esac
20196eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20197$as_echo "$ac_try_echo"; } >&5
20198  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20199  ac_status=$?
20200  if test -s conftest.err; then
20201    sed '10a\
20202... rest of stderr output deleted ...
20203         10q' conftest.err >conftest.er1
20204    cat conftest.er1 >&5
20205  fi
20206  rm -f conftest.er1 conftest.err
20207  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20208  test $ac_status = 0; }
20209done
20210
20211cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20212/* end confdefs.h.  */
20213
20214int
20215main ()
20216{
20217
20218  ;
20219  return 0;
20220}
20221_ACEOF
20222ac_clean_files_save=$ac_clean_files
20223ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
20224# Try to create an executable without -o first, disregard a.out.
20225# It will help us diagnose broken compilers, and finding out an intuition
20226# of exeext.
20227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
20228$as_echo_n "checking whether the C compiler works... " >&6; }
20229ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
20230
20231# The possible output files:
20232ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
20233
20234ac_rmfiles=
20235for ac_file in $ac_files
20236do
20237  case $ac_file in
20238    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20239    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
20240  esac
20241done
20242rm -f $ac_rmfiles
20243
20244if { { ac_try="$ac_link_default"
20245case "(($ac_try" in
20246  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20247  *) ac_try_echo=$ac_try;;
20248esac
20249eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20250$as_echo "$ac_try_echo"; } >&5
20251  (eval "$ac_link_default") 2>&5
20252  ac_status=$?
20253  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20254  test $ac_status = 0; }; then :
20255  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
20256# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
20257# in a Makefile.  We should not override ac_cv_exeext if it was cached,
20258# so that the user can short-circuit this test for compilers unknown to
20259# Autoconf.
20260for ac_file in $ac_files ''
20261do
20262  test -f "$ac_file" || continue
20263  case $ac_file in
20264    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
20265	;;
20266    [ab].out )
20267	# We found the default executable, but exeext='' is most
20268	# certainly right.
20269	break;;
20270    *.* )
20271	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
20272	then :; else
20273	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20274	fi
20275	# We set ac_cv_exeext here because the later test for it is not
20276	# safe: cross compilers may not add the suffix if given an `-o'
20277	# argument, so we may need to know it at that point already.
20278	# Even if this section looks crufty: it has the advantage of
20279	# actually working.
20280	break;;
20281    * )
20282	break;;
20283  esac
20284done
20285test "$ac_cv_exeext" = no && ac_cv_exeext=
20286
20287else
20288  ac_file=''
20289fi
20290if test -z "$ac_file"; then :
20291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20292$as_echo "no" >&6; }
20293$as_echo "$as_me: failed program was:" >&5
20294sed 's/^/| /' conftest.$ac_ext >&5
20295
20296{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20297$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20298as_fn_error 77 "C compiler cannot create executables
20299See \`config.log' for more details" "$LINENO" 5; }
20300else
20301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20302$as_echo "yes" >&6; }
20303fi
20304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
20305$as_echo_n "checking for C compiler default output file name... " >&6; }
20306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
20307$as_echo "$ac_file" >&6; }
20308ac_exeext=$ac_cv_exeext
20309
20310rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
20311ac_clean_files=$ac_clean_files_save
20312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
20313$as_echo_n "checking for suffix of executables... " >&6; }
20314if { { ac_try="$ac_link"
20315case "(($ac_try" in
20316  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20317  *) ac_try_echo=$ac_try;;
20318esac
20319eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20320$as_echo "$ac_try_echo"; } >&5
20321  (eval "$ac_link") 2>&5
20322  ac_status=$?
20323  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20324  test $ac_status = 0; }; then :
20325  # If both `conftest.exe' and `conftest' are `present' (well, observable)
20326# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
20327# work properly (i.e., refer to `conftest.exe'), while it won't with
20328# `rm'.
20329for ac_file in conftest.exe conftest conftest.*; do
20330  test -f "$ac_file" || continue
20331  case $ac_file in
20332    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20333    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20334	  break;;
20335    * ) break;;
20336  esac
20337done
20338else
20339  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20340$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20341as_fn_error $? "cannot compute suffix of executables: cannot compile and link
20342See \`config.log' for more details" "$LINENO" 5; }
20343fi
20344rm -f conftest conftest$ac_cv_exeext
20345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
20346$as_echo "$ac_cv_exeext" >&6; }
20347
20348rm -f conftest.$ac_ext
20349EXEEXT=$ac_cv_exeext
20350ac_exeext=$EXEEXT
20351cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20352/* end confdefs.h.  */
20353#include <stdio.h>
20354int
20355main ()
20356{
20357FILE *f = fopen ("conftest.out", "w");
20358 return ferror (f) || fclose (f) != 0;
20359
20360  ;
20361  return 0;
20362}
20363_ACEOF
20364ac_clean_files="$ac_clean_files conftest.out"
20365# Check that the compiler produces executables we can run.  If not, either
20366# the compiler is broken, or we cross compile.
20367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
20368$as_echo_n "checking whether we are cross compiling... " >&6; }
20369if test "$cross_compiling" != yes; then
20370  { { ac_try="$ac_link"
20371case "(($ac_try" in
20372  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20373  *) ac_try_echo=$ac_try;;
20374esac
20375eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20376$as_echo "$ac_try_echo"; } >&5
20377  (eval "$ac_link") 2>&5
20378  ac_status=$?
20379  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20380  test $ac_status = 0; }
20381  if { ac_try='./conftest$ac_cv_exeext'
20382  { { case "(($ac_try" in
20383  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20384  *) ac_try_echo=$ac_try;;
20385esac
20386eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20387$as_echo "$ac_try_echo"; } >&5
20388  (eval "$ac_try") 2>&5
20389  ac_status=$?
20390  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20391  test $ac_status = 0; }; }; then
20392    cross_compiling=no
20393  else
20394    if test "$cross_compiling" = maybe; then
20395	cross_compiling=yes
20396    else
20397	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20398$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20399as_fn_error $? "cannot run C compiled programs.
20400If you meant to cross compile, use \`--host'.
20401See \`config.log' for more details" "$LINENO" 5; }
20402    fi
20403  fi
20404fi
20405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
20406$as_echo "$cross_compiling" >&6; }
20407
20408rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
20409ac_clean_files=$ac_clean_files_save
20410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
20411$as_echo_n "checking for suffix of object files... " >&6; }
20412if ${ac_cv_objext+:} false; then :
20413  $as_echo_n "(cached) " >&6
20414else
20415  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20416/* end confdefs.h.  */
20417
20418int
20419main ()
20420{
20421
20422  ;
20423  return 0;
20424}
20425_ACEOF
20426rm -f conftest.o conftest.obj
20427if { { ac_try="$ac_compile"
20428case "(($ac_try" in
20429  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20430  *) ac_try_echo=$ac_try;;
20431esac
20432eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20433$as_echo "$ac_try_echo"; } >&5
20434  (eval "$ac_compile") 2>&5
20435  ac_status=$?
20436  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20437  test $ac_status = 0; }; then :
20438  for ac_file in conftest.o conftest.obj conftest.*; do
20439  test -f "$ac_file" || continue;
20440  case $ac_file in
20441    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
20442    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
20443       break;;
20444  esac
20445done
20446else
20447  $as_echo "$as_me: failed program was:" >&5
20448sed 's/^/| /' conftest.$ac_ext >&5
20449
20450{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20451$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20452as_fn_error $? "cannot compute suffix of object files: cannot compile
20453See \`config.log' for more details" "$LINENO" 5; }
20454fi
20455rm -f conftest.$ac_cv_objext conftest.$ac_ext
20456fi
20457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
20458$as_echo "$ac_cv_objext" >&6; }
20459OBJEXT=$ac_cv_objext
20460ac_objext=$OBJEXT
20461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
20462$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
20463if ${ac_cv_c_compiler_gnu+:} false; then :
20464  $as_echo_n "(cached) " >&6
20465else
20466  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20467/* end confdefs.h.  */
20468
20469int
20470main ()
20471{
20472#ifndef __GNUC__
20473       choke me
20474#endif
20475
20476  ;
20477  return 0;
20478}
20479_ACEOF
20480if ac_fn_c_try_compile "$LINENO"; then :
20481  ac_compiler_gnu=yes
20482else
20483  ac_compiler_gnu=no
20484fi
20485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20486ac_cv_c_compiler_gnu=$ac_compiler_gnu
20487
20488fi
20489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
20490$as_echo "$ac_cv_c_compiler_gnu" >&6; }
20491if test $ac_compiler_gnu = yes; then
20492  GCC=yes
20493else
20494  GCC=
20495fi
20496ac_test_CFLAGS=${CFLAGS+set}
20497ac_save_CFLAGS=$CFLAGS
20498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
20499$as_echo_n "checking whether $CC accepts -g... " >&6; }
20500if ${ac_cv_prog_cc_g+:} false; then :
20501  $as_echo_n "(cached) " >&6
20502else
20503  ac_save_c_werror_flag=$ac_c_werror_flag
20504   ac_c_werror_flag=yes
20505   ac_cv_prog_cc_g=no
20506   CFLAGS="-g"
20507   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20508/* end confdefs.h.  */
20509
20510int
20511main ()
20512{
20513
20514  ;
20515  return 0;
20516}
20517_ACEOF
20518if ac_fn_c_try_compile "$LINENO"; then :
20519  ac_cv_prog_cc_g=yes
20520else
20521  CFLAGS=""
20522      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20523/* end confdefs.h.  */
20524
20525int
20526main ()
20527{
20528
20529  ;
20530  return 0;
20531}
20532_ACEOF
20533if ac_fn_c_try_compile "$LINENO"; then :
20534
20535else
20536  ac_c_werror_flag=$ac_save_c_werror_flag
20537	 CFLAGS="-g"
20538	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20539/* end confdefs.h.  */
20540
20541int
20542main ()
20543{
20544
20545  ;
20546  return 0;
20547}
20548_ACEOF
20549if ac_fn_c_try_compile "$LINENO"; then :
20550  ac_cv_prog_cc_g=yes
20551fi
20552rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20553fi
20554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20555fi
20556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20557   ac_c_werror_flag=$ac_save_c_werror_flag
20558fi
20559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20560$as_echo "$ac_cv_prog_cc_g" >&6; }
20561if test "$ac_test_CFLAGS" = set; then
20562  CFLAGS=$ac_save_CFLAGS
20563elif test $ac_cv_prog_cc_g = yes; then
20564  if test "$GCC" = yes; then
20565    CFLAGS="-g -O2"
20566  else
20567    CFLAGS="-g"
20568  fi
20569else
20570  if test "$GCC" = yes; then
20571    CFLAGS="-O2"
20572  else
20573    CFLAGS=
20574  fi
20575fi
20576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20577$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20578if ${ac_cv_prog_cc_c89+:} false; then :
20579  $as_echo_n "(cached) " >&6
20580else
20581  ac_cv_prog_cc_c89=no
20582ac_save_CC=$CC
20583cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20584/* end confdefs.h.  */
20585#include <stdarg.h>
20586#include <stdio.h>
20587struct stat;
20588/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20589struct buf { int x; };
20590FILE * (*rcsopen) (struct buf *, struct stat *, int);
20591static char *e (p, i)
20592     char **p;
20593     int i;
20594{
20595  return p[i];
20596}
20597static char *f (char * (*g) (char **, int), char **p, ...)
20598{
20599  char *s;
20600  va_list v;
20601  va_start (v,p);
20602  s = g (p, va_arg (v,int));
20603  va_end (v);
20604  return s;
20605}
20606
20607/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20608   function prototypes and stuff, but not '\xHH' hex character constants.
20609   These don't provoke an error unfortunately, instead are silently treated
20610   as 'x'.  The following induces an error, until -std is added to get
20611   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20612   array size at least.  It's necessary to write '\x00'==0 to get something
20613   that's true only with -std.  */
20614int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20615
20616/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20617   inside strings and character constants.  */
20618#define FOO(x) 'x'
20619int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20620
20621int test (int i, double x);
20622struct s1 {int (*f) (int a);};
20623struct s2 {int (*f) (double a);};
20624int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20625int argc;
20626char **argv;
20627int
20628main ()
20629{
20630return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20631  ;
20632  return 0;
20633}
20634_ACEOF
20635for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20636	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20637do
20638  CC="$ac_save_CC $ac_arg"
20639  if ac_fn_c_try_compile "$LINENO"; then :
20640  ac_cv_prog_cc_c89=$ac_arg
20641fi
20642rm -f core conftest.err conftest.$ac_objext
20643  test "x$ac_cv_prog_cc_c89" != "xno" && break
20644done
20645rm -f conftest.$ac_ext
20646CC=$ac_save_CC
20647
20648fi
20649# AC_CACHE_VAL
20650case "x$ac_cv_prog_cc_c89" in
20651  x)
20652    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20653$as_echo "none needed" >&6; } ;;
20654  xno)
20655    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20656$as_echo "unsupported" >&6; } ;;
20657  *)
20658    CC="$CC $ac_cv_prog_cc_c89"
20659    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20660$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20661esac
20662if test "x$ac_cv_prog_cc_c89" != xno; then :
20663
20664fi
20665
20666ac_ext=cpp
20667ac_cpp='$CXXCPP $CPPFLAGS'
20668ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20669ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20670ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20671
20672
20673  ### Locate C++ compiler (CXX)
20674
20675  if test "x$CXX" != x; then
20676    COMPILER_CHECK_LIST="$CXX"
20677  elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20678    COMPILER_CHECK_LIST="cl"
20679  elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20680    COMPILER_CHECK_LIST="CC g++"
20681  else
20682    COMPILER_CHECK_LIST="g++ CC"
20683  fi
20684
20685
20686  COMPILER_NAME=C++
20687
20688  CXX=
20689  # If TOOLS_DIR is set, check for all compiler names in there first
20690  # before checking the rest of the PATH.
20691  if test -n "$TOOLS_DIR"; then
20692    PATH_save="$PATH"
20693    PATH="$TOOLS_DIR"
20694    for ac_prog in $COMPILER_CHECK_LIST
20695do
20696  # Extract the first word of "$ac_prog", so it can be a program name with args.
20697set dummy $ac_prog; ac_word=$2
20698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20699$as_echo_n "checking for $ac_word... " >&6; }
20700if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
20701  $as_echo_n "(cached) " >&6
20702else
20703  case $TOOLS_DIR_CXX in
20704  [\\/]* | ?:[\\/]*)
20705  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20706  ;;
20707  *)
20708  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20709for as_dir in $PATH
20710do
20711  IFS=$as_save_IFS
20712  test -z "$as_dir" && as_dir=.
20713    for ac_exec_ext in '' $ac_executable_extensions; do
20714  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20715    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20716    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20717    break 2
20718  fi
20719done
20720  done
20721IFS=$as_save_IFS
20722
20723  ;;
20724esac
20725fi
20726TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
20727if test -n "$TOOLS_DIR_CXX"; then
20728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
20729$as_echo "$TOOLS_DIR_CXX" >&6; }
20730else
20731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20732$as_echo "no" >&6; }
20733fi
20734
20735
20736  test -n "$TOOLS_DIR_CXX" && break
20737done
20738
20739    CXX=$TOOLS_DIR_CXX
20740    PATH="$PATH_save"
20741  fi
20742
20743  # AC_PATH_PROGS can't be run multiple times with the same variable,
20744  # so create a new name for this run.
20745  if test "x$CXX" = x; then
20746    for ac_prog in $COMPILER_CHECK_LIST
20747do
20748  # Extract the first word of "$ac_prog", so it can be a program name with args.
20749set dummy $ac_prog; ac_word=$2
20750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20751$as_echo_n "checking for $ac_word... " >&6; }
20752if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
20753  $as_echo_n "(cached) " >&6
20754else
20755  case $POTENTIAL_CXX in
20756  [\\/]* | ?:[\\/]*)
20757  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20758  ;;
20759  *)
20760  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20761for as_dir in $PATH
20762do
20763  IFS=$as_save_IFS
20764  test -z "$as_dir" && as_dir=.
20765    for ac_exec_ext in '' $ac_executable_extensions; do
20766  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20767    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20768    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20769    break 2
20770  fi
20771done
20772  done
20773IFS=$as_save_IFS
20774
20775  ;;
20776esac
20777fi
20778POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20779if test -n "$POTENTIAL_CXX"; then
20780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20781$as_echo "$POTENTIAL_CXX" >&6; }
20782else
20783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20784$as_echo "no" >&6; }
20785fi
20786
20787
20788  test -n "$POTENTIAL_CXX" && break
20789done
20790
20791    CXX=$POTENTIAL_CXX
20792  fi
20793
20794  if test "x$CXX" = x; then
20795
20796  # Print a helpful message on how to acquire the necessary build dependency.
20797  # devkit is the help tag: freetyp2, cups, pulse, alsa etc
20798  MISSING_DEPENDENCY=devkit
20799
20800  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20801    cygwin_help $MISSING_DEPENDENCY
20802  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20803    msys_help $MISSING_DEPENDENCY
20804  else
20805    PKGHANDLER_COMMAND=
20806
20807    case $PKGHANDLER in
20808      apt-get)
20809        apt_help     $MISSING_DEPENDENCY ;;
20810      yum)
20811        yum_help     $MISSING_DEPENDENCY ;;
20812      port)
20813        port_help    $MISSING_DEPENDENCY ;;
20814      pkgutil)
20815        pkgutil_help $MISSING_DEPENDENCY ;;
20816      pkgadd)
20817        pkgadd_help  $MISSING_DEPENDENCY ;;
20818      * )
20819        break ;;
20820    esac
20821
20822    if test "x$PKGHANDLER_COMMAND" != x; then
20823      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
20824    fi
20825  fi
20826
20827    as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
20828  fi
20829
20830  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20831
20832  # First separate the path from the arguments. This will split at the first
20833  # space.
20834  complete="$CXX"
20835  path="${complete%% *}"
20836  tmp="$complete EOL"
20837  arguments="${tmp#* }"
20838
20839  # Input might be given as Windows format, start by converting to
20840  # unix format.
20841  new_path=`$CYGPATH -u "$path"`
20842
20843  # Now try to locate executable using which
20844  new_path=`$WHICH "$new_path" 2> /dev/null`
20845  # bat and cmd files are not always considered executable in cygwin causing which
20846  # to not find them
20847  if test "x$new_path" = x \
20848      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20849      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20850    new_path=`$CYGPATH -u "$path"`
20851  fi
20852  if test "x$new_path" = x; then
20853    # Oops. Which didn't find the executable.
20854    # The splitting of arguments from the executable at a space might have been incorrect,
20855    # since paths with space are more likely in Windows. Give it another try with the whole
20856    # argument.
20857    path="$complete"
20858    arguments="EOL"
20859    new_path=`$CYGPATH -u "$path"`
20860    new_path=`$WHICH "$new_path" 2> /dev/null`
20861    # bat and cmd files are not always considered executable in cygwin causing which
20862    # to not find them
20863    if test "x$new_path" = x \
20864        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20865        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20866      new_path=`$CYGPATH -u "$path"`
20867    fi
20868    if test "x$new_path" = x; then
20869      # It's still not found. Now this is an unrecoverable error.
20870      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20871$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20872      has_space=`$ECHO "$complete" | $GREP " "`
20873      if test "x$has_space" != x; then
20874        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20875$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20876      fi
20877      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20878    fi
20879  fi
20880
20881  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20882  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20883  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20884  # "foo.exe" is OK but "foo" is an error.
20885  #
20886  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20887  # It is also a way to make sure we got the proper file name for the real test later on.
20888  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20889  if test "x$test_shortpath" = x; then
20890    # Short path failed, file does not exist as specified.
20891    # Try adding .exe or .cmd
20892    if test -f "${new_path}.exe"; then
20893      input_to_shortpath="${new_path}.exe"
20894    elif test -f "${new_path}.cmd"; then
20895      input_to_shortpath="${new_path}.cmd"
20896    else
20897      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
20898$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
20899      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20900$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20901      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20902    fi
20903  else
20904    input_to_shortpath="$new_path"
20905  fi
20906
20907  # Call helper function which possibly converts this using DOS-style short mode.
20908  # If so, the updated path is stored in $new_path.
20909  new_path="$input_to_shortpath"
20910
20911  input_path="$input_to_shortpath"
20912  # Check if we need to convert this using DOS-style short mode. If the path
20913  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20914  # take no chances and rewrite it.
20915  # Note: m4 eats our [], so we need to use [ and ] instead.
20916  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20917  if test "x$has_forbidden_chars" != x; then
20918    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20919    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20920    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20921    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20922      # Going to short mode and back again did indeed matter. Since short mode is
20923      # case insensitive, let's make it lowercase to improve readability.
20924      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20925      # Now convert it back to Unix-stile (cygpath)
20926      input_path=`$CYGPATH -u "$shortmode_path"`
20927      new_path="$input_path"
20928    fi
20929  fi
20930
20931  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20932  if test "x$test_cygdrive_prefix" = x; then
20933    # As a simple fix, exclude /usr/bin since it's not a real path.
20934    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20935      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20936      # a path prefixed by /cygdrive for fixpath to work.
20937      new_path="$CYGWIN_ROOT_PATH$input_path"
20938    fi
20939  fi
20940
20941  # remove trailing .exe if any
20942  new_path="${new_path/%.exe/}"
20943
20944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20945
20946  # First separate the path from the arguments. This will split at the first
20947  # space.
20948  complete="$CXX"
20949  path="${complete%% *}"
20950  tmp="$complete EOL"
20951  arguments="${tmp#* }"
20952
20953  # Input might be given as Windows format, start by converting to
20954  # unix format.
20955  new_path="$path"
20956
20957  windows_path="$new_path"
20958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20959    unix_path=`$CYGPATH -u "$windows_path"`
20960    new_path="$unix_path"
20961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20963    new_path="$unix_path"
20964  fi
20965
20966
20967  # Now try to locate executable using which
20968  new_path=`$WHICH "$new_path" 2> /dev/null`
20969
20970  if test "x$new_path" = x; then
20971    # Oops. Which didn't find the executable.
20972    # The splitting of arguments from the executable at a space might have been incorrect,
20973    # since paths with space are more likely in Windows. Give it another try with the whole
20974    # argument.
20975    path="$complete"
20976    arguments="EOL"
20977    new_path="$path"
20978
20979  windows_path="$new_path"
20980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20981    unix_path=`$CYGPATH -u "$windows_path"`
20982    new_path="$unix_path"
20983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20984    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20985    new_path="$unix_path"
20986  fi
20987
20988
20989    new_path=`$WHICH "$new_path" 2> /dev/null`
20990
20991    if test "x$new_path" = x; then
20992      # It's still not found. Now this is an unrecoverable error.
20993      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20994$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20995      has_space=`$ECHO "$complete" | $GREP " "`
20996      if test "x$has_space" != x; then
20997        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20998$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20999      fi
21000      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21001    fi
21002  fi
21003
21004  # Now new_path has a complete unix path to the binary
21005  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21006    # Keep paths in /bin as-is, but remove trailing .exe if any
21007    new_path="${new_path/%.exe/}"
21008    # Do not save /bin paths to all_fixpath_prefixes!
21009  else
21010    # Not in mixed or Windows style, start by that.
21011    new_path=`cmd //c echo $new_path`
21012
21013  input_path="$new_path"
21014  # Check if we need to convert this using DOS-style short mode. If the path
21015  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21016  # take no chances and rewrite it.
21017  # Note: m4 eats our [], so we need to use [ and ] instead.
21018  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21019  if test "x$has_forbidden_chars" != x; then
21020    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21021    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21022  fi
21023
21024    # Output is in $new_path
21025
21026  windows_path="$new_path"
21027  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21028    unix_path=`$CYGPATH -u "$windows_path"`
21029    new_path="$unix_path"
21030  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21031    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21032    new_path="$unix_path"
21033  fi
21034
21035    # remove trailing .exe if any
21036    new_path="${new_path/%.exe/}"
21037
21038    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21039    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21040  fi
21041
21042  else
21043    # We're on a posix platform. Hooray! :)
21044    # First separate the path from the arguments. This will split at the first
21045    # space.
21046    complete="$CXX"
21047    path="${complete%% *}"
21048    tmp="$complete EOL"
21049    arguments="${tmp#* }"
21050
21051    # Cannot rely on the command "which" here since it doesn't always work.
21052    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21053    if test -z "$is_absolute_path"; then
21054      # Path to executable is not absolute. Find it.
21055      IFS_save="$IFS"
21056      IFS=:
21057      for p in $PATH; do
21058        if test -f "$p/$path" && test -x "$p/$path"; then
21059          new_path="$p/$path"
21060          break
21061        fi
21062      done
21063      IFS="$IFS_save"
21064    else
21065      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
21066$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
21067      new_path="$path"
21068    fi
21069
21070    if test "x$new_path" = x; then
21071      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21072$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21073      has_space=`$ECHO "$complete" | $GREP " "`
21074      if test "x$has_space" != x; then
21075        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21076$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21077      fi
21078      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21079    fi
21080  fi
21081
21082  # Now join together the path and the arguments once again
21083  if test "x$arguments" != xEOL; then
21084    new_complete="$new_path ${arguments% *}"
21085  else
21086    new_complete="$new_path"
21087  fi
21088
21089  if test "x$complete" != "x$new_complete"; then
21090    CXX="$new_complete"
21091    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
21092$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
21093  fi
21094
21095  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
21096$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
21097  TEST_COMPILER="$CXX"
21098
21099  if test "x$OPENJDK_BUILD_OS" != xwindows; then
21100    # Follow a chain of symbolic links. Use readlink
21101    # where it exists, else fall back to horribly
21102    # complicated shell code.
21103    if test "x$READLINK_TESTED" != yes; then
21104      # On MacOSX there is a readlink tool with a different
21105      # purpose than the GNU readlink tool. Check the found readlink.
21106      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21107      if test "x$ISGNU" = x; then
21108        # A readlink that we do not know how to use.
21109        # Are there other non-GNU readlinks out there?
21110        READLINK_TESTED=yes
21111        READLINK=
21112      fi
21113    fi
21114
21115    if test "x$READLINK" != x; then
21116      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
21117    else
21118      # Save the current directory for restoring afterwards
21119      STARTDIR=$PWD
21120      COUNTER=0
21121      sym_link_dir=`$DIRNAME $TEST_COMPILER`
21122      sym_link_file=`$BASENAME $TEST_COMPILER`
21123      cd $sym_link_dir
21124      # Use -P flag to resolve symlinks in directories.
21125      cd `$THEPWDCMD -P`
21126      sym_link_dir=`$THEPWDCMD -P`
21127      # Resolve file symlinks
21128      while test $COUNTER -lt 20; do
21129        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21130        if test "x$ISLINK" == x; then
21131          # This is not a symbolic link! We are done!
21132          break
21133        fi
21134        # Again resolve directory symlinks since the target of the just found
21135        # link could be in a different directory
21136        cd `$DIRNAME $ISLINK`
21137        sym_link_dir=`$THEPWDCMD -P`
21138        sym_link_file=`$BASENAME $ISLINK`
21139        let COUNTER=COUNTER+1
21140      done
21141      cd $STARTDIR
21142      TEST_COMPILER=$sym_link_dir/$sym_link_file
21143    fi
21144  fi
21145
21146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
21147$as_echo "$TEST_COMPILER" >&6; }
21148  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
21149$as_echo_n "checking if CXX is disguised ccache... " >&6; }
21150
21151  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
21152  if test "x$COMPILER_BASENAME" = "xccache"; then
21153    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
21154$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
21155    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
21156    # We want to control ccache invocation ourselves, so ignore this cc and try
21157    # searching again.
21158
21159    # Remove the path to the fake ccache cc from the PATH
21160    RETRY_COMPILER_SAVED_PATH="$PATH"
21161    COMPILER_DIRNAME=`$DIRNAME $CXX`
21162    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
21163
21164    # Try again looking for our compiler
21165    if test -n "$ac_tool_prefix"; then
21166  for ac_prog in $COMPILER_CHECK_LIST
21167  do
21168    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21169set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21171$as_echo_n "checking for $ac_word... " >&6; }
21172if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
21173  $as_echo_n "(cached) " >&6
21174else
21175  if test -n "$PROPER_COMPILER_CXX"; then
21176  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
21177else
21178as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21179for as_dir in $PATH
21180do
21181  IFS=$as_save_IFS
21182  test -z "$as_dir" && as_dir=.
21183    for ac_exec_ext in '' $ac_executable_extensions; do
21184  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21185    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
21186    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21187    break 2
21188  fi
21189done
21190  done
21191IFS=$as_save_IFS
21192
21193fi
21194fi
21195PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
21196if test -n "$PROPER_COMPILER_CXX"; then
21197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21198$as_echo "$PROPER_COMPILER_CXX" >&6; }
21199else
21200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21201$as_echo "no" >&6; }
21202fi
21203
21204
21205    test -n "$PROPER_COMPILER_CXX" && break
21206  done
21207fi
21208if test -z "$PROPER_COMPILER_CXX"; then
21209  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
21210  for ac_prog in $COMPILER_CHECK_LIST
21211do
21212  # Extract the first word of "$ac_prog", so it can be a program name with args.
21213set dummy $ac_prog; ac_word=$2
21214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21215$as_echo_n "checking for $ac_word... " >&6; }
21216if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
21217  $as_echo_n "(cached) " >&6
21218else
21219  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21220  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
21221else
21222as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21223for as_dir in $PATH
21224do
21225  IFS=$as_save_IFS
21226  test -z "$as_dir" && as_dir=.
21227    for ac_exec_ext in '' $ac_executable_extensions; do
21228  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21229    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
21230    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21231    break 2
21232  fi
21233done
21234  done
21235IFS=$as_save_IFS
21236
21237fi
21238fi
21239ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
21240if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
21242$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
21243else
21244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21245$as_echo "no" >&6; }
21246fi
21247
21248
21249  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
21250done
21251
21252  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
21253    PROPER_COMPILER_CXX=""
21254  else
21255    case $cross_compiling:$ac_tool_warned in
21256yes:)
21257{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21258$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21259ac_tool_warned=yes ;;
21260esac
21261    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
21262  fi
21263fi
21264
21265
21266  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21267
21268  # First separate the path from the arguments. This will split at the first
21269  # space.
21270  complete="$PROPER_COMPILER_CXX"
21271  path="${complete%% *}"
21272  tmp="$complete EOL"
21273  arguments="${tmp#* }"
21274
21275  # Input might be given as Windows format, start by converting to
21276  # unix format.
21277  new_path=`$CYGPATH -u "$path"`
21278
21279  # Now try to locate executable using which
21280  new_path=`$WHICH "$new_path" 2> /dev/null`
21281  # bat and cmd files are not always considered executable in cygwin causing which
21282  # to not find them
21283  if test "x$new_path" = x \
21284      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21285      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21286    new_path=`$CYGPATH -u "$path"`
21287  fi
21288  if test "x$new_path" = x; then
21289    # Oops. Which didn't find the executable.
21290    # The splitting of arguments from the executable at a space might have been incorrect,
21291    # since paths with space are more likely in Windows. Give it another try with the whole
21292    # argument.
21293    path="$complete"
21294    arguments="EOL"
21295    new_path=`$CYGPATH -u "$path"`
21296    new_path=`$WHICH "$new_path" 2> /dev/null`
21297    # bat and cmd files are not always considered executable in cygwin causing which
21298    # to not find them
21299    if test "x$new_path" = x \
21300        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21301        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21302      new_path=`$CYGPATH -u "$path"`
21303    fi
21304    if test "x$new_path" = x; then
21305      # It's still not found. Now this is an unrecoverable error.
21306      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21307$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21308      has_space=`$ECHO "$complete" | $GREP " "`
21309      if test "x$has_space" != x; then
21310        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21311$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21312      fi
21313      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21314    fi
21315  fi
21316
21317  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21318  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21319  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21320  # "foo.exe" is OK but "foo" is an error.
21321  #
21322  # This test is therefore slightly more accurate than "test -f" to check for file presence.
21323  # It is also a way to make sure we got the proper file name for the real test later on.
21324  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21325  if test "x$test_shortpath" = x; then
21326    # Short path failed, file does not exist as specified.
21327    # Try adding .exe or .cmd
21328    if test -f "${new_path}.exe"; then
21329      input_to_shortpath="${new_path}.exe"
21330    elif test -f "${new_path}.cmd"; then
21331      input_to_shortpath="${new_path}.cmd"
21332    else
21333      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
21334$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
21335      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21336$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21337      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21338    fi
21339  else
21340    input_to_shortpath="$new_path"
21341  fi
21342
21343  # Call helper function which possibly converts this using DOS-style short mode.
21344  # If so, the updated path is stored in $new_path.
21345  new_path="$input_to_shortpath"
21346
21347  input_path="$input_to_shortpath"
21348  # Check if we need to convert this using DOS-style short mode. If the path
21349  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21350  # take no chances and rewrite it.
21351  # Note: m4 eats our [], so we need to use [ and ] instead.
21352  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21353  if test "x$has_forbidden_chars" != x; then
21354    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21355    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21356    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21357    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21358      # Going to short mode and back again did indeed matter. Since short mode is
21359      # case insensitive, let's make it lowercase to improve readability.
21360      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21361      # Now convert it back to Unix-stile (cygpath)
21362      input_path=`$CYGPATH -u "$shortmode_path"`
21363      new_path="$input_path"
21364    fi
21365  fi
21366
21367  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21368  if test "x$test_cygdrive_prefix" = x; then
21369    # As a simple fix, exclude /usr/bin since it's not a real path.
21370    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21371      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21372      # a path prefixed by /cygdrive for fixpath to work.
21373      new_path="$CYGWIN_ROOT_PATH$input_path"
21374    fi
21375  fi
21376
21377  # remove trailing .exe if any
21378  new_path="${new_path/%.exe/}"
21379
21380  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21381
21382  # First separate the path from the arguments. This will split at the first
21383  # space.
21384  complete="$PROPER_COMPILER_CXX"
21385  path="${complete%% *}"
21386  tmp="$complete EOL"
21387  arguments="${tmp#* }"
21388
21389  # Input might be given as Windows format, start by converting to
21390  # unix format.
21391  new_path="$path"
21392
21393  windows_path="$new_path"
21394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21395    unix_path=`$CYGPATH -u "$windows_path"`
21396    new_path="$unix_path"
21397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21398    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21399    new_path="$unix_path"
21400  fi
21401
21402
21403  # Now try to locate executable using which
21404  new_path=`$WHICH "$new_path" 2> /dev/null`
21405
21406  if test "x$new_path" = x; then
21407    # Oops. Which didn't find the executable.
21408    # The splitting of arguments from the executable at a space might have been incorrect,
21409    # since paths with space are more likely in Windows. Give it another try with the whole
21410    # argument.
21411    path="$complete"
21412    arguments="EOL"
21413    new_path="$path"
21414
21415  windows_path="$new_path"
21416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21417    unix_path=`$CYGPATH -u "$windows_path"`
21418    new_path="$unix_path"
21419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21420    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21421    new_path="$unix_path"
21422  fi
21423
21424
21425    new_path=`$WHICH "$new_path" 2> /dev/null`
21426
21427    if test "x$new_path" = x; then
21428      # It's still not found. Now this is an unrecoverable error.
21429      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21430$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21431      has_space=`$ECHO "$complete" | $GREP " "`
21432      if test "x$has_space" != x; then
21433        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21434$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21435      fi
21436      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21437    fi
21438  fi
21439
21440  # Now new_path has a complete unix path to the binary
21441  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21442    # Keep paths in /bin as-is, but remove trailing .exe if any
21443    new_path="${new_path/%.exe/}"
21444    # Do not save /bin paths to all_fixpath_prefixes!
21445  else
21446    # Not in mixed or Windows style, start by that.
21447    new_path=`cmd //c echo $new_path`
21448
21449  input_path="$new_path"
21450  # Check if we need to convert this using DOS-style short mode. If the path
21451  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21452  # take no chances and rewrite it.
21453  # Note: m4 eats our [], so we need to use [ and ] instead.
21454  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21455  if test "x$has_forbidden_chars" != x; then
21456    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21457    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21458  fi
21459
21460    # Output is in $new_path
21461
21462  windows_path="$new_path"
21463  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21464    unix_path=`$CYGPATH -u "$windows_path"`
21465    new_path="$unix_path"
21466  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21467    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21468    new_path="$unix_path"
21469  fi
21470
21471    # remove trailing .exe if any
21472    new_path="${new_path/%.exe/}"
21473
21474    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21475    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21476  fi
21477
21478  else
21479    # We're on a posix platform. Hooray! :)
21480    # First separate the path from the arguments. This will split at the first
21481    # space.
21482    complete="$PROPER_COMPILER_CXX"
21483    path="${complete%% *}"
21484    tmp="$complete EOL"
21485    arguments="${tmp#* }"
21486
21487    # Cannot rely on the command "which" here since it doesn't always work.
21488    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21489    if test -z "$is_absolute_path"; then
21490      # Path to executable is not absolute. Find it.
21491      IFS_save="$IFS"
21492      IFS=:
21493      for p in $PATH; do
21494        if test -f "$p/$path" && test -x "$p/$path"; then
21495          new_path="$p/$path"
21496          break
21497        fi
21498      done
21499      IFS="$IFS_save"
21500    else
21501      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
21502$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
21503      new_path="$path"
21504    fi
21505
21506    if test "x$new_path" = x; then
21507      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21508$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21509      has_space=`$ECHO "$complete" | $GREP " "`
21510      if test "x$has_space" != x; then
21511        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21512$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21513      fi
21514      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21515    fi
21516  fi
21517
21518  # Now join together the path and the arguments once again
21519  if test "x$arguments" != xEOL; then
21520    new_complete="$new_path ${arguments% *}"
21521  else
21522    new_complete="$new_path"
21523  fi
21524
21525  if test "x$complete" != "x$new_complete"; then
21526    PROPER_COMPILER_CXX="$new_complete"
21527    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
21528$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
21529  fi
21530
21531    PATH="$RETRY_COMPILER_SAVED_PATH"
21532
21533    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
21534$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
21535
21536  if test "x$OPENJDK_BUILD_OS" != xwindows; then
21537    # Follow a chain of symbolic links. Use readlink
21538    # where it exists, else fall back to horribly
21539    # complicated shell code.
21540    if test "x$READLINK_TESTED" != yes; then
21541      # On MacOSX there is a readlink tool with a different
21542      # purpose than the GNU readlink tool. Check the found readlink.
21543      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21544      if test "x$ISGNU" = x; then
21545        # A readlink that we do not know how to use.
21546        # Are there other non-GNU readlinks out there?
21547        READLINK_TESTED=yes
21548        READLINK=
21549      fi
21550    fi
21551
21552    if test "x$READLINK" != x; then
21553      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21554    else
21555      # Save the current directory for restoring afterwards
21556      STARTDIR=$PWD
21557      COUNTER=0
21558      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21559      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21560      cd $sym_link_dir
21561      # Use -P flag to resolve symlinks in directories.
21562      cd `$THEPWDCMD -P`
21563      sym_link_dir=`$THEPWDCMD -P`
21564      # Resolve file symlinks
21565      while test $COUNTER -lt 20; do
21566        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21567        if test "x$ISLINK" == x; then
21568          # This is not a symbolic link! We are done!
21569          break
21570        fi
21571        # Again resolve directory symlinks since the target of the just found
21572        # link could be in a different directory
21573        cd `$DIRNAME $ISLINK`
21574        sym_link_dir=`$THEPWDCMD -P`
21575        sym_link_file=`$BASENAME $ISLINK`
21576        let COUNTER=COUNTER+1
21577      done
21578      cd $STARTDIR
21579      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21580    fi
21581  fi
21582
21583    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21584$as_echo "$PROPER_COMPILER_CXX" >&6; }
21585    CXX="$PROPER_COMPILER_CXX"
21586  else
21587    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21588$as_echo "no, keeping CXX" >&6; }
21589    CXX="$TEST_COMPILER"
21590  fi
21591
21592  COMPILER=$CXX
21593  COMPILER_NAME=$COMPILER_NAME
21594
21595  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21596    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21597    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21598    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21599    if test $? -ne 0; then
21600      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21601
21602      { $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
21603$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21604      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21605$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21606      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21607    else
21608      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21609      COMPILER_VENDOR="Sun Studio"
21610    fi
21611  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21612    # First line typically looks something like:
21613    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
21614    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
21615    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21616    COMPILER_VENDOR="Microsoft CL.EXE"
21617    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21618    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21619      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21620        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21621      fi
21622    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21623      if test "x$COMPILER_CPU_TEST" != "xx64"; then
21624        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21625      fi
21626    fi
21627  else
21628    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21629    # Check that this is likely to be GCC.
21630    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21631    if test $? -ne 0; then
21632      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21633$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21634      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21635$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21636      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21637    fi
21638
21639    # First line typically looks something like:
21640    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21641    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21642    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21643  fi
21644  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21645  CXX_VERSION="$COMPILER_VERSION"
21646  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21647  CXX_VENDOR="$COMPILER_VENDOR"
21648
21649  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21650$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21651
21652
21653  # Now that we have resolved CXX ourself, let autoconf have its go at it
21654  ac_ext=cpp
21655ac_cpp='$CXXCPP $CPPFLAGS'
21656ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21657ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21658ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21659if test -z "$CXX"; then
21660  if test -n "$CCC"; then
21661    CXX=$CCC
21662  else
21663    if test -n "$ac_tool_prefix"; then
21664  for ac_prog in $CXX
21665  do
21666    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21667set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21669$as_echo_n "checking for $ac_word... " >&6; }
21670if ${ac_cv_prog_CXX+:} false; then :
21671  $as_echo_n "(cached) " >&6
21672else
21673  if test -n "$CXX"; then
21674  ac_cv_prog_CXX="$CXX" # Let the user override the test.
21675else
21676as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21677for as_dir in $PATH
21678do
21679  IFS=$as_save_IFS
21680  test -z "$as_dir" && as_dir=.
21681    for ac_exec_ext in '' $ac_executable_extensions; do
21682  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21683    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21684    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21685    break 2
21686  fi
21687done
21688  done
21689IFS=$as_save_IFS
21690
21691fi
21692fi
21693CXX=$ac_cv_prog_CXX
21694if test -n "$CXX"; then
21695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21696$as_echo "$CXX" >&6; }
21697else
21698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21699$as_echo "no" >&6; }
21700fi
21701
21702
21703    test -n "$CXX" && break
21704  done
21705fi
21706if test -z "$CXX"; then
21707  ac_ct_CXX=$CXX
21708  for ac_prog in $CXX
21709do
21710  # Extract the first word of "$ac_prog", so it can be a program name with args.
21711set dummy $ac_prog; ac_word=$2
21712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21713$as_echo_n "checking for $ac_word... " >&6; }
21714if ${ac_cv_prog_ac_ct_CXX+:} false; then :
21715  $as_echo_n "(cached) " >&6
21716else
21717  if test -n "$ac_ct_CXX"; then
21718  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
21719else
21720as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21721for as_dir in $PATH
21722do
21723  IFS=$as_save_IFS
21724  test -z "$as_dir" && as_dir=.
21725    for ac_exec_ext in '' $ac_executable_extensions; do
21726  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21727    ac_cv_prog_ac_ct_CXX="$ac_prog"
21728    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21729    break 2
21730  fi
21731done
21732  done
21733IFS=$as_save_IFS
21734
21735fi
21736fi
21737ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
21738if test -n "$ac_ct_CXX"; then
21739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
21740$as_echo "$ac_ct_CXX" >&6; }
21741else
21742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21743$as_echo "no" >&6; }
21744fi
21745
21746
21747  test -n "$ac_ct_CXX" && break
21748done
21749
21750  if test "x$ac_ct_CXX" = x; then
21751    CXX="g++"
21752  else
21753    case $cross_compiling:$ac_tool_warned in
21754yes:)
21755{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21756$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21757ac_tool_warned=yes ;;
21758esac
21759    CXX=$ac_ct_CXX
21760  fi
21761fi
21762
21763  fi
21764fi
21765# Provide some information about the compiler.
21766$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
21767set X $ac_compile
21768ac_compiler=$2
21769for ac_option in --version -v -V -qversion; do
21770  { { ac_try="$ac_compiler $ac_option >&5"
21771case "(($ac_try" in
21772  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21773  *) ac_try_echo=$ac_try;;
21774esac
21775eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21776$as_echo "$ac_try_echo"; } >&5
21777  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21778  ac_status=$?
21779  if test -s conftest.err; then
21780    sed '10a\
21781... rest of stderr output deleted ...
21782         10q' conftest.err >conftest.er1
21783    cat conftest.er1 >&5
21784  fi
21785  rm -f conftest.er1 conftest.err
21786  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21787  test $ac_status = 0; }
21788done
21789
21790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
21791$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
21792if ${ac_cv_cxx_compiler_gnu+:} false; then :
21793  $as_echo_n "(cached) " >&6
21794else
21795  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21796/* end confdefs.h.  */
21797
21798int
21799main ()
21800{
21801#ifndef __GNUC__
21802       choke me
21803#endif
21804
21805  ;
21806  return 0;
21807}
21808_ACEOF
21809if ac_fn_cxx_try_compile "$LINENO"; then :
21810  ac_compiler_gnu=yes
21811else
21812  ac_compiler_gnu=no
21813fi
21814rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21815ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
21816
21817fi
21818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
21819$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
21820if test $ac_compiler_gnu = yes; then
21821  GXX=yes
21822else
21823  GXX=
21824fi
21825ac_test_CXXFLAGS=${CXXFLAGS+set}
21826ac_save_CXXFLAGS=$CXXFLAGS
21827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
21828$as_echo_n "checking whether $CXX accepts -g... " >&6; }
21829if ${ac_cv_prog_cxx_g+:} false; then :
21830  $as_echo_n "(cached) " >&6
21831else
21832  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
21833   ac_cxx_werror_flag=yes
21834   ac_cv_prog_cxx_g=no
21835   CXXFLAGS="-g"
21836   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21837/* end confdefs.h.  */
21838
21839int
21840main ()
21841{
21842
21843  ;
21844  return 0;
21845}
21846_ACEOF
21847if ac_fn_cxx_try_compile "$LINENO"; then :
21848  ac_cv_prog_cxx_g=yes
21849else
21850  CXXFLAGS=""
21851      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21852/* end confdefs.h.  */
21853
21854int
21855main ()
21856{
21857
21858  ;
21859  return 0;
21860}
21861_ACEOF
21862if ac_fn_cxx_try_compile "$LINENO"; then :
21863
21864else
21865  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21866	 CXXFLAGS="-g"
21867	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21868/* end confdefs.h.  */
21869
21870int
21871main ()
21872{
21873
21874  ;
21875  return 0;
21876}
21877_ACEOF
21878if ac_fn_cxx_try_compile "$LINENO"; then :
21879  ac_cv_prog_cxx_g=yes
21880fi
21881rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21882fi
21883rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21884fi
21885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21886   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21887fi
21888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
21889$as_echo "$ac_cv_prog_cxx_g" >&6; }
21890if test "$ac_test_CXXFLAGS" = set; then
21891  CXXFLAGS=$ac_save_CXXFLAGS
21892elif test $ac_cv_prog_cxx_g = yes; then
21893  if test "$GXX" = yes; then
21894    CXXFLAGS="-g -O2"
21895  else
21896    CXXFLAGS="-g"
21897  fi
21898else
21899  if test "$GXX" = yes; then
21900    CXXFLAGS="-O2"
21901  else
21902    CXXFLAGS=
21903  fi
21904fi
21905ac_ext=cpp
21906ac_cpp='$CXXCPP $CPPFLAGS'
21907ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21908ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21909ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21910
21911
21912  ### Locate other tools
21913
21914  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21915    ac_ext=m
21916ac_cpp='$OBJCPP $CPPFLAGS'
21917ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21918ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21919ac_compiler_gnu=$ac_cv_objc_compiler_gnu
21920if test -n "$ac_tool_prefix"; then
21921  for ac_prog in gcc objcc objc cc CC
21922  do
21923    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21924set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21926$as_echo_n "checking for $ac_word... " >&6; }
21927if ${ac_cv_prog_OBJC+:} false; then :
21928  $as_echo_n "(cached) " >&6
21929else
21930  if test -n "$OBJC"; then
21931  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
21932else
21933as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21934for as_dir in $PATH
21935do
21936  IFS=$as_save_IFS
21937  test -z "$as_dir" && as_dir=.
21938    for ac_exec_ext in '' $ac_executable_extensions; do
21939  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21940    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
21941    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21942    break 2
21943  fi
21944done
21945  done
21946IFS=$as_save_IFS
21947
21948fi
21949fi
21950OBJC=$ac_cv_prog_OBJC
21951if test -n "$OBJC"; then
21952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
21953$as_echo "$OBJC" >&6; }
21954else
21955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21956$as_echo "no" >&6; }
21957fi
21958
21959
21960    test -n "$OBJC" && break
21961  done
21962fi
21963if test -z "$OBJC"; then
21964  ac_ct_OBJC=$OBJC
21965  for ac_prog in gcc objcc objc cc CC
21966do
21967  # Extract the first word of "$ac_prog", so it can be a program name with args.
21968set dummy $ac_prog; ac_word=$2
21969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21970$as_echo_n "checking for $ac_word... " >&6; }
21971if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
21972  $as_echo_n "(cached) " >&6
21973else
21974  if test -n "$ac_ct_OBJC"; then
21975  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
21976else
21977as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21978for as_dir in $PATH
21979do
21980  IFS=$as_save_IFS
21981  test -z "$as_dir" && as_dir=.
21982    for ac_exec_ext in '' $ac_executable_extensions; do
21983  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21984    ac_cv_prog_ac_ct_OBJC="$ac_prog"
21985    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21986    break 2
21987  fi
21988done
21989  done
21990IFS=$as_save_IFS
21991
21992fi
21993fi
21994ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
21995if test -n "$ac_ct_OBJC"; then
21996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
21997$as_echo "$ac_ct_OBJC" >&6; }
21998else
21999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22000$as_echo "no" >&6; }
22001fi
22002
22003
22004  test -n "$ac_ct_OBJC" && break
22005done
22006
22007  if test "x$ac_ct_OBJC" = x; then
22008    OBJC="gcc"
22009  else
22010    case $cross_compiling:$ac_tool_warned in
22011yes:)
22012{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22013$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22014ac_tool_warned=yes ;;
22015esac
22016    OBJC=$ac_ct_OBJC
22017  fi
22018fi
22019
22020# Provide some information about the compiler.
22021$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
22022set X $ac_compile
22023ac_compiler=$2
22024for ac_option in --version -v -V -qversion; do
22025  { { ac_try="$ac_compiler $ac_option >&5"
22026case "(($ac_try" in
22027  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22028  *) ac_try_echo=$ac_try;;
22029esac
22030eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
22031$as_echo "$ac_try_echo"; } >&5
22032  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
22033  ac_status=$?
22034  if test -s conftest.err; then
22035    sed '10a\
22036... rest of stderr output deleted ...
22037         10q' conftest.err >conftest.er1
22038    cat conftest.er1 >&5
22039  fi
22040  rm -f conftest.er1 conftest.err
22041  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22042  test $ac_status = 0; }
22043done
22044
22045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
22046$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
22047if ${ac_cv_objc_compiler_gnu+:} false; then :
22048  $as_echo_n "(cached) " >&6
22049else
22050  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22051/* end confdefs.h.  */
22052
22053int
22054main ()
22055{
22056#ifndef __GNUC__
22057       choke me
22058#endif
22059
22060  ;
22061  return 0;
22062}
22063_ACEOF
22064if ac_fn_objc_try_compile "$LINENO"; then :
22065  ac_compiler_gnu=yes
22066else
22067  ac_compiler_gnu=no
22068fi
22069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22070ac_cv_objc_compiler_gnu=$ac_compiler_gnu
22071
22072fi
22073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
22074$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
22075if test $ac_compiler_gnu = yes; then
22076  GOBJC=yes
22077else
22078  GOBJC=
22079fi
22080ac_test_OBJCFLAGS=${OBJCFLAGS+set}
22081ac_save_OBJCFLAGS=$OBJCFLAGS
22082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
22083$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
22084if ${ac_cv_prog_objc_g+:} false; then :
22085  $as_echo_n "(cached) " >&6
22086else
22087  ac_save_objc_werror_flag=$ac_objc_werror_flag
22088   ac_objc_werror_flag=yes
22089   ac_cv_prog_objc_g=no
22090   OBJCFLAGS="-g"
22091   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22092/* end confdefs.h.  */
22093
22094int
22095main ()
22096{
22097
22098  ;
22099  return 0;
22100}
22101_ACEOF
22102if ac_fn_objc_try_compile "$LINENO"; then :
22103  ac_cv_prog_objc_g=yes
22104else
22105  OBJCFLAGS=""
22106      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22107/* end confdefs.h.  */
22108
22109int
22110main ()
22111{
22112
22113  ;
22114  return 0;
22115}
22116_ACEOF
22117if ac_fn_objc_try_compile "$LINENO"; then :
22118
22119else
22120  ac_objc_werror_flag=$ac_save_objc_werror_flag
22121	 OBJCFLAGS="-g"
22122	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22123/* end confdefs.h.  */
22124
22125int
22126main ()
22127{
22128
22129  ;
22130  return 0;
22131}
22132_ACEOF
22133if ac_fn_objc_try_compile "$LINENO"; then :
22134  ac_cv_prog_objc_g=yes
22135fi
22136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22137fi
22138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22139fi
22140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22141   ac_objc_werror_flag=$ac_save_objc_werror_flag
22142fi
22143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
22144$as_echo "$ac_cv_prog_objc_g" >&6; }
22145if test "$ac_test_OBJCFLAGS" = set; then
22146  OBJCFLAGS=$ac_save_OBJCFLAGS
22147elif test $ac_cv_prog_objc_g = yes; then
22148  if test "$GOBJC" = yes; then
22149    OBJCFLAGS="-g -O2"
22150  else
22151    OBJCFLAGS="-g"
22152  fi
22153else
22154  if test "$GOBJC" = yes; then
22155    OBJCFLAGS="-O2"
22156  else
22157    OBJCFLAGS=
22158  fi
22159fi
22160ac_ext=cpp
22161ac_cpp='$CXXCPP $CPPFLAGS'
22162ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22163ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22164ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22165
22166
22167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22168
22169  # First separate the path from the arguments. This will split at the first
22170  # space.
22171  complete="$OBJC"
22172  path="${complete%% *}"
22173  tmp="$complete EOL"
22174  arguments="${tmp#* }"
22175
22176  # Input might be given as Windows format, start by converting to
22177  # unix format.
22178  new_path=`$CYGPATH -u "$path"`
22179
22180  # Now try to locate executable using which
22181  new_path=`$WHICH "$new_path" 2> /dev/null`
22182  # bat and cmd files are not always considered executable in cygwin causing which
22183  # to not find them
22184  if test "x$new_path" = x \
22185      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22186      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22187    new_path=`$CYGPATH -u "$path"`
22188  fi
22189  if test "x$new_path" = x; then
22190    # Oops. Which didn't find the executable.
22191    # The splitting of arguments from the executable at a space might have been incorrect,
22192    # since paths with space are more likely in Windows. Give it another try with the whole
22193    # argument.
22194    path="$complete"
22195    arguments="EOL"
22196    new_path=`$CYGPATH -u "$path"`
22197    new_path=`$WHICH "$new_path" 2> /dev/null`
22198    # bat and cmd files are not always considered executable in cygwin causing which
22199    # to not find them
22200    if test "x$new_path" = x \
22201        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22202        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22203      new_path=`$CYGPATH -u "$path"`
22204    fi
22205    if test "x$new_path" = x; then
22206      # It's still not found. Now this is an unrecoverable error.
22207      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22208$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22209      has_space=`$ECHO "$complete" | $GREP " "`
22210      if test "x$has_space" != x; then
22211        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22212$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22213      fi
22214      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22215    fi
22216  fi
22217
22218  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22219  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22220  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22221  # "foo.exe" is OK but "foo" is an error.
22222  #
22223  # This test is therefore slightly more accurate than "test -f" to check for file presence.
22224  # It is also a way to make sure we got the proper file name for the real test later on.
22225  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22226  if test "x$test_shortpath" = x; then
22227    # Short path failed, file does not exist as specified.
22228    # Try adding .exe or .cmd
22229    if test -f "${new_path}.exe"; then
22230      input_to_shortpath="${new_path}.exe"
22231    elif test -f "${new_path}.cmd"; then
22232      input_to_shortpath="${new_path}.cmd"
22233    else
22234      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
22235$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
22236      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22237$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22238      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22239    fi
22240  else
22241    input_to_shortpath="$new_path"
22242  fi
22243
22244  # Call helper function which possibly converts this using DOS-style short mode.
22245  # If so, the updated path is stored in $new_path.
22246  new_path="$input_to_shortpath"
22247
22248  input_path="$input_to_shortpath"
22249  # Check if we need to convert this using DOS-style short mode. If the path
22250  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22251  # take no chances and rewrite it.
22252  # Note: m4 eats our [], so we need to use [ and ] instead.
22253  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22254  if test "x$has_forbidden_chars" != x; then
22255    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22256    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22257    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22258    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22259      # Going to short mode and back again did indeed matter. Since short mode is
22260      # case insensitive, let's make it lowercase to improve readability.
22261      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22262      # Now convert it back to Unix-stile (cygpath)
22263      input_path=`$CYGPATH -u "$shortmode_path"`
22264      new_path="$input_path"
22265    fi
22266  fi
22267
22268  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22269  if test "x$test_cygdrive_prefix" = x; then
22270    # As a simple fix, exclude /usr/bin since it's not a real path.
22271    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22272      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22273      # a path prefixed by /cygdrive for fixpath to work.
22274      new_path="$CYGWIN_ROOT_PATH$input_path"
22275    fi
22276  fi
22277
22278  # remove trailing .exe if any
22279  new_path="${new_path/%.exe/}"
22280
22281  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22282
22283  # First separate the path from the arguments. This will split at the first
22284  # space.
22285  complete="$OBJC"
22286  path="${complete%% *}"
22287  tmp="$complete EOL"
22288  arguments="${tmp#* }"
22289
22290  # Input might be given as Windows format, start by converting to
22291  # unix format.
22292  new_path="$path"
22293
22294  windows_path="$new_path"
22295  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22296    unix_path=`$CYGPATH -u "$windows_path"`
22297    new_path="$unix_path"
22298  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22299    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22300    new_path="$unix_path"
22301  fi
22302
22303
22304  # Now try to locate executable using which
22305  new_path=`$WHICH "$new_path" 2> /dev/null`
22306
22307  if test "x$new_path" = x; then
22308    # Oops. Which didn't find the executable.
22309    # The splitting of arguments from the executable at a space might have been incorrect,
22310    # since paths with space are more likely in Windows. Give it another try with the whole
22311    # argument.
22312    path="$complete"
22313    arguments="EOL"
22314    new_path="$path"
22315
22316  windows_path="$new_path"
22317  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22318    unix_path=`$CYGPATH -u "$windows_path"`
22319    new_path="$unix_path"
22320  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22321    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22322    new_path="$unix_path"
22323  fi
22324
22325
22326    new_path=`$WHICH "$new_path" 2> /dev/null`
22327
22328    if test "x$new_path" = x; then
22329      # It's still not found. Now this is an unrecoverable error.
22330      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22331$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22332      has_space=`$ECHO "$complete" | $GREP " "`
22333      if test "x$has_space" != x; then
22334        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22335$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22336      fi
22337      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22338    fi
22339  fi
22340
22341  # Now new_path has a complete unix path to the binary
22342  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22343    # Keep paths in /bin as-is, but remove trailing .exe if any
22344    new_path="${new_path/%.exe/}"
22345    # Do not save /bin paths to all_fixpath_prefixes!
22346  else
22347    # Not in mixed or Windows style, start by that.
22348    new_path=`cmd //c echo $new_path`
22349
22350  input_path="$new_path"
22351  # Check if we need to convert this using DOS-style short mode. If the path
22352  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22353  # take no chances and rewrite it.
22354  # Note: m4 eats our [], so we need to use [ and ] instead.
22355  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22356  if test "x$has_forbidden_chars" != x; then
22357    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22358    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22359  fi
22360
22361    # Output is in $new_path
22362
22363  windows_path="$new_path"
22364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22365    unix_path=`$CYGPATH -u "$windows_path"`
22366    new_path="$unix_path"
22367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22368    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22369    new_path="$unix_path"
22370  fi
22371
22372    # remove trailing .exe if any
22373    new_path="${new_path/%.exe/}"
22374
22375    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22376    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22377  fi
22378
22379  else
22380    # We're on a posix platform. Hooray! :)
22381    # First separate the path from the arguments. This will split at the first
22382    # space.
22383    complete="$OBJC"
22384    path="${complete%% *}"
22385    tmp="$complete EOL"
22386    arguments="${tmp#* }"
22387
22388    # Cannot rely on the command "which" here since it doesn't always work.
22389    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22390    if test -z "$is_absolute_path"; then
22391      # Path to executable is not absolute. Find it.
22392      IFS_save="$IFS"
22393      IFS=:
22394      for p in $PATH; do
22395        if test -f "$p/$path" && test -x "$p/$path"; then
22396          new_path="$p/$path"
22397          break
22398        fi
22399      done
22400      IFS="$IFS_save"
22401    else
22402      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
22403$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
22404      new_path="$path"
22405    fi
22406
22407    if test "x$new_path" = x; then
22408      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22409$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22410      has_space=`$ECHO "$complete" | $GREP " "`
22411      if test "x$has_space" != x; then
22412        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22413$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22414      fi
22415      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22416    fi
22417  fi
22418
22419  # Now join together the path and the arguments once again
22420  if test "x$arguments" != xEOL; then
22421    new_complete="$new_path ${arguments% *}"
22422  else
22423    new_complete="$new_path"
22424  fi
22425
22426  if test "x$complete" != "x$new_complete"; then
22427    OBJC="$new_complete"
22428    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
22429$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
22430  fi
22431
22432  else
22433    OBJC=
22434  fi
22435
22436  # Restore the flags to the user specified values.
22437  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
22438  CFLAGS="$ORG_CFLAGS"
22439  CXXFLAGS="$ORG_CXXFLAGS"
22440  OBJCFLAGS="$ORG_OBJCFLAGS"
22441
22442  LD="$CC"
22443  LDEXE="$CC"
22444  LDCXX="$CXX"
22445  LDEXECXX="$CXX"
22446
22447  # LDEXE is the linker to use, when creating executables.
22448
22449  # Linking C++ libraries.
22450
22451  # Linking C++ executables.
22452
22453
22454  if test "x$OPENJDK_TARGET_OS" != xwindows; then
22455    if test -n "$ac_tool_prefix"; then
22456  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
22457set dummy ${ac_tool_prefix}ar; ac_word=$2
22458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22459$as_echo_n "checking for $ac_word... " >&6; }
22460if ${ac_cv_prog_AR+:} false; then :
22461  $as_echo_n "(cached) " >&6
22462else
22463  if test -n "$AR"; then
22464  ac_cv_prog_AR="$AR" # Let the user override the test.
22465else
22466as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22467for as_dir in $PATH
22468do
22469  IFS=$as_save_IFS
22470  test -z "$as_dir" && as_dir=.
22471    for ac_exec_ext in '' $ac_executable_extensions; do
22472  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22473    ac_cv_prog_AR="${ac_tool_prefix}ar"
22474    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22475    break 2
22476  fi
22477done
22478  done
22479IFS=$as_save_IFS
22480
22481fi
22482fi
22483AR=$ac_cv_prog_AR
22484if test -n "$AR"; then
22485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
22486$as_echo "$AR" >&6; }
22487else
22488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22489$as_echo "no" >&6; }
22490fi
22491
22492
22493fi
22494if test -z "$ac_cv_prog_AR"; then
22495  ac_ct_AR=$AR
22496  # Extract the first word of "ar", so it can be a program name with args.
22497set dummy ar; ac_word=$2
22498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22499$as_echo_n "checking for $ac_word... " >&6; }
22500if ${ac_cv_prog_ac_ct_AR+:} false; then :
22501  $as_echo_n "(cached) " >&6
22502else
22503  if test -n "$ac_ct_AR"; then
22504  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
22505else
22506as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22507for as_dir in $PATH
22508do
22509  IFS=$as_save_IFS
22510  test -z "$as_dir" && as_dir=.
22511    for ac_exec_ext in '' $ac_executable_extensions; do
22512  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22513    ac_cv_prog_ac_ct_AR="ar"
22514    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22515    break 2
22516  fi
22517done
22518  done
22519IFS=$as_save_IFS
22520
22521fi
22522fi
22523ac_ct_AR=$ac_cv_prog_ac_ct_AR
22524if test -n "$ac_ct_AR"; then
22525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
22526$as_echo "$ac_ct_AR" >&6; }
22527else
22528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22529$as_echo "no" >&6; }
22530fi
22531
22532  if test "x$ac_ct_AR" = x; then
22533    AR=""
22534  else
22535    case $cross_compiling:$ac_tool_warned in
22536yes:)
22537{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22538$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22539ac_tool_warned=yes ;;
22540esac
22541    AR=$ac_ct_AR
22542  fi
22543else
22544  AR="$ac_cv_prog_AR"
22545fi
22546
22547
22548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22549
22550  # First separate the path from the arguments. This will split at the first
22551  # space.
22552  complete="$AR"
22553  path="${complete%% *}"
22554  tmp="$complete EOL"
22555  arguments="${tmp#* }"
22556
22557  # Input might be given as Windows format, start by converting to
22558  # unix format.
22559  new_path=`$CYGPATH -u "$path"`
22560
22561  # Now try to locate executable using which
22562  new_path=`$WHICH "$new_path" 2> /dev/null`
22563  # bat and cmd files are not always considered executable in cygwin causing which
22564  # to not find them
22565  if test "x$new_path" = x \
22566      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22567      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22568    new_path=`$CYGPATH -u "$path"`
22569  fi
22570  if test "x$new_path" = x; then
22571    # Oops. Which didn't find the executable.
22572    # The splitting of arguments from the executable at a space might have been incorrect,
22573    # since paths with space are more likely in Windows. Give it another try with the whole
22574    # argument.
22575    path="$complete"
22576    arguments="EOL"
22577    new_path=`$CYGPATH -u "$path"`
22578    new_path=`$WHICH "$new_path" 2> /dev/null`
22579    # bat and cmd files are not always considered executable in cygwin causing which
22580    # to not find them
22581    if test "x$new_path" = x \
22582        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22583        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22584      new_path=`$CYGPATH -u "$path"`
22585    fi
22586    if test "x$new_path" = x; then
22587      # It's still not found. Now this is an unrecoverable error.
22588      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22589$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22590      has_space=`$ECHO "$complete" | $GREP " "`
22591      if test "x$has_space" != x; then
22592        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22593$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22594      fi
22595      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22596    fi
22597  fi
22598
22599  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22600  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22601  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22602  # "foo.exe" is OK but "foo" is an error.
22603  #
22604  # This test is therefore slightly more accurate than "test -f" to check for file presence.
22605  # It is also a way to make sure we got the proper file name for the real test later on.
22606  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22607  if test "x$test_shortpath" = x; then
22608    # Short path failed, file does not exist as specified.
22609    # Try adding .exe or .cmd
22610    if test -f "${new_path}.exe"; then
22611      input_to_shortpath="${new_path}.exe"
22612    elif test -f "${new_path}.cmd"; then
22613      input_to_shortpath="${new_path}.cmd"
22614    else
22615      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22616$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22617      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22618$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22619      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22620    fi
22621  else
22622    input_to_shortpath="$new_path"
22623  fi
22624
22625  # Call helper function which possibly converts this using DOS-style short mode.
22626  # If so, the updated path is stored in $new_path.
22627  new_path="$input_to_shortpath"
22628
22629  input_path="$input_to_shortpath"
22630  # Check if we need to convert this using DOS-style short mode. If the path
22631  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22632  # take no chances and rewrite it.
22633  # Note: m4 eats our [], so we need to use [ and ] instead.
22634  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22635  if test "x$has_forbidden_chars" != x; then
22636    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22637    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22638    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22639    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22640      # Going to short mode and back again did indeed matter. Since short mode is
22641      # case insensitive, let's make it lowercase to improve readability.
22642      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22643      # Now convert it back to Unix-stile (cygpath)
22644      input_path=`$CYGPATH -u "$shortmode_path"`
22645      new_path="$input_path"
22646    fi
22647  fi
22648
22649  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22650  if test "x$test_cygdrive_prefix" = x; then
22651    # As a simple fix, exclude /usr/bin since it's not a real path.
22652    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22653      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22654      # a path prefixed by /cygdrive for fixpath to work.
22655      new_path="$CYGWIN_ROOT_PATH$input_path"
22656    fi
22657  fi
22658
22659  # remove trailing .exe if any
22660  new_path="${new_path/%.exe/}"
22661
22662  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22663
22664  # First separate the path from the arguments. This will split at the first
22665  # space.
22666  complete="$AR"
22667  path="${complete%% *}"
22668  tmp="$complete EOL"
22669  arguments="${tmp#* }"
22670
22671  # Input might be given as Windows format, start by converting to
22672  # unix format.
22673  new_path="$path"
22674
22675  windows_path="$new_path"
22676  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22677    unix_path=`$CYGPATH -u "$windows_path"`
22678    new_path="$unix_path"
22679  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22680    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22681    new_path="$unix_path"
22682  fi
22683
22684
22685  # Now try to locate executable using which
22686  new_path=`$WHICH "$new_path" 2> /dev/null`
22687
22688  if test "x$new_path" = x; then
22689    # Oops. Which didn't find the executable.
22690    # The splitting of arguments from the executable at a space might have been incorrect,
22691    # since paths with space are more likely in Windows. Give it another try with the whole
22692    # argument.
22693    path="$complete"
22694    arguments="EOL"
22695    new_path="$path"
22696
22697  windows_path="$new_path"
22698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22699    unix_path=`$CYGPATH -u "$windows_path"`
22700    new_path="$unix_path"
22701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22702    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22703    new_path="$unix_path"
22704  fi
22705
22706
22707    new_path=`$WHICH "$new_path" 2> /dev/null`
22708
22709    if test "x$new_path" = x; then
22710      # It's still not found. Now this is an unrecoverable error.
22711      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22712$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22713      has_space=`$ECHO "$complete" | $GREP " "`
22714      if test "x$has_space" != x; then
22715        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22716$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22717      fi
22718      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22719    fi
22720  fi
22721
22722  # Now new_path has a complete unix path to the binary
22723  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22724    # Keep paths in /bin as-is, but remove trailing .exe if any
22725    new_path="${new_path/%.exe/}"
22726    # Do not save /bin paths to all_fixpath_prefixes!
22727  else
22728    # Not in mixed or Windows style, start by that.
22729    new_path=`cmd //c echo $new_path`
22730
22731  input_path="$new_path"
22732  # Check if we need to convert this using DOS-style short mode. If the path
22733  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22734  # take no chances and rewrite it.
22735  # Note: m4 eats our [], so we need to use [ and ] instead.
22736  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22737  if test "x$has_forbidden_chars" != x; then
22738    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22739    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22740  fi
22741
22742    # Output is in $new_path
22743
22744  windows_path="$new_path"
22745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22746    unix_path=`$CYGPATH -u "$windows_path"`
22747    new_path="$unix_path"
22748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22749    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22750    new_path="$unix_path"
22751  fi
22752
22753    # remove trailing .exe if any
22754    new_path="${new_path/%.exe/}"
22755
22756    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22757    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22758  fi
22759
22760  else
22761    # We're on a posix platform. Hooray! :)
22762    # First separate the path from the arguments. This will split at the first
22763    # space.
22764    complete="$AR"
22765    path="${complete%% *}"
22766    tmp="$complete EOL"
22767    arguments="${tmp#* }"
22768
22769    # Cannot rely on the command "which" here since it doesn't always work.
22770    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22771    if test -z "$is_absolute_path"; then
22772      # Path to executable is not absolute. Find it.
22773      IFS_save="$IFS"
22774      IFS=:
22775      for p in $PATH; do
22776        if test -f "$p/$path" && test -x "$p/$path"; then
22777          new_path="$p/$path"
22778          break
22779        fi
22780      done
22781      IFS="$IFS_save"
22782    else
22783      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
22784$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
22785      new_path="$path"
22786    fi
22787
22788    if test "x$new_path" = x; then
22789      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22790$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22791      has_space=`$ECHO "$complete" | $GREP " "`
22792      if test "x$has_space" != x; then
22793        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22794$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22795      fi
22796      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22797    fi
22798  fi
22799
22800  # Now join together the path and the arguments once again
22801  if test "x$arguments" != xEOL; then
22802    new_complete="$new_path ${arguments% *}"
22803  else
22804    new_complete="$new_path"
22805  fi
22806
22807  if test "x$complete" != "x$new_complete"; then
22808    AR="$new_complete"
22809    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
22810$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
22811  fi
22812
22813  fi
22814  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22815    ARFLAGS="-r"
22816  else
22817    ARFLAGS=""
22818  fi
22819
22820
22821  # For hotspot, we need these in Windows mixed path; other platforms keep them the same
22822  HOTSPOT_CXX="$CXX"
22823  HOTSPOT_LD="$LD"
22824
22825
22826
22827  COMPILER_NAME=gcc
22828  COMPILER_TYPE=CC
22829  if test "x$OPENJDK_TARGET_OS" = xwindows; then :
22830
22831    # For now, assume that we are always compiling using cl.exe.
22832    CC_OUT_OPTION=-Fo
22833    EXE_OUT_OPTION=-out:
22834    LD_OUT_OPTION=-out:
22835    AR_OUT_OPTION=-out:
22836    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
22837    # program for something completely different.
22838    # Extract the first word of "link", so it can be a program name with args.
22839set dummy link; ac_word=$2
22840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22841$as_echo_n "checking for $ac_word... " >&6; }
22842if ${ac_cv_prog_WINLD+:} false; then :
22843  $as_echo_n "(cached) " >&6
22844else
22845  if test -n "$WINLD"; then
22846  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
22847else
22848  ac_prog_rejected=no
22849as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22850for as_dir in $PATH
22851do
22852  IFS=$as_save_IFS
22853  test -z "$as_dir" && as_dir=.
22854    for ac_exec_ext in '' $ac_executable_extensions; do
22855  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22856    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
22857       ac_prog_rejected=yes
22858       continue
22859     fi
22860    ac_cv_prog_WINLD="link"
22861    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22862    break 2
22863  fi
22864done
22865  done
22866IFS=$as_save_IFS
22867
22868if test $ac_prog_rejected = yes; then
22869  # We found a bogon in the path, so make sure we never use it.
22870  set dummy $ac_cv_prog_WINLD
22871  shift
22872  if test $# != 0; then
22873    # We chose a different compiler from the bogus one.
22874    # However, it has the same basename, so the bogon will be chosen
22875    # first if we set WINLD to just the basename; use the full file name.
22876    shift
22877    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
22878  fi
22879fi
22880fi
22881fi
22882WINLD=$ac_cv_prog_WINLD
22883if test -n "$WINLD"; then
22884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
22885$as_echo "$WINLD" >&6; }
22886else
22887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22888$as_echo "no" >&6; }
22889fi
22890
22891
22892    # Since we must ignore the first found link, WINLD will contain
22893    # the full path to the link.exe program.
22894
22895  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22896
22897  # First separate the path from the arguments. This will split at the first
22898  # space.
22899  complete="$WINLD"
22900  path="${complete%% *}"
22901  tmp="$complete EOL"
22902  arguments="${tmp#* }"
22903
22904  # Input might be given as Windows format, start by converting to
22905  # unix format.
22906  new_path=`$CYGPATH -u "$path"`
22907
22908  # Now try to locate executable using which
22909  new_path=`$WHICH "$new_path" 2> /dev/null`
22910  # bat and cmd files are not always considered executable in cygwin causing which
22911  # to not find them
22912  if test "x$new_path" = x \
22913      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22914      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22915    new_path=`$CYGPATH -u "$path"`
22916  fi
22917  if test "x$new_path" = x; then
22918    # Oops. Which didn't find the executable.
22919    # The splitting of arguments from the executable at a space might have been incorrect,
22920    # since paths with space are more likely in Windows. Give it another try with the whole
22921    # argument.
22922    path="$complete"
22923    arguments="EOL"
22924    new_path=`$CYGPATH -u "$path"`
22925    new_path=`$WHICH "$new_path" 2> /dev/null`
22926    # bat and cmd files are not always considered executable in cygwin causing which
22927    # to not find them
22928    if test "x$new_path" = x \
22929        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22930        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22931      new_path=`$CYGPATH -u "$path"`
22932    fi
22933    if test "x$new_path" = x; then
22934      # It's still not found. Now this is an unrecoverable error.
22935      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22936$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22937      has_space=`$ECHO "$complete" | $GREP " "`
22938      if test "x$has_space" != x; then
22939        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22940$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22941      fi
22942      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22943    fi
22944  fi
22945
22946  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22947  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22948  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22949  # "foo.exe" is OK but "foo" is an error.
22950  #
22951  # This test is therefore slightly more accurate than "test -f" to check for file presence.
22952  # It is also a way to make sure we got the proper file name for the real test later on.
22953  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22954  if test "x$test_shortpath" = x; then
22955    # Short path failed, file does not exist as specified.
22956    # Try adding .exe or .cmd
22957    if test -f "${new_path}.exe"; then
22958      input_to_shortpath="${new_path}.exe"
22959    elif test -f "${new_path}.cmd"; then
22960      input_to_shortpath="${new_path}.cmd"
22961    else
22962      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
22963$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
22964      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22965$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22966      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22967    fi
22968  else
22969    input_to_shortpath="$new_path"
22970  fi
22971
22972  # Call helper function which possibly converts this using DOS-style short mode.
22973  # If so, the updated path is stored in $new_path.
22974  new_path="$input_to_shortpath"
22975
22976  input_path="$input_to_shortpath"
22977  # Check if we need to convert this using DOS-style short mode. If the path
22978  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22979  # take no chances and rewrite it.
22980  # Note: m4 eats our [], so we need to use [ and ] instead.
22981  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22982  if test "x$has_forbidden_chars" != x; then
22983    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22984    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22985    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22986    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22987      # Going to short mode and back again did indeed matter. Since short mode is
22988      # case insensitive, let's make it lowercase to improve readability.
22989      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22990      # Now convert it back to Unix-stile (cygpath)
22991      input_path=`$CYGPATH -u "$shortmode_path"`
22992      new_path="$input_path"
22993    fi
22994  fi
22995
22996  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22997  if test "x$test_cygdrive_prefix" = x; then
22998    # As a simple fix, exclude /usr/bin since it's not a real path.
22999    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23000      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23001      # a path prefixed by /cygdrive for fixpath to work.
23002      new_path="$CYGWIN_ROOT_PATH$input_path"
23003    fi
23004  fi
23005
23006  # remove trailing .exe if any
23007  new_path="${new_path/%.exe/}"
23008
23009  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23010
23011  # First separate the path from the arguments. This will split at the first
23012  # space.
23013  complete="$WINLD"
23014  path="${complete%% *}"
23015  tmp="$complete EOL"
23016  arguments="${tmp#* }"
23017
23018  # Input might be given as Windows format, start by converting to
23019  # unix format.
23020  new_path="$path"
23021
23022  windows_path="$new_path"
23023  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23024    unix_path=`$CYGPATH -u "$windows_path"`
23025    new_path="$unix_path"
23026  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23027    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23028    new_path="$unix_path"
23029  fi
23030
23031
23032  # Now try to locate executable using which
23033  new_path=`$WHICH "$new_path" 2> /dev/null`
23034
23035  if test "x$new_path" = x; then
23036    # Oops. Which didn't find the executable.
23037    # The splitting of arguments from the executable at a space might have been incorrect,
23038    # since paths with space are more likely in Windows. Give it another try with the whole
23039    # argument.
23040    path="$complete"
23041    arguments="EOL"
23042    new_path="$path"
23043
23044  windows_path="$new_path"
23045  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23046    unix_path=`$CYGPATH -u "$windows_path"`
23047    new_path="$unix_path"
23048  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23049    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23050    new_path="$unix_path"
23051  fi
23052
23053
23054    new_path=`$WHICH "$new_path" 2> /dev/null`
23055
23056    if test "x$new_path" = x; then
23057      # It's still not found. Now this is an unrecoverable error.
23058      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23059$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23060      has_space=`$ECHO "$complete" | $GREP " "`
23061      if test "x$has_space" != x; then
23062        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23063$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23064      fi
23065      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23066    fi
23067  fi
23068
23069  # Now new_path has a complete unix path to the binary
23070  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23071    # Keep paths in /bin as-is, but remove trailing .exe if any
23072    new_path="${new_path/%.exe/}"
23073    # Do not save /bin paths to all_fixpath_prefixes!
23074  else
23075    # Not in mixed or Windows style, start by that.
23076    new_path=`cmd //c echo $new_path`
23077
23078  input_path="$new_path"
23079  # Check if we need to convert this using DOS-style short mode. If the path
23080  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23081  # take no chances and rewrite it.
23082  # Note: m4 eats our [], so we need to use [ and ] instead.
23083  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23084  if test "x$has_forbidden_chars" != x; then
23085    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23086    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23087  fi
23088
23089    # Output is in $new_path
23090
23091  windows_path="$new_path"
23092  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23093    unix_path=`$CYGPATH -u "$windows_path"`
23094    new_path="$unix_path"
23095  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23096    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23097    new_path="$unix_path"
23098  fi
23099
23100    # remove trailing .exe if any
23101    new_path="${new_path/%.exe/}"
23102
23103    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23104    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23105  fi
23106
23107  else
23108    # We're on a posix platform. Hooray! :)
23109    # First separate the path from the arguments. This will split at the first
23110    # space.
23111    complete="$WINLD"
23112    path="${complete%% *}"
23113    tmp="$complete EOL"
23114    arguments="${tmp#* }"
23115
23116    # Cannot rely on the command "which" here since it doesn't always work.
23117    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23118    if test -z "$is_absolute_path"; then
23119      # Path to executable is not absolute. Find it.
23120      IFS_save="$IFS"
23121      IFS=:
23122      for p in $PATH; do
23123        if test -f "$p/$path" && test -x "$p/$path"; then
23124          new_path="$p/$path"
23125          break
23126        fi
23127      done
23128      IFS="$IFS_save"
23129    else
23130      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
23131$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
23132      new_path="$path"
23133    fi
23134
23135    if test "x$new_path" = x; then
23136      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23137$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23138      has_space=`$ECHO "$complete" | $GREP " "`
23139      if test "x$has_space" != x; then
23140        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23141$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23142      fi
23143      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23144    fi
23145  fi
23146
23147  # Now join together the path and the arguments once again
23148  if test "x$arguments" != xEOL; then
23149    new_complete="$new_path ${arguments% *}"
23150  else
23151    new_complete="$new_path"
23152  fi
23153
23154  if test "x$complete" != "x$new_complete"; then
23155    WINLD="$new_complete"
23156    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
23157$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
23158  fi
23159
23160    printf "Windows linker was found at $WINLD\n"
23161    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
23162$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
23163    "$WINLD" --version > /dev/null
23164    if test $? -eq 0 ; then
23165      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23166$as_echo "no" >&6; }
23167      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
23168    else
23169      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23170$as_echo "yes" >&6; }
23171    fi
23172    LD="$WINLD"
23173    LDEXE="$WINLD"
23174    LDCXX="$WINLD"
23175    LDEXECXX="$WINLD"
23176
23177    # Extract the first word of "mt", so it can be a program name with args.
23178set dummy mt; ac_word=$2
23179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23180$as_echo_n "checking for $ac_word... " >&6; }
23181if ${ac_cv_prog_MT+:} false; then :
23182  $as_echo_n "(cached) " >&6
23183else
23184  if test -n "$MT"; then
23185  ac_cv_prog_MT="$MT" # Let the user override the test.
23186else
23187  ac_prog_rejected=no
23188as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23189for as_dir in $PATH
23190do
23191  IFS=$as_save_IFS
23192  test -z "$as_dir" && as_dir=.
23193    for ac_exec_ext in '' $ac_executable_extensions; do
23194  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23195    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
23196       ac_prog_rejected=yes
23197       continue
23198     fi
23199    ac_cv_prog_MT="mt"
23200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23201    break 2
23202  fi
23203done
23204  done
23205IFS=$as_save_IFS
23206
23207if test $ac_prog_rejected = yes; then
23208  # We found a bogon in the path, so make sure we never use it.
23209  set dummy $ac_cv_prog_MT
23210  shift
23211  if test $# != 0; then
23212    # We chose a different compiler from the bogus one.
23213    # However, it has the same basename, so the bogon will be chosen
23214    # first if we set MT to just the basename; use the full file name.
23215    shift
23216    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
23217  fi
23218fi
23219fi
23220fi
23221MT=$ac_cv_prog_MT
23222if test -n "$MT"; then
23223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
23224$as_echo "$MT" >&6; }
23225else
23226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23227$as_echo "no" >&6; }
23228fi
23229
23230
23231
23232  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23233
23234  # First separate the path from the arguments. This will split at the first
23235  # space.
23236  complete="$MT"
23237  path="${complete%% *}"
23238  tmp="$complete EOL"
23239  arguments="${tmp#* }"
23240
23241  # Input might be given as Windows format, start by converting to
23242  # unix format.
23243  new_path=`$CYGPATH -u "$path"`
23244
23245  # Now try to locate executable using which
23246  new_path=`$WHICH "$new_path" 2> /dev/null`
23247  # bat and cmd files are not always considered executable in cygwin causing which
23248  # to not find them
23249  if test "x$new_path" = x \
23250      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23251      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23252    new_path=`$CYGPATH -u "$path"`
23253  fi
23254  if test "x$new_path" = x; then
23255    # Oops. Which didn't find the executable.
23256    # The splitting of arguments from the executable at a space might have been incorrect,
23257    # since paths with space are more likely in Windows. Give it another try with the whole
23258    # argument.
23259    path="$complete"
23260    arguments="EOL"
23261    new_path=`$CYGPATH -u "$path"`
23262    new_path=`$WHICH "$new_path" 2> /dev/null`
23263    # bat and cmd files are not always considered executable in cygwin causing which
23264    # to not find them
23265    if test "x$new_path" = x \
23266        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23267        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23268      new_path=`$CYGPATH -u "$path"`
23269    fi
23270    if test "x$new_path" = x; then
23271      # It's still not found. Now this is an unrecoverable error.
23272      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23273$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23274      has_space=`$ECHO "$complete" | $GREP " "`
23275      if test "x$has_space" != x; then
23276        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23277$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23278      fi
23279      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23280    fi
23281  fi
23282
23283  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23284  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23285  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23286  # "foo.exe" is OK but "foo" is an error.
23287  #
23288  # This test is therefore slightly more accurate than "test -f" to check for file presence.
23289  # It is also a way to make sure we got the proper file name for the real test later on.
23290  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23291  if test "x$test_shortpath" = x; then
23292    # Short path failed, file does not exist as specified.
23293    # Try adding .exe or .cmd
23294    if test -f "${new_path}.exe"; then
23295      input_to_shortpath="${new_path}.exe"
23296    elif test -f "${new_path}.cmd"; then
23297      input_to_shortpath="${new_path}.cmd"
23298    else
23299      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
23300$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
23301      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23302$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23303      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23304    fi
23305  else
23306    input_to_shortpath="$new_path"
23307  fi
23308
23309  # Call helper function which possibly converts this using DOS-style short mode.
23310  # If so, the updated path is stored in $new_path.
23311  new_path="$input_to_shortpath"
23312
23313  input_path="$input_to_shortpath"
23314  # Check if we need to convert this using DOS-style short mode. If the path
23315  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23316  # take no chances and rewrite it.
23317  # Note: m4 eats our [], so we need to use [ and ] instead.
23318  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23319  if test "x$has_forbidden_chars" != x; then
23320    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23321    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23322    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23323    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23324      # Going to short mode and back again did indeed matter. Since short mode is
23325      # case insensitive, let's make it lowercase to improve readability.
23326      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23327      # Now convert it back to Unix-stile (cygpath)
23328      input_path=`$CYGPATH -u "$shortmode_path"`
23329      new_path="$input_path"
23330    fi
23331  fi
23332
23333  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23334  if test "x$test_cygdrive_prefix" = x; then
23335    # As a simple fix, exclude /usr/bin since it's not a real path.
23336    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23337      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23338      # a path prefixed by /cygdrive for fixpath to work.
23339      new_path="$CYGWIN_ROOT_PATH$input_path"
23340    fi
23341  fi
23342
23343  # remove trailing .exe if any
23344  new_path="${new_path/%.exe/}"
23345
23346  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23347
23348  # First separate the path from the arguments. This will split at the first
23349  # space.
23350  complete="$MT"
23351  path="${complete%% *}"
23352  tmp="$complete EOL"
23353  arguments="${tmp#* }"
23354
23355  # Input might be given as Windows format, start by converting to
23356  # unix format.
23357  new_path="$path"
23358
23359  windows_path="$new_path"
23360  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23361    unix_path=`$CYGPATH -u "$windows_path"`
23362    new_path="$unix_path"
23363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23364    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23365    new_path="$unix_path"
23366  fi
23367
23368
23369  # Now try to locate executable using which
23370  new_path=`$WHICH "$new_path" 2> /dev/null`
23371
23372  if test "x$new_path" = x; then
23373    # Oops. Which didn't find the executable.
23374    # The splitting of arguments from the executable at a space might have been incorrect,
23375    # since paths with space are more likely in Windows. Give it another try with the whole
23376    # argument.
23377    path="$complete"
23378    arguments="EOL"
23379    new_path="$path"
23380
23381  windows_path="$new_path"
23382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23383    unix_path=`$CYGPATH -u "$windows_path"`
23384    new_path="$unix_path"
23385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23386    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23387    new_path="$unix_path"
23388  fi
23389
23390
23391    new_path=`$WHICH "$new_path" 2> /dev/null`
23392
23393    if test "x$new_path" = x; then
23394      # It's still not found. Now this is an unrecoverable error.
23395      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23396$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23397      has_space=`$ECHO "$complete" | $GREP " "`
23398      if test "x$has_space" != x; then
23399        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23400$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23401      fi
23402      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23403    fi
23404  fi
23405
23406  # Now new_path has a complete unix path to the binary
23407  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23408    # Keep paths in /bin as-is, but remove trailing .exe if any
23409    new_path="${new_path/%.exe/}"
23410    # Do not save /bin paths to all_fixpath_prefixes!
23411  else
23412    # Not in mixed or Windows style, start by that.
23413    new_path=`cmd //c echo $new_path`
23414
23415  input_path="$new_path"
23416  # Check if we need to convert this using DOS-style short mode. If the path
23417  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23418  # take no chances and rewrite it.
23419  # Note: m4 eats our [], so we need to use [ and ] instead.
23420  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23421  if test "x$has_forbidden_chars" != x; then
23422    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23423    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23424  fi
23425
23426    # Output is in $new_path
23427
23428  windows_path="$new_path"
23429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23430    unix_path=`$CYGPATH -u "$windows_path"`
23431    new_path="$unix_path"
23432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23433    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23434    new_path="$unix_path"
23435  fi
23436
23437    # remove trailing .exe if any
23438    new_path="${new_path/%.exe/}"
23439
23440    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23441    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23442  fi
23443
23444  else
23445    # We're on a posix platform. Hooray! :)
23446    # First separate the path from the arguments. This will split at the first
23447    # space.
23448    complete="$MT"
23449    path="${complete%% *}"
23450    tmp="$complete EOL"
23451    arguments="${tmp#* }"
23452
23453    # Cannot rely on the command "which" here since it doesn't always work.
23454    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23455    if test -z "$is_absolute_path"; then
23456      # Path to executable is not absolute. Find it.
23457      IFS_save="$IFS"
23458      IFS=:
23459      for p in $PATH; do
23460        if test -f "$p/$path" && test -x "$p/$path"; then
23461          new_path="$p/$path"
23462          break
23463        fi
23464      done
23465      IFS="$IFS_save"
23466    else
23467      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
23468$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
23469      new_path="$path"
23470    fi
23471
23472    if test "x$new_path" = x; then
23473      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23474$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23475      has_space=`$ECHO "$complete" | $GREP " "`
23476      if test "x$has_space" != x; then
23477        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23478$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23479      fi
23480      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23481    fi
23482  fi
23483
23484  # Now join together the path and the arguments once again
23485  if test "x$arguments" != xEOL; then
23486    new_complete="$new_path ${arguments% *}"
23487  else
23488    new_complete="$new_path"
23489  fi
23490
23491  if test "x$complete" != "x$new_complete"; then
23492    MT="$new_complete"
23493    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
23494$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
23495  fi
23496
23497    # The resource compiler
23498    # Extract the first word of "rc", so it can be a program name with args.
23499set dummy rc; ac_word=$2
23500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23501$as_echo_n "checking for $ac_word... " >&6; }
23502if ${ac_cv_prog_RC+:} false; then :
23503  $as_echo_n "(cached) " >&6
23504else
23505  if test -n "$RC"; then
23506  ac_cv_prog_RC="$RC" # Let the user override the test.
23507else
23508  ac_prog_rejected=no
23509as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23510for as_dir in $PATH
23511do
23512  IFS=$as_save_IFS
23513  test -z "$as_dir" && as_dir=.
23514    for ac_exec_ext in '' $ac_executable_extensions; do
23515  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23516    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
23517       ac_prog_rejected=yes
23518       continue
23519     fi
23520    ac_cv_prog_RC="rc"
23521    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23522    break 2
23523  fi
23524done
23525  done
23526IFS=$as_save_IFS
23527
23528if test $ac_prog_rejected = yes; then
23529  # We found a bogon in the path, so make sure we never use it.
23530  set dummy $ac_cv_prog_RC
23531  shift
23532  if test $# != 0; then
23533    # We chose a different compiler from the bogus one.
23534    # However, it has the same basename, so the bogon will be chosen
23535    # first if we set RC to just the basename; use the full file name.
23536    shift
23537    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
23538  fi
23539fi
23540fi
23541fi
23542RC=$ac_cv_prog_RC
23543if test -n "$RC"; then
23544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23545$as_echo "$RC" >&6; }
23546else
23547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23548$as_echo "no" >&6; }
23549fi
23550
23551
23552
23553  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23554
23555  # First separate the path from the arguments. This will split at the first
23556  # space.
23557  complete="$RC"
23558  path="${complete%% *}"
23559  tmp="$complete EOL"
23560  arguments="${tmp#* }"
23561
23562  # Input might be given as Windows format, start by converting to
23563  # unix format.
23564  new_path=`$CYGPATH -u "$path"`
23565
23566  # Now try to locate executable using which
23567  new_path=`$WHICH "$new_path" 2> /dev/null`
23568  # bat and cmd files are not always considered executable in cygwin causing which
23569  # to not find them
23570  if test "x$new_path" = x \
23571      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23572      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23573    new_path=`$CYGPATH -u "$path"`
23574  fi
23575  if test "x$new_path" = x; then
23576    # Oops. Which didn't find the executable.
23577    # The splitting of arguments from the executable at a space might have been incorrect,
23578    # since paths with space are more likely in Windows. Give it another try with the whole
23579    # argument.
23580    path="$complete"
23581    arguments="EOL"
23582    new_path=`$CYGPATH -u "$path"`
23583    new_path=`$WHICH "$new_path" 2> /dev/null`
23584    # bat and cmd files are not always considered executable in cygwin causing which
23585    # to not find them
23586    if test "x$new_path" = x \
23587        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23588        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23589      new_path=`$CYGPATH -u "$path"`
23590    fi
23591    if test "x$new_path" = x; then
23592      # It's still not found. Now this is an unrecoverable error.
23593      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23594$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23595      has_space=`$ECHO "$complete" | $GREP " "`
23596      if test "x$has_space" != x; then
23597        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23598$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23599      fi
23600      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23601    fi
23602  fi
23603
23604  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23605  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23606  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23607  # "foo.exe" is OK but "foo" is an error.
23608  #
23609  # This test is therefore slightly more accurate than "test -f" to check for file presence.
23610  # It is also a way to make sure we got the proper file name for the real test later on.
23611  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23612  if test "x$test_shortpath" = x; then
23613    # Short path failed, file does not exist as specified.
23614    # Try adding .exe or .cmd
23615    if test -f "${new_path}.exe"; then
23616      input_to_shortpath="${new_path}.exe"
23617    elif test -f "${new_path}.cmd"; then
23618      input_to_shortpath="${new_path}.cmd"
23619    else
23620      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23621$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23622      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23623$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23624      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23625    fi
23626  else
23627    input_to_shortpath="$new_path"
23628  fi
23629
23630  # Call helper function which possibly converts this using DOS-style short mode.
23631  # If so, the updated path is stored in $new_path.
23632  new_path="$input_to_shortpath"
23633
23634  input_path="$input_to_shortpath"
23635  # Check if we need to convert this using DOS-style short mode. If the path
23636  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23637  # take no chances and rewrite it.
23638  # Note: m4 eats our [], so we need to use [ and ] instead.
23639  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23640  if test "x$has_forbidden_chars" != x; then
23641    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23642    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23643    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23644    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23645      # Going to short mode and back again did indeed matter. Since short mode is
23646      # case insensitive, let's make it lowercase to improve readability.
23647      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23648      # Now convert it back to Unix-stile (cygpath)
23649      input_path=`$CYGPATH -u "$shortmode_path"`
23650      new_path="$input_path"
23651    fi
23652  fi
23653
23654  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23655  if test "x$test_cygdrive_prefix" = x; then
23656    # As a simple fix, exclude /usr/bin since it's not a real path.
23657    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23658      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23659      # a path prefixed by /cygdrive for fixpath to work.
23660      new_path="$CYGWIN_ROOT_PATH$input_path"
23661    fi
23662  fi
23663
23664  # remove trailing .exe if any
23665  new_path="${new_path/%.exe/}"
23666
23667  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23668
23669  # First separate the path from the arguments. This will split at the first
23670  # space.
23671  complete="$RC"
23672  path="${complete%% *}"
23673  tmp="$complete EOL"
23674  arguments="${tmp#* }"
23675
23676  # Input might be given as Windows format, start by converting to
23677  # unix format.
23678  new_path="$path"
23679
23680  windows_path="$new_path"
23681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23682    unix_path=`$CYGPATH -u "$windows_path"`
23683    new_path="$unix_path"
23684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23685    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23686    new_path="$unix_path"
23687  fi
23688
23689
23690  # Now try to locate executable using which
23691  new_path=`$WHICH "$new_path" 2> /dev/null`
23692
23693  if test "x$new_path" = x; then
23694    # Oops. Which didn't find the executable.
23695    # The splitting of arguments from the executable at a space might have been incorrect,
23696    # since paths with space are more likely in Windows. Give it another try with the whole
23697    # argument.
23698    path="$complete"
23699    arguments="EOL"
23700    new_path="$path"
23701
23702  windows_path="$new_path"
23703  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23704    unix_path=`$CYGPATH -u "$windows_path"`
23705    new_path="$unix_path"
23706  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23707    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23708    new_path="$unix_path"
23709  fi
23710
23711
23712    new_path=`$WHICH "$new_path" 2> /dev/null`
23713
23714    if test "x$new_path" = x; then
23715      # It's still not found. Now this is an unrecoverable error.
23716      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23717$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23718      has_space=`$ECHO "$complete" | $GREP " "`
23719      if test "x$has_space" != x; then
23720        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23721$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23722      fi
23723      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23724    fi
23725  fi
23726
23727  # Now new_path has a complete unix path to the binary
23728  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23729    # Keep paths in /bin as-is, but remove trailing .exe if any
23730    new_path="${new_path/%.exe/}"
23731    # Do not save /bin paths to all_fixpath_prefixes!
23732  else
23733    # Not in mixed or Windows style, start by that.
23734    new_path=`cmd //c echo $new_path`
23735
23736  input_path="$new_path"
23737  # Check if we need to convert this using DOS-style short mode. If the path
23738  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23739  # take no chances and rewrite it.
23740  # Note: m4 eats our [], so we need to use [ and ] instead.
23741  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23742  if test "x$has_forbidden_chars" != x; then
23743    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23744    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23745  fi
23746
23747    # Output is in $new_path
23748
23749  windows_path="$new_path"
23750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23751    unix_path=`$CYGPATH -u "$windows_path"`
23752    new_path="$unix_path"
23753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23754    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23755    new_path="$unix_path"
23756  fi
23757
23758    # remove trailing .exe if any
23759    new_path="${new_path/%.exe/}"
23760
23761    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23762    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23763  fi
23764
23765  else
23766    # We're on a posix platform. Hooray! :)
23767    # First separate the path from the arguments. This will split at the first
23768    # space.
23769    complete="$RC"
23770    path="${complete%% *}"
23771    tmp="$complete EOL"
23772    arguments="${tmp#* }"
23773
23774    # Cannot rely on the command "which" here since it doesn't always work.
23775    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23776    if test -z "$is_absolute_path"; then
23777      # Path to executable is not absolute. Find it.
23778      IFS_save="$IFS"
23779      IFS=:
23780      for p in $PATH; do
23781        if test -f "$p/$path" && test -x "$p/$path"; then
23782          new_path="$p/$path"
23783          break
23784        fi
23785      done
23786      IFS="$IFS_save"
23787    else
23788      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
23789$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
23790      new_path="$path"
23791    fi
23792
23793    if test "x$new_path" = x; then
23794      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23795$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23796      has_space=`$ECHO "$complete" | $GREP " "`
23797      if test "x$has_space" != x; then
23798        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23799$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23800      fi
23801      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23802    fi
23803  fi
23804
23805  # Now join together the path and the arguments once again
23806  if test "x$arguments" != xEOL; then
23807    new_complete="$new_path ${arguments% *}"
23808  else
23809    new_complete="$new_path"
23810  fi
23811
23812  if test "x$complete" != "x$new_complete"; then
23813    RC="$new_complete"
23814    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
23815$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
23816  fi
23817
23818
23819    # For hotspot, we need these in Windows mixed path,
23820    # so rewrite them all. Need added .exe suffix.
23821    HOTSPOT_CXX="$CXX.exe"
23822    HOTSPOT_LD="$LD.exe"
23823    HOTSPOT_MT="$MT.exe"
23824    HOTSPOT_RC="$RC.exe"
23825
23826  unix_path="$HOTSPOT_CXX"
23827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23828    windows_path=`$CYGPATH -m "$unix_path"`
23829    HOTSPOT_CXX="$windows_path"
23830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23831    windows_path=`cmd //c echo $unix_path`
23832    HOTSPOT_CXX="$windows_path"
23833  fi
23834
23835
23836  unix_path="$HOTSPOT_LD"
23837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23838    windows_path=`$CYGPATH -m "$unix_path"`
23839    HOTSPOT_LD="$windows_path"
23840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23841    windows_path=`cmd //c echo $unix_path`
23842    HOTSPOT_LD="$windows_path"
23843  fi
23844
23845
23846  unix_path="$HOTSPOT_MT"
23847  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23848    windows_path=`$CYGPATH -m "$unix_path"`
23849    HOTSPOT_MT="$windows_path"
23850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23851    windows_path=`cmd //c echo $unix_path`
23852    HOTSPOT_MT="$windows_path"
23853  fi
23854
23855
23856  unix_path="$HOTSPOT_RC"
23857  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23858    windows_path=`$CYGPATH -m "$unix_path"`
23859    HOTSPOT_RC="$windows_path"
23860  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23861    windows_path=`cmd //c echo $unix_path`
23862    HOTSPOT_RC="$windows_path"
23863  fi
23864
23865
23866
23867
23868    RC_FLAGS="-nologo -l 0x409 -r"
23869    if test "x$VARIANT" = xOPT; then :
23870
23871    RC_FLAGS="$RC_FLAGS -d NDEBUG"
23872
23873fi
23874
23875  # The version variables used to create RC_FLAGS may be overridden
23876  # in a custom configure script, or possibly the command line.
23877  # Let those variables be expanded at make time in spec.gmk.
23878  # The \$ are escaped to the shell, and the $(...) variables
23879  # are evaluated by make.
23880  RC_FLAGS="$RC_FLAGS \
23881      -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
23882      -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
23883      -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
23884      -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
23885      -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
23886      -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
23887      -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
23888
23889  # lib.exe is used to create static libraries.
23890  # Extract the first word of "lib", so it can be a program name with args.
23891set dummy lib; ac_word=$2
23892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23893$as_echo_n "checking for $ac_word... " >&6; }
23894if ${ac_cv_prog_WINAR+:} false; then :
23895  $as_echo_n "(cached) " >&6
23896else
23897  if test -n "$WINAR"; then
23898  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
23899else
23900as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23901for as_dir in $PATH
23902do
23903  IFS=$as_save_IFS
23904  test -z "$as_dir" && as_dir=.
23905    for ac_exec_ext in '' $ac_executable_extensions; do
23906  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23907    ac_cv_prog_WINAR="lib"
23908    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23909    break 2
23910  fi
23911done
23912  done
23913IFS=$as_save_IFS
23914
23915fi
23916fi
23917WINAR=$ac_cv_prog_WINAR
23918if test -n "$WINAR"; then
23919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
23920$as_echo "$WINAR" >&6; }
23921else
23922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23923$as_echo "no" >&6; }
23924fi
23925
23926
23927
23928  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23929
23930  # First separate the path from the arguments. This will split at the first
23931  # space.
23932  complete="$WINAR"
23933  path="${complete%% *}"
23934  tmp="$complete EOL"
23935  arguments="${tmp#* }"
23936
23937  # Input might be given as Windows format, start by converting to
23938  # unix format.
23939  new_path=`$CYGPATH -u "$path"`
23940
23941  # Now try to locate executable using which
23942  new_path=`$WHICH "$new_path" 2> /dev/null`
23943  # bat and cmd files are not always considered executable in cygwin causing which
23944  # to not find them
23945  if test "x$new_path" = x \
23946      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23947      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23948    new_path=`$CYGPATH -u "$path"`
23949  fi
23950  if test "x$new_path" = x; then
23951    # Oops. Which didn't find the executable.
23952    # The splitting of arguments from the executable at a space might have been incorrect,
23953    # since paths with space are more likely in Windows. Give it another try with the whole
23954    # argument.
23955    path="$complete"
23956    arguments="EOL"
23957    new_path=`$CYGPATH -u "$path"`
23958    new_path=`$WHICH "$new_path" 2> /dev/null`
23959    # bat and cmd files are not always considered executable in cygwin causing which
23960    # to not find them
23961    if test "x$new_path" = x \
23962        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23963        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23964      new_path=`$CYGPATH -u "$path"`
23965    fi
23966    if test "x$new_path" = x; then
23967      # It's still not found. Now this is an unrecoverable error.
23968      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23969$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23970      has_space=`$ECHO "$complete" | $GREP " "`
23971      if test "x$has_space" != x; then
23972        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23973$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23974      fi
23975      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23976    fi
23977  fi
23978
23979  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23980  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23981  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23982  # "foo.exe" is OK but "foo" is an error.
23983  #
23984  # This test is therefore slightly more accurate than "test -f" to check for file presence.
23985  # It is also a way to make sure we got the proper file name for the real test later on.
23986  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23987  if test "x$test_shortpath" = x; then
23988    # Short path failed, file does not exist as specified.
23989    # Try adding .exe or .cmd
23990    if test -f "${new_path}.exe"; then
23991      input_to_shortpath="${new_path}.exe"
23992    elif test -f "${new_path}.cmd"; then
23993      input_to_shortpath="${new_path}.cmd"
23994    else
23995      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
23996$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
23997      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23998$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23999      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24000    fi
24001  else
24002    input_to_shortpath="$new_path"
24003  fi
24004
24005  # Call helper function which possibly converts this using DOS-style short mode.
24006  # If so, the updated path is stored in $new_path.
24007  new_path="$input_to_shortpath"
24008
24009  input_path="$input_to_shortpath"
24010  # Check if we need to convert this using DOS-style short mode. If the path
24011  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24012  # take no chances and rewrite it.
24013  # Note: m4 eats our [], so we need to use [ and ] instead.
24014  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24015  if test "x$has_forbidden_chars" != x; then
24016    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24017    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24018    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24019    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24020      # Going to short mode and back again did indeed matter. Since short mode is
24021      # case insensitive, let's make it lowercase to improve readability.
24022      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24023      # Now convert it back to Unix-stile (cygpath)
24024      input_path=`$CYGPATH -u "$shortmode_path"`
24025      new_path="$input_path"
24026    fi
24027  fi
24028
24029  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24030  if test "x$test_cygdrive_prefix" = x; then
24031    # As a simple fix, exclude /usr/bin since it's not a real path.
24032    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24033      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24034      # a path prefixed by /cygdrive for fixpath to work.
24035      new_path="$CYGWIN_ROOT_PATH$input_path"
24036    fi
24037  fi
24038
24039  # remove trailing .exe if any
24040  new_path="${new_path/%.exe/}"
24041
24042  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24043
24044  # First separate the path from the arguments. This will split at the first
24045  # space.
24046  complete="$WINAR"
24047  path="${complete%% *}"
24048  tmp="$complete EOL"
24049  arguments="${tmp#* }"
24050
24051  # Input might be given as Windows format, start by converting to
24052  # unix format.
24053  new_path="$path"
24054
24055  windows_path="$new_path"
24056  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24057    unix_path=`$CYGPATH -u "$windows_path"`
24058    new_path="$unix_path"
24059  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24060    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24061    new_path="$unix_path"
24062  fi
24063
24064
24065  # Now try to locate executable using which
24066  new_path=`$WHICH "$new_path" 2> /dev/null`
24067
24068  if test "x$new_path" = x; then
24069    # Oops. Which didn't find the executable.
24070    # The splitting of arguments from the executable at a space might have been incorrect,
24071    # since paths with space are more likely in Windows. Give it another try with the whole
24072    # argument.
24073    path="$complete"
24074    arguments="EOL"
24075    new_path="$path"
24076
24077  windows_path="$new_path"
24078  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24079    unix_path=`$CYGPATH -u "$windows_path"`
24080    new_path="$unix_path"
24081  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24082    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24083    new_path="$unix_path"
24084  fi
24085
24086
24087    new_path=`$WHICH "$new_path" 2> /dev/null`
24088
24089    if test "x$new_path" = x; then
24090      # It's still not found. Now this is an unrecoverable error.
24091      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24092$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24093      has_space=`$ECHO "$complete" | $GREP " "`
24094      if test "x$has_space" != x; then
24095        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24096$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24097      fi
24098      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24099    fi
24100  fi
24101
24102  # Now new_path has a complete unix path to the binary
24103  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24104    # Keep paths in /bin as-is, but remove trailing .exe if any
24105    new_path="${new_path/%.exe/}"
24106    # Do not save /bin paths to all_fixpath_prefixes!
24107  else
24108    # Not in mixed or Windows style, start by that.
24109    new_path=`cmd //c echo $new_path`
24110
24111  input_path="$new_path"
24112  # Check if we need to convert this using DOS-style short mode. If the path
24113  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24114  # take no chances and rewrite it.
24115  # Note: m4 eats our [], so we need to use [ and ] instead.
24116  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24117  if test "x$has_forbidden_chars" != x; then
24118    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24119    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24120  fi
24121
24122    # Output is in $new_path
24123
24124  windows_path="$new_path"
24125  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24126    unix_path=`$CYGPATH -u "$windows_path"`
24127    new_path="$unix_path"
24128  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24129    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24130    new_path="$unix_path"
24131  fi
24132
24133    # remove trailing .exe if any
24134    new_path="${new_path/%.exe/}"
24135
24136    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24137    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24138  fi
24139
24140  else
24141    # We're on a posix platform. Hooray! :)
24142    # First separate the path from the arguments. This will split at the first
24143    # space.
24144    complete="$WINAR"
24145    path="${complete%% *}"
24146    tmp="$complete EOL"
24147    arguments="${tmp#* }"
24148
24149    # Cannot rely on the command "which" here since it doesn't always work.
24150    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24151    if test -z "$is_absolute_path"; then
24152      # Path to executable is not absolute. Find it.
24153      IFS_save="$IFS"
24154      IFS=:
24155      for p in $PATH; do
24156        if test -f "$p/$path" && test -x "$p/$path"; then
24157          new_path="$p/$path"
24158          break
24159        fi
24160      done
24161      IFS="$IFS_save"
24162    else
24163      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
24164$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
24165      new_path="$path"
24166    fi
24167
24168    if test "x$new_path" = x; then
24169      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24170$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24171      has_space=`$ECHO "$complete" | $GREP " "`
24172      if test "x$has_space" != x; then
24173        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24174$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24175      fi
24176      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24177    fi
24178  fi
24179
24180  # Now join together the path and the arguments once again
24181  if test "x$arguments" != xEOL; then
24182    new_complete="$new_path ${arguments% *}"
24183  else
24184    new_complete="$new_path"
24185  fi
24186
24187  if test "x$complete" != "x$new_complete"; then
24188    WINAR="$new_complete"
24189    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
24190$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
24191  fi
24192
24193  AR="$WINAR"
24194  ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
24195
24196  # Extract the first word of "dumpbin", so it can be a program name with args.
24197set dummy dumpbin; ac_word=$2
24198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24199$as_echo_n "checking for $ac_word... " >&6; }
24200if ${ac_cv_prog_DUMPBIN+:} false; then :
24201  $as_echo_n "(cached) " >&6
24202else
24203  if test -n "$DUMPBIN"; then
24204  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
24205else
24206as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24207for as_dir in $PATH
24208do
24209  IFS=$as_save_IFS
24210  test -z "$as_dir" && as_dir=.
24211    for ac_exec_ext in '' $ac_executable_extensions; do
24212  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24213    ac_cv_prog_DUMPBIN="dumpbin"
24214    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24215    break 2
24216  fi
24217done
24218  done
24219IFS=$as_save_IFS
24220
24221fi
24222fi
24223DUMPBIN=$ac_cv_prog_DUMPBIN
24224if test -n "$DUMPBIN"; then
24225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
24226$as_echo "$DUMPBIN" >&6; }
24227else
24228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24229$as_echo "no" >&6; }
24230fi
24231
24232
24233
24234  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24235
24236  # First separate the path from the arguments. This will split at the first
24237  # space.
24238  complete="$DUMPBIN"
24239  path="${complete%% *}"
24240  tmp="$complete EOL"
24241  arguments="${tmp#* }"
24242
24243  # Input might be given as Windows format, start by converting to
24244  # unix format.
24245  new_path=`$CYGPATH -u "$path"`
24246
24247  # Now try to locate executable using which
24248  new_path=`$WHICH "$new_path" 2> /dev/null`
24249  # bat and cmd files are not always considered executable in cygwin causing which
24250  # to not find them
24251  if test "x$new_path" = x \
24252      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24253      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24254    new_path=`$CYGPATH -u "$path"`
24255  fi
24256  if test "x$new_path" = x; then
24257    # Oops. Which didn't find the executable.
24258    # The splitting of arguments from the executable at a space might have been incorrect,
24259    # since paths with space are more likely in Windows. Give it another try with the whole
24260    # argument.
24261    path="$complete"
24262    arguments="EOL"
24263    new_path=`$CYGPATH -u "$path"`
24264    new_path=`$WHICH "$new_path" 2> /dev/null`
24265    # bat and cmd files are not always considered executable in cygwin causing which
24266    # to not find them
24267    if test "x$new_path" = x \
24268        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24269        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24270      new_path=`$CYGPATH -u "$path"`
24271    fi
24272    if test "x$new_path" = x; then
24273      # It's still not found. Now this is an unrecoverable error.
24274      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24275$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24276      has_space=`$ECHO "$complete" | $GREP " "`
24277      if test "x$has_space" != x; then
24278        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24279$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24280      fi
24281      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24282    fi
24283  fi
24284
24285  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24286  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24287  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24288  # "foo.exe" is OK but "foo" is an error.
24289  #
24290  # This test is therefore slightly more accurate than "test -f" to check for file presence.
24291  # It is also a way to make sure we got the proper file name for the real test later on.
24292  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24293  if test "x$test_shortpath" = x; then
24294    # Short path failed, file does not exist as specified.
24295    # Try adding .exe or .cmd
24296    if test -f "${new_path}.exe"; then
24297      input_to_shortpath="${new_path}.exe"
24298    elif test -f "${new_path}.cmd"; then
24299      input_to_shortpath="${new_path}.cmd"
24300    else
24301      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
24302$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
24303      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24304$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24305      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24306    fi
24307  else
24308    input_to_shortpath="$new_path"
24309  fi
24310
24311  # Call helper function which possibly converts this using DOS-style short mode.
24312  # If so, the updated path is stored in $new_path.
24313  new_path="$input_to_shortpath"
24314
24315  input_path="$input_to_shortpath"
24316  # Check if we need to convert this using DOS-style short mode. If the path
24317  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24318  # take no chances and rewrite it.
24319  # Note: m4 eats our [], so we need to use [ and ] instead.
24320  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24321  if test "x$has_forbidden_chars" != x; then
24322    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24323    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24324    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24325    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24326      # Going to short mode and back again did indeed matter. Since short mode is
24327      # case insensitive, let's make it lowercase to improve readability.
24328      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24329      # Now convert it back to Unix-stile (cygpath)
24330      input_path=`$CYGPATH -u "$shortmode_path"`
24331      new_path="$input_path"
24332    fi
24333  fi
24334
24335  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24336  if test "x$test_cygdrive_prefix" = x; then
24337    # As a simple fix, exclude /usr/bin since it's not a real path.
24338    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24339      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24340      # a path prefixed by /cygdrive for fixpath to work.
24341      new_path="$CYGWIN_ROOT_PATH$input_path"
24342    fi
24343  fi
24344
24345  # remove trailing .exe if any
24346  new_path="${new_path/%.exe/}"
24347
24348  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24349
24350  # First separate the path from the arguments. This will split at the first
24351  # space.
24352  complete="$DUMPBIN"
24353  path="${complete%% *}"
24354  tmp="$complete EOL"
24355  arguments="${tmp#* }"
24356
24357  # Input might be given as Windows format, start by converting to
24358  # unix format.
24359  new_path="$path"
24360
24361  windows_path="$new_path"
24362  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24363    unix_path=`$CYGPATH -u "$windows_path"`
24364    new_path="$unix_path"
24365  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24366    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24367    new_path="$unix_path"
24368  fi
24369
24370
24371  # Now try to locate executable using which
24372  new_path=`$WHICH "$new_path" 2> /dev/null`
24373
24374  if test "x$new_path" = x; then
24375    # Oops. Which didn't find the executable.
24376    # The splitting of arguments from the executable at a space might have been incorrect,
24377    # since paths with space are more likely in Windows. Give it another try with the whole
24378    # argument.
24379    path="$complete"
24380    arguments="EOL"
24381    new_path="$path"
24382
24383  windows_path="$new_path"
24384  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24385    unix_path=`$CYGPATH -u "$windows_path"`
24386    new_path="$unix_path"
24387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24388    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24389    new_path="$unix_path"
24390  fi
24391
24392
24393    new_path=`$WHICH "$new_path" 2> /dev/null`
24394
24395    if test "x$new_path" = x; then
24396      # It's still not found. Now this is an unrecoverable error.
24397      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24398$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24399      has_space=`$ECHO "$complete" | $GREP " "`
24400      if test "x$has_space" != x; then
24401        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24402$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24403      fi
24404      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24405    fi
24406  fi
24407
24408  # Now new_path has a complete unix path to the binary
24409  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24410    # Keep paths in /bin as-is, but remove trailing .exe if any
24411    new_path="${new_path/%.exe/}"
24412    # Do not save /bin paths to all_fixpath_prefixes!
24413  else
24414    # Not in mixed or Windows style, start by that.
24415    new_path=`cmd //c echo $new_path`
24416
24417  input_path="$new_path"
24418  # Check if we need to convert this using DOS-style short mode. If the path
24419  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24420  # take no chances and rewrite it.
24421  # Note: m4 eats our [], so we need to use [ and ] instead.
24422  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24423  if test "x$has_forbidden_chars" != x; then
24424    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24425    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24426  fi
24427
24428    # Output is in $new_path
24429
24430  windows_path="$new_path"
24431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24432    unix_path=`$CYGPATH -u "$windows_path"`
24433    new_path="$unix_path"
24434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24435    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24436    new_path="$unix_path"
24437  fi
24438
24439    # remove trailing .exe if any
24440    new_path="${new_path/%.exe/}"
24441
24442    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24443    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24444  fi
24445
24446  else
24447    # We're on a posix platform. Hooray! :)
24448    # First separate the path from the arguments. This will split at the first
24449    # space.
24450    complete="$DUMPBIN"
24451    path="${complete%% *}"
24452    tmp="$complete EOL"
24453    arguments="${tmp#* }"
24454
24455    # Cannot rely on the command "which" here since it doesn't always work.
24456    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24457    if test -z "$is_absolute_path"; then
24458      # Path to executable is not absolute. Find it.
24459      IFS_save="$IFS"
24460      IFS=:
24461      for p in $PATH; do
24462        if test -f "$p/$path" && test -x "$p/$path"; then
24463          new_path="$p/$path"
24464          break
24465        fi
24466      done
24467      IFS="$IFS_save"
24468    else
24469      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
24470$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
24471      new_path="$path"
24472    fi
24473
24474    if test "x$new_path" = x; then
24475      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24476$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24477      has_space=`$ECHO "$complete" | $GREP " "`
24478      if test "x$has_space" != x; then
24479        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24480$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24481      fi
24482      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24483    fi
24484  fi
24485
24486  # Now join together the path and the arguments once again
24487  if test "x$arguments" != xEOL; then
24488    new_complete="$new_path ${arguments% *}"
24489  else
24490    new_complete="$new_path"
24491  fi
24492
24493  if test "x$complete" != "x$new_complete"; then
24494    DUMPBIN="$new_complete"
24495    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
24496$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
24497  fi
24498
24499
24500      COMPILER_TYPE=CL
24501      CCXXFLAGS="$CCXXFLAGS -nologo"
24502
24503fi
24504
24505
24506
24507  ac_ext=c
24508ac_cpp='$CPP $CPPFLAGS'
24509ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24510ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24511ac_compiler_gnu=$ac_cv_c_compiler_gnu
24512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
24513$as_echo_n "checking how to run the C preprocessor... " >&6; }
24514# On Suns, sometimes $CPP names a directory.
24515if test -n "$CPP" && test -d "$CPP"; then
24516  CPP=
24517fi
24518if test -z "$CPP"; then
24519  if ${ac_cv_prog_CPP+:} false; then :
24520  $as_echo_n "(cached) " >&6
24521else
24522      # Double quotes because CPP needs to be expanded
24523    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
24524    do
24525      ac_preproc_ok=false
24526for ac_c_preproc_warn_flag in '' yes
24527do
24528  # Use a header file that comes with gcc, so configuring glibc
24529  # with a fresh cross-compiler works.
24530  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24531  # <limits.h> exists even on freestanding compilers.
24532  # On the NeXT, cc -E runs the code through the compiler's parser,
24533  # not just through cpp. "Syntax error" is here to catch this case.
24534  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24535/* end confdefs.h.  */
24536#ifdef __STDC__
24537# include <limits.h>
24538#else
24539# include <assert.h>
24540#endif
24541		     Syntax error
24542_ACEOF
24543if ac_fn_c_try_cpp "$LINENO"; then :
24544
24545else
24546  # Broken: fails on valid input.
24547continue
24548fi
24549rm -f conftest.err conftest.i conftest.$ac_ext
24550
24551  # OK, works on sane cases.  Now check whether nonexistent headers
24552  # can be detected and how.
24553  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24554/* end confdefs.h.  */
24555#include <ac_nonexistent.h>
24556_ACEOF
24557if ac_fn_c_try_cpp "$LINENO"; then :
24558  # Broken: success on invalid input.
24559continue
24560else
24561  # Passes both tests.
24562ac_preproc_ok=:
24563break
24564fi
24565rm -f conftest.err conftest.i conftest.$ac_ext
24566
24567done
24568# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24569rm -f conftest.i conftest.err conftest.$ac_ext
24570if $ac_preproc_ok; then :
24571  break
24572fi
24573
24574    done
24575    ac_cv_prog_CPP=$CPP
24576
24577fi
24578  CPP=$ac_cv_prog_CPP
24579else
24580  ac_cv_prog_CPP=$CPP
24581fi
24582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
24583$as_echo "$CPP" >&6; }
24584ac_preproc_ok=false
24585for ac_c_preproc_warn_flag in '' yes
24586do
24587  # Use a header file that comes with gcc, so configuring glibc
24588  # with a fresh cross-compiler works.
24589  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24590  # <limits.h> exists even on freestanding compilers.
24591  # On the NeXT, cc -E runs the code through the compiler's parser,
24592  # not just through cpp. "Syntax error" is here to catch this case.
24593  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24594/* end confdefs.h.  */
24595#ifdef __STDC__
24596# include <limits.h>
24597#else
24598# include <assert.h>
24599#endif
24600		     Syntax error
24601_ACEOF
24602if ac_fn_c_try_cpp "$LINENO"; then :
24603
24604else
24605  # Broken: fails on valid input.
24606continue
24607fi
24608rm -f conftest.err conftest.i conftest.$ac_ext
24609
24610  # OK, works on sane cases.  Now check whether nonexistent headers
24611  # can be detected and how.
24612  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24613/* end confdefs.h.  */
24614#include <ac_nonexistent.h>
24615_ACEOF
24616if ac_fn_c_try_cpp "$LINENO"; then :
24617  # Broken: success on invalid input.
24618continue
24619else
24620  # Passes both tests.
24621ac_preproc_ok=:
24622break
24623fi
24624rm -f conftest.err conftest.i conftest.$ac_ext
24625
24626done
24627# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24628rm -f conftest.i conftest.err conftest.$ac_ext
24629if $ac_preproc_ok; then :
24630
24631else
24632  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24633$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24634as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
24635See \`config.log' for more details" "$LINENO" 5; }
24636fi
24637
24638ac_ext=cpp
24639ac_cpp='$CXXCPP $CPPFLAGS'
24640ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24641ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24642ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24643
24644
24645  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24646
24647  # First separate the path from the arguments. This will split at the first
24648  # space.
24649  complete="$CPP"
24650  path="${complete%% *}"
24651  tmp="$complete EOL"
24652  arguments="${tmp#* }"
24653
24654  # Input might be given as Windows format, start by converting to
24655  # unix format.
24656  new_path=`$CYGPATH -u "$path"`
24657
24658  # Now try to locate executable using which
24659  new_path=`$WHICH "$new_path" 2> /dev/null`
24660  # bat and cmd files are not always considered executable in cygwin causing which
24661  # to not find them
24662  if test "x$new_path" = x \
24663      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24664      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24665    new_path=`$CYGPATH -u "$path"`
24666  fi
24667  if test "x$new_path" = x; then
24668    # Oops. Which didn't find the executable.
24669    # The splitting of arguments from the executable at a space might have been incorrect,
24670    # since paths with space are more likely in Windows. Give it another try with the whole
24671    # argument.
24672    path="$complete"
24673    arguments="EOL"
24674    new_path=`$CYGPATH -u "$path"`
24675    new_path=`$WHICH "$new_path" 2> /dev/null`
24676    # bat and cmd files are not always considered executable in cygwin causing which
24677    # to not find them
24678    if test "x$new_path" = x \
24679        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24680        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24681      new_path=`$CYGPATH -u "$path"`
24682    fi
24683    if test "x$new_path" = x; then
24684      # It's still not found. Now this is an unrecoverable error.
24685      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24686$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24687      has_space=`$ECHO "$complete" | $GREP " "`
24688      if test "x$has_space" != x; then
24689        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24690$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24691      fi
24692      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24693    fi
24694  fi
24695
24696  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24697  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24698  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24699  # "foo.exe" is OK but "foo" is an error.
24700  #
24701  # This test is therefore slightly more accurate than "test -f" to check for file presence.
24702  # It is also a way to make sure we got the proper file name for the real test later on.
24703  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24704  if test "x$test_shortpath" = x; then
24705    # Short path failed, file does not exist as specified.
24706    # Try adding .exe or .cmd
24707    if test -f "${new_path}.exe"; then
24708      input_to_shortpath="${new_path}.exe"
24709    elif test -f "${new_path}.cmd"; then
24710      input_to_shortpath="${new_path}.cmd"
24711    else
24712      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
24713$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
24714      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24715$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24716      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24717    fi
24718  else
24719    input_to_shortpath="$new_path"
24720  fi
24721
24722  # Call helper function which possibly converts this using DOS-style short mode.
24723  # If so, the updated path is stored in $new_path.
24724  new_path="$input_to_shortpath"
24725
24726  input_path="$input_to_shortpath"
24727  # Check if we need to convert this using DOS-style short mode. If the path
24728  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24729  # take no chances and rewrite it.
24730  # Note: m4 eats our [], so we need to use [ and ] instead.
24731  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24732  if test "x$has_forbidden_chars" != x; then
24733    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24734    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24735    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24736    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24737      # Going to short mode and back again did indeed matter. Since short mode is
24738      # case insensitive, let's make it lowercase to improve readability.
24739      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24740      # Now convert it back to Unix-stile (cygpath)
24741      input_path=`$CYGPATH -u "$shortmode_path"`
24742      new_path="$input_path"
24743    fi
24744  fi
24745
24746  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24747  if test "x$test_cygdrive_prefix" = x; then
24748    # As a simple fix, exclude /usr/bin since it's not a real path.
24749    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24750      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24751      # a path prefixed by /cygdrive for fixpath to work.
24752      new_path="$CYGWIN_ROOT_PATH$input_path"
24753    fi
24754  fi
24755
24756  # remove trailing .exe if any
24757  new_path="${new_path/%.exe/}"
24758
24759  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24760
24761  # First separate the path from the arguments. This will split at the first
24762  # space.
24763  complete="$CPP"
24764  path="${complete%% *}"
24765  tmp="$complete EOL"
24766  arguments="${tmp#* }"
24767
24768  # Input might be given as Windows format, start by converting to
24769  # unix format.
24770  new_path="$path"
24771
24772  windows_path="$new_path"
24773  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24774    unix_path=`$CYGPATH -u "$windows_path"`
24775    new_path="$unix_path"
24776  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24777    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24778    new_path="$unix_path"
24779  fi
24780
24781
24782  # Now try to locate executable using which
24783  new_path=`$WHICH "$new_path" 2> /dev/null`
24784
24785  if test "x$new_path" = x; then
24786    # Oops. Which didn't find the executable.
24787    # The splitting of arguments from the executable at a space might have been incorrect,
24788    # since paths with space are more likely in Windows. Give it another try with the whole
24789    # argument.
24790    path="$complete"
24791    arguments="EOL"
24792    new_path="$path"
24793
24794  windows_path="$new_path"
24795  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24796    unix_path=`$CYGPATH -u "$windows_path"`
24797    new_path="$unix_path"
24798  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24799    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24800    new_path="$unix_path"
24801  fi
24802
24803
24804    new_path=`$WHICH "$new_path" 2> /dev/null`
24805
24806    if test "x$new_path" = x; then
24807      # It's still not found. Now this is an unrecoverable error.
24808      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24809$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24810      has_space=`$ECHO "$complete" | $GREP " "`
24811      if test "x$has_space" != x; then
24812        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24813$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24814      fi
24815      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24816    fi
24817  fi
24818
24819  # Now new_path has a complete unix path to the binary
24820  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24821    # Keep paths in /bin as-is, but remove trailing .exe if any
24822    new_path="${new_path/%.exe/}"
24823    # Do not save /bin paths to all_fixpath_prefixes!
24824  else
24825    # Not in mixed or Windows style, start by that.
24826    new_path=`cmd //c echo $new_path`
24827
24828  input_path="$new_path"
24829  # Check if we need to convert this using DOS-style short mode. If the path
24830  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24831  # take no chances and rewrite it.
24832  # Note: m4 eats our [], so we need to use [ and ] instead.
24833  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24834  if test "x$has_forbidden_chars" != x; then
24835    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24836    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24837  fi
24838
24839    # Output is in $new_path
24840
24841  windows_path="$new_path"
24842  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24843    unix_path=`$CYGPATH -u "$windows_path"`
24844    new_path="$unix_path"
24845  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24846    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24847    new_path="$unix_path"
24848  fi
24849
24850    # remove trailing .exe if any
24851    new_path="${new_path/%.exe/}"
24852
24853    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24854    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24855  fi
24856
24857  else
24858    # We're on a posix platform. Hooray! :)
24859    # First separate the path from the arguments. This will split at the first
24860    # space.
24861    complete="$CPP"
24862    path="${complete%% *}"
24863    tmp="$complete EOL"
24864    arguments="${tmp#* }"
24865
24866    # Cannot rely on the command "which" here since it doesn't always work.
24867    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24868    if test -z "$is_absolute_path"; then
24869      # Path to executable is not absolute. Find it.
24870      IFS_save="$IFS"
24871      IFS=:
24872      for p in $PATH; do
24873        if test -f "$p/$path" && test -x "$p/$path"; then
24874          new_path="$p/$path"
24875          break
24876        fi
24877      done
24878      IFS="$IFS_save"
24879    else
24880      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
24881$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
24882      new_path="$path"
24883    fi
24884
24885    if test "x$new_path" = x; then
24886      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24887$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24888      has_space=`$ECHO "$complete" | $GREP " "`
24889      if test "x$has_space" != x; then
24890        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24891$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24892      fi
24893      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24894    fi
24895  fi
24896
24897  # Now join together the path and the arguments once again
24898  if test "x$arguments" != xEOL; then
24899    new_complete="$new_path ${arguments% *}"
24900  else
24901    new_complete="$new_path"
24902  fi
24903
24904  if test "x$complete" != "x$new_complete"; then
24905    CPP="$new_complete"
24906    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
24907$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
24908  fi
24909
24910
24911  ac_ext=cpp
24912ac_cpp='$CXXCPP $CPPFLAGS'
24913ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24914ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24915ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
24917$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
24918if test -z "$CXXCPP"; then
24919  if ${ac_cv_prog_CXXCPP+:} false; then :
24920  $as_echo_n "(cached) " >&6
24921else
24922      # Double quotes because CXXCPP needs to be expanded
24923    for CXXCPP in "$CXX -E" "/lib/cpp"
24924    do
24925      ac_preproc_ok=false
24926for ac_cxx_preproc_warn_flag in '' yes
24927do
24928  # Use a header file that comes with gcc, so configuring glibc
24929  # with a fresh cross-compiler works.
24930  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24931  # <limits.h> exists even on freestanding compilers.
24932  # On the NeXT, cc -E runs the code through the compiler's parser,
24933  # not just through cpp. "Syntax error" is here to catch this case.
24934  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24935/* end confdefs.h.  */
24936#ifdef __STDC__
24937# include <limits.h>
24938#else
24939# include <assert.h>
24940#endif
24941		     Syntax error
24942_ACEOF
24943if ac_fn_cxx_try_cpp "$LINENO"; then :
24944
24945else
24946  # Broken: fails on valid input.
24947continue
24948fi
24949rm -f conftest.err conftest.i conftest.$ac_ext
24950
24951  # OK, works on sane cases.  Now check whether nonexistent headers
24952  # can be detected and how.
24953  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24954/* end confdefs.h.  */
24955#include <ac_nonexistent.h>
24956_ACEOF
24957if ac_fn_cxx_try_cpp "$LINENO"; then :
24958  # Broken: success on invalid input.
24959continue
24960else
24961  # Passes both tests.
24962ac_preproc_ok=:
24963break
24964fi
24965rm -f conftest.err conftest.i conftest.$ac_ext
24966
24967done
24968# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24969rm -f conftest.i conftest.err conftest.$ac_ext
24970if $ac_preproc_ok; then :
24971  break
24972fi
24973
24974    done
24975    ac_cv_prog_CXXCPP=$CXXCPP
24976
24977fi
24978  CXXCPP=$ac_cv_prog_CXXCPP
24979else
24980  ac_cv_prog_CXXCPP=$CXXCPP
24981fi
24982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
24983$as_echo "$CXXCPP" >&6; }
24984ac_preproc_ok=false
24985for ac_cxx_preproc_warn_flag in '' yes
24986do
24987  # Use a header file that comes with gcc, so configuring glibc
24988  # with a fresh cross-compiler works.
24989  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24990  # <limits.h> exists even on freestanding compilers.
24991  # On the NeXT, cc -E runs the code through the compiler's parser,
24992  # not just through cpp. "Syntax error" is here to catch this case.
24993  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24994/* end confdefs.h.  */
24995#ifdef __STDC__
24996# include <limits.h>
24997#else
24998# include <assert.h>
24999#endif
25000		     Syntax error
25001_ACEOF
25002if ac_fn_cxx_try_cpp "$LINENO"; then :
25003
25004else
25005  # Broken: fails on valid input.
25006continue
25007fi
25008rm -f conftest.err conftest.i conftest.$ac_ext
25009
25010  # OK, works on sane cases.  Now check whether nonexistent headers
25011  # can be detected and how.
25012  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25013/* end confdefs.h.  */
25014#include <ac_nonexistent.h>
25015_ACEOF
25016if ac_fn_cxx_try_cpp "$LINENO"; then :
25017  # Broken: success on invalid input.
25018continue
25019else
25020  # Passes both tests.
25021ac_preproc_ok=:
25022break
25023fi
25024rm -f conftest.err conftest.i conftest.$ac_ext
25025
25026done
25027# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25028rm -f conftest.i conftest.err conftest.$ac_ext
25029if $ac_preproc_ok; then :
25030
25031else
25032  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
25033$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25034as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
25035See \`config.log' for more details" "$LINENO" 5; }
25036fi
25037
25038ac_ext=cpp
25039ac_cpp='$CXXCPP $CPPFLAGS'
25040ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25041ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25042ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25043
25044
25045  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25046
25047  # First separate the path from the arguments. This will split at the first
25048  # space.
25049  complete="$CXXCPP"
25050  path="${complete%% *}"
25051  tmp="$complete EOL"
25052  arguments="${tmp#* }"
25053
25054  # Input might be given as Windows format, start by converting to
25055  # unix format.
25056  new_path=`$CYGPATH -u "$path"`
25057
25058  # Now try to locate executable using which
25059  new_path=`$WHICH "$new_path" 2> /dev/null`
25060  # bat and cmd files are not always considered executable in cygwin causing which
25061  # to not find them
25062  if test "x$new_path" = x \
25063      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25064      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25065    new_path=`$CYGPATH -u "$path"`
25066  fi
25067  if test "x$new_path" = x; then
25068    # Oops. Which didn't find the executable.
25069    # The splitting of arguments from the executable at a space might have been incorrect,
25070    # since paths with space are more likely in Windows. Give it another try with the whole
25071    # argument.
25072    path="$complete"
25073    arguments="EOL"
25074    new_path=`$CYGPATH -u "$path"`
25075    new_path=`$WHICH "$new_path" 2> /dev/null`
25076    # bat and cmd files are not always considered executable in cygwin causing which
25077    # to not find them
25078    if test "x$new_path" = x \
25079        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25080        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25081      new_path=`$CYGPATH -u "$path"`
25082    fi
25083    if test "x$new_path" = x; then
25084      # It's still not found. Now this is an unrecoverable error.
25085      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25086$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25087      has_space=`$ECHO "$complete" | $GREP " "`
25088      if test "x$has_space" != x; then
25089        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25090$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25091      fi
25092      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25093    fi
25094  fi
25095
25096  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25097  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25098  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25099  # "foo.exe" is OK but "foo" is an error.
25100  #
25101  # This test is therefore slightly more accurate than "test -f" to check for file presence.
25102  # It is also a way to make sure we got the proper file name for the real test later on.
25103  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25104  if test "x$test_shortpath" = x; then
25105    # Short path failed, file does not exist as specified.
25106    # Try adding .exe or .cmd
25107    if test -f "${new_path}.exe"; then
25108      input_to_shortpath="${new_path}.exe"
25109    elif test -f "${new_path}.cmd"; then
25110      input_to_shortpath="${new_path}.cmd"
25111    else
25112      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
25113$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
25114      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25115$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25116      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25117    fi
25118  else
25119    input_to_shortpath="$new_path"
25120  fi
25121
25122  # Call helper function which possibly converts this using DOS-style short mode.
25123  # If so, the updated path is stored in $new_path.
25124  new_path="$input_to_shortpath"
25125
25126  input_path="$input_to_shortpath"
25127  # Check if we need to convert this using DOS-style short mode. If the path
25128  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25129  # take no chances and rewrite it.
25130  # Note: m4 eats our [], so we need to use [ and ] instead.
25131  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25132  if test "x$has_forbidden_chars" != x; then
25133    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25134    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25135    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25136    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25137      # Going to short mode and back again did indeed matter. Since short mode is
25138      # case insensitive, let's make it lowercase to improve readability.
25139      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25140      # Now convert it back to Unix-stile (cygpath)
25141      input_path=`$CYGPATH -u "$shortmode_path"`
25142      new_path="$input_path"
25143    fi
25144  fi
25145
25146  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25147  if test "x$test_cygdrive_prefix" = x; then
25148    # As a simple fix, exclude /usr/bin since it's not a real path.
25149    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25150      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25151      # a path prefixed by /cygdrive for fixpath to work.
25152      new_path="$CYGWIN_ROOT_PATH$input_path"
25153    fi
25154  fi
25155
25156  # remove trailing .exe if any
25157  new_path="${new_path/%.exe/}"
25158
25159  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25160
25161  # First separate the path from the arguments. This will split at the first
25162  # space.
25163  complete="$CXXCPP"
25164  path="${complete%% *}"
25165  tmp="$complete EOL"
25166  arguments="${tmp#* }"
25167
25168  # Input might be given as Windows format, start by converting to
25169  # unix format.
25170  new_path="$path"
25171
25172  windows_path="$new_path"
25173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25174    unix_path=`$CYGPATH -u "$windows_path"`
25175    new_path="$unix_path"
25176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25177    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25178    new_path="$unix_path"
25179  fi
25180
25181
25182  # Now try to locate executable using which
25183  new_path=`$WHICH "$new_path" 2> /dev/null`
25184
25185  if test "x$new_path" = x; then
25186    # Oops. Which didn't find the executable.
25187    # The splitting of arguments from the executable at a space might have been incorrect,
25188    # since paths with space are more likely in Windows. Give it another try with the whole
25189    # argument.
25190    path="$complete"
25191    arguments="EOL"
25192    new_path="$path"
25193
25194  windows_path="$new_path"
25195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25196    unix_path=`$CYGPATH -u "$windows_path"`
25197    new_path="$unix_path"
25198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25199    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25200    new_path="$unix_path"
25201  fi
25202
25203
25204    new_path=`$WHICH "$new_path" 2> /dev/null`
25205
25206    if test "x$new_path" = x; then
25207      # It's still not found. Now this is an unrecoverable error.
25208      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25209$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25210      has_space=`$ECHO "$complete" | $GREP " "`
25211      if test "x$has_space" != x; then
25212        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25213$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25214      fi
25215      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25216    fi
25217  fi
25218
25219  # Now new_path has a complete unix path to the binary
25220  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25221    # Keep paths in /bin as-is, but remove trailing .exe if any
25222    new_path="${new_path/%.exe/}"
25223    # Do not save /bin paths to all_fixpath_prefixes!
25224  else
25225    # Not in mixed or Windows style, start by that.
25226    new_path=`cmd //c echo $new_path`
25227
25228  input_path="$new_path"
25229  # Check if we need to convert this using DOS-style short mode. If the path
25230  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25231  # take no chances and rewrite it.
25232  # Note: m4 eats our [], so we need to use [ and ] instead.
25233  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25234  if test "x$has_forbidden_chars" != x; then
25235    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25236    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25237  fi
25238
25239    # Output is in $new_path
25240
25241  windows_path="$new_path"
25242  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25243    unix_path=`$CYGPATH -u "$windows_path"`
25244    new_path="$unix_path"
25245  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25246    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25247    new_path="$unix_path"
25248  fi
25249
25250    # remove trailing .exe if any
25251    new_path="${new_path/%.exe/}"
25252
25253    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25254    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25255  fi
25256
25257  else
25258    # We're on a posix platform. Hooray! :)
25259    # First separate the path from the arguments. This will split at the first
25260    # space.
25261    complete="$CXXCPP"
25262    path="${complete%% *}"
25263    tmp="$complete EOL"
25264    arguments="${tmp#* }"
25265
25266    # Cannot rely on the command "which" here since it doesn't always work.
25267    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25268    if test -z "$is_absolute_path"; then
25269      # Path to executable is not absolute. Find it.
25270      IFS_save="$IFS"
25271      IFS=:
25272      for p in $PATH; do
25273        if test -f "$p/$path" && test -x "$p/$path"; then
25274          new_path="$p/$path"
25275          break
25276        fi
25277      done
25278      IFS="$IFS_save"
25279    else
25280      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
25281$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
25282      new_path="$path"
25283    fi
25284
25285    if test "x$new_path" = x; then
25286      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25287$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25288      has_space=`$ECHO "$complete" | $GREP " "`
25289      if test "x$has_space" != x; then
25290        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25291$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25292      fi
25293      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25294    fi
25295  fi
25296
25297  # Now join together the path and the arguments once again
25298  if test "x$arguments" != xEOL; then
25299    new_complete="$new_path ${arguments% *}"
25300  else
25301    new_complete="$new_path"
25302  fi
25303
25304  if test "x$complete" != "x$new_complete"; then
25305    CXXCPP="$new_complete"
25306    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
25307$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
25308  fi
25309
25310
25311  if test "x$COMPILE_TYPE" != "xcross"; then
25312    # If we are not cross compiling, use the same compilers for
25313    # building the build platform executables. The cross-compilation
25314    # case needed to be done earlier, but this can only be done after
25315    # the native tools have been localized.
25316    BUILD_CC="$CC"
25317    BUILD_CXX="$CXX"
25318    BUILD_LD="$LD"
25319  fi
25320
25321  # for solaris we really need solaris tools, and not gnu equivalent
25322  #   these seems to normally reside in /usr/ccs/bin so add that to path before
25323  #   starting to probe
25324  #
25325  #   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
25326  #         so that it can be overriden --with-tools-dir
25327  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
25328    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
25329  fi
25330
25331  # Find the right assembler.
25332  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25333    # Extract the first word of "as", so it can be a program name with args.
25334set dummy as; ac_word=$2
25335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25336$as_echo_n "checking for $ac_word... " >&6; }
25337if ${ac_cv_path_AS+:} false; then :
25338  $as_echo_n "(cached) " >&6
25339else
25340  case $AS in
25341  [\\/]* | ?:[\\/]*)
25342  ac_cv_path_AS="$AS" # Let the user override the test with a path.
25343  ;;
25344  *)
25345  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25346for as_dir in $PATH
25347do
25348  IFS=$as_save_IFS
25349  test -z "$as_dir" && as_dir=.
25350    for ac_exec_ext in '' $ac_executable_extensions; do
25351  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25352    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
25353    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25354    break 2
25355  fi
25356done
25357  done
25358IFS=$as_save_IFS
25359
25360  ;;
25361esac
25362fi
25363AS=$ac_cv_path_AS
25364if test -n "$AS"; then
25365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
25366$as_echo "$AS" >&6; }
25367else
25368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25369$as_echo "no" >&6; }
25370fi
25371
25372
25373
25374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25375
25376  # First separate the path from the arguments. This will split at the first
25377  # space.
25378  complete="$AS"
25379  path="${complete%% *}"
25380  tmp="$complete EOL"
25381  arguments="${tmp#* }"
25382
25383  # Input might be given as Windows format, start by converting to
25384  # unix format.
25385  new_path=`$CYGPATH -u "$path"`
25386
25387  # Now try to locate executable using which
25388  new_path=`$WHICH "$new_path" 2> /dev/null`
25389  # bat and cmd files are not always considered executable in cygwin causing which
25390  # to not find them
25391  if test "x$new_path" = x \
25392      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25393      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25394    new_path=`$CYGPATH -u "$path"`
25395  fi
25396  if test "x$new_path" = x; then
25397    # Oops. Which didn't find the executable.
25398    # The splitting of arguments from the executable at a space might have been incorrect,
25399    # since paths with space are more likely in Windows. Give it another try with the whole
25400    # argument.
25401    path="$complete"
25402    arguments="EOL"
25403    new_path=`$CYGPATH -u "$path"`
25404    new_path=`$WHICH "$new_path" 2> /dev/null`
25405    # bat and cmd files are not always considered executable in cygwin causing which
25406    # to not find them
25407    if test "x$new_path" = x \
25408        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25409        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25410      new_path=`$CYGPATH -u "$path"`
25411    fi
25412    if test "x$new_path" = x; then
25413      # It's still not found. Now this is an unrecoverable error.
25414      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25415$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25416      has_space=`$ECHO "$complete" | $GREP " "`
25417      if test "x$has_space" != x; then
25418        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25419$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25420      fi
25421      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25422    fi
25423  fi
25424
25425  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25426  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25427  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25428  # "foo.exe" is OK but "foo" is an error.
25429  #
25430  # This test is therefore slightly more accurate than "test -f" to check for file presence.
25431  # It is also a way to make sure we got the proper file name for the real test later on.
25432  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25433  if test "x$test_shortpath" = x; then
25434    # Short path failed, file does not exist as specified.
25435    # Try adding .exe or .cmd
25436    if test -f "${new_path}.exe"; then
25437      input_to_shortpath="${new_path}.exe"
25438    elif test -f "${new_path}.cmd"; then
25439      input_to_shortpath="${new_path}.cmd"
25440    else
25441      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
25442$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
25443      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25444$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25445      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25446    fi
25447  else
25448    input_to_shortpath="$new_path"
25449  fi
25450
25451  # Call helper function which possibly converts this using DOS-style short mode.
25452  # If so, the updated path is stored in $new_path.
25453  new_path="$input_to_shortpath"
25454
25455  input_path="$input_to_shortpath"
25456  # Check if we need to convert this using DOS-style short mode. If the path
25457  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25458  # take no chances and rewrite it.
25459  # Note: m4 eats our [], so we need to use [ and ] instead.
25460  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25461  if test "x$has_forbidden_chars" != x; then
25462    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25463    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25464    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25465    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25466      # Going to short mode and back again did indeed matter. Since short mode is
25467      # case insensitive, let's make it lowercase to improve readability.
25468      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25469      # Now convert it back to Unix-stile (cygpath)
25470      input_path=`$CYGPATH -u "$shortmode_path"`
25471      new_path="$input_path"
25472    fi
25473  fi
25474
25475  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25476  if test "x$test_cygdrive_prefix" = x; then
25477    # As a simple fix, exclude /usr/bin since it's not a real path.
25478    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25479      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25480      # a path prefixed by /cygdrive for fixpath to work.
25481      new_path="$CYGWIN_ROOT_PATH$input_path"
25482    fi
25483  fi
25484
25485  # remove trailing .exe if any
25486  new_path="${new_path/%.exe/}"
25487
25488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25489
25490  # First separate the path from the arguments. This will split at the first
25491  # space.
25492  complete="$AS"
25493  path="${complete%% *}"
25494  tmp="$complete EOL"
25495  arguments="${tmp#* }"
25496
25497  # Input might be given as Windows format, start by converting to
25498  # unix format.
25499  new_path="$path"
25500
25501  windows_path="$new_path"
25502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25503    unix_path=`$CYGPATH -u "$windows_path"`
25504    new_path="$unix_path"
25505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25506    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25507    new_path="$unix_path"
25508  fi
25509
25510
25511  # Now try to locate executable using which
25512  new_path=`$WHICH "$new_path" 2> /dev/null`
25513
25514  if test "x$new_path" = x; then
25515    # Oops. Which didn't find the executable.
25516    # The splitting of arguments from the executable at a space might have been incorrect,
25517    # since paths with space are more likely in Windows. Give it another try with the whole
25518    # argument.
25519    path="$complete"
25520    arguments="EOL"
25521    new_path="$path"
25522
25523  windows_path="$new_path"
25524  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25525    unix_path=`$CYGPATH -u "$windows_path"`
25526    new_path="$unix_path"
25527  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25528    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25529    new_path="$unix_path"
25530  fi
25531
25532
25533    new_path=`$WHICH "$new_path" 2> /dev/null`
25534
25535    if test "x$new_path" = x; then
25536      # It's still not found. Now this is an unrecoverable error.
25537      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25538$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25539      has_space=`$ECHO "$complete" | $GREP " "`
25540      if test "x$has_space" != x; then
25541        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25542$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25543      fi
25544      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25545    fi
25546  fi
25547
25548  # Now new_path has a complete unix path to the binary
25549  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25550    # Keep paths in /bin as-is, but remove trailing .exe if any
25551    new_path="${new_path/%.exe/}"
25552    # Do not save /bin paths to all_fixpath_prefixes!
25553  else
25554    # Not in mixed or Windows style, start by that.
25555    new_path=`cmd //c echo $new_path`
25556
25557  input_path="$new_path"
25558  # Check if we need to convert this using DOS-style short mode. If the path
25559  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25560  # take no chances and rewrite it.
25561  # Note: m4 eats our [], so we need to use [ and ] instead.
25562  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25563  if test "x$has_forbidden_chars" != x; then
25564    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25565    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25566  fi
25567
25568    # Output is in $new_path
25569
25570  windows_path="$new_path"
25571  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25572    unix_path=`$CYGPATH -u "$windows_path"`
25573    new_path="$unix_path"
25574  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25575    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25576    new_path="$unix_path"
25577  fi
25578
25579    # remove trailing .exe if any
25580    new_path="${new_path/%.exe/}"
25581
25582    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25583    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25584  fi
25585
25586  else
25587    # We're on a posix platform. Hooray! :)
25588    # First separate the path from the arguments. This will split at the first
25589    # space.
25590    complete="$AS"
25591    path="${complete%% *}"
25592    tmp="$complete EOL"
25593    arguments="${tmp#* }"
25594
25595    # Cannot rely on the command "which" here since it doesn't always work.
25596    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25597    if test -z "$is_absolute_path"; then
25598      # Path to executable is not absolute. Find it.
25599      IFS_save="$IFS"
25600      IFS=:
25601      for p in $PATH; do
25602        if test -f "$p/$path" && test -x "$p/$path"; then
25603          new_path="$p/$path"
25604          break
25605        fi
25606      done
25607      IFS="$IFS_save"
25608    else
25609      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
25610$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
25611      new_path="$path"
25612    fi
25613
25614    if test "x$new_path" = x; then
25615      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25616$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25617      has_space=`$ECHO "$complete" | $GREP " "`
25618      if test "x$has_space" != x; then
25619        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25620$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25621      fi
25622      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25623    fi
25624  fi
25625
25626  # Now join together the path and the arguments once again
25627  if test "x$arguments" != xEOL; then
25628    new_complete="$new_path ${arguments% *}"
25629  else
25630    new_complete="$new_path"
25631  fi
25632
25633  if test "x$complete" != "x$new_complete"; then
25634    AS="$new_complete"
25635    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
25636$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
25637  fi
25638
25639  else
25640    AS="$CC -c"
25641  fi
25642
25643
25644  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25645    # Extract the first word of "nm", so it can be a program name with args.
25646set dummy nm; ac_word=$2
25647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25648$as_echo_n "checking for $ac_word... " >&6; }
25649if ${ac_cv_path_NM+:} false; then :
25650  $as_echo_n "(cached) " >&6
25651else
25652  case $NM in
25653  [\\/]* | ?:[\\/]*)
25654  ac_cv_path_NM="$NM" # Let the user override the test with a path.
25655  ;;
25656  *)
25657  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25658for as_dir in $PATH
25659do
25660  IFS=$as_save_IFS
25661  test -z "$as_dir" && as_dir=.
25662    for ac_exec_ext in '' $ac_executable_extensions; do
25663  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25664    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
25665    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25666    break 2
25667  fi
25668done
25669  done
25670IFS=$as_save_IFS
25671
25672  ;;
25673esac
25674fi
25675NM=$ac_cv_path_NM
25676if test -n "$NM"; then
25677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25678$as_echo "$NM" >&6; }
25679else
25680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25681$as_echo "no" >&6; }
25682fi
25683
25684
25685
25686  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25687
25688  # First separate the path from the arguments. This will split at the first
25689  # space.
25690  complete="$NM"
25691  path="${complete%% *}"
25692  tmp="$complete EOL"
25693  arguments="${tmp#* }"
25694
25695  # Input might be given as Windows format, start by converting to
25696  # unix format.
25697  new_path=`$CYGPATH -u "$path"`
25698
25699  # Now try to locate executable using which
25700  new_path=`$WHICH "$new_path" 2> /dev/null`
25701  # bat and cmd files are not always considered executable in cygwin causing which
25702  # to not find them
25703  if test "x$new_path" = x \
25704      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25705      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25706    new_path=`$CYGPATH -u "$path"`
25707  fi
25708  if test "x$new_path" = x; then
25709    # Oops. Which didn't find the executable.
25710    # The splitting of arguments from the executable at a space might have been incorrect,
25711    # since paths with space are more likely in Windows. Give it another try with the whole
25712    # argument.
25713    path="$complete"
25714    arguments="EOL"
25715    new_path=`$CYGPATH -u "$path"`
25716    new_path=`$WHICH "$new_path" 2> /dev/null`
25717    # bat and cmd files are not always considered executable in cygwin causing which
25718    # to not find them
25719    if test "x$new_path" = x \
25720        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25721        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25722      new_path=`$CYGPATH -u "$path"`
25723    fi
25724    if test "x$new_path" = x; then
25725      # It's still not found. Now this is an unrecoverable error.
25726      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25727$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25728      has_space=`$ECHO "$complete" | $GREP " "`
25729      if test "x$has_space" != x; then
25730        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25731$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25732      fi
25733      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25734    fi
25735  fi
25736
25737  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25738  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25739  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25740  # "foo.exe" is OK but "foo" is an error.
25741  #
25742  # This test is therefore slightly more accurate than "test -f" to check for file presence.
25743  # It is also a way to make sure we got the proper file name for the real test later on.
25744  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25745  if test "x$test_shortpath" = x; then
25746    # Short path failed, file does not exist as specified.
25747    # Try adding .exe or .cmd
25748    if test -f "${new_path}.exe"; then
25749      input_to_shortpath="${new_path}.exe"
25750    elif test -f "${new_path}.cmd"; then
25751      input_to_shortpath="${new_path}.cmd"
25752    else
25753      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25754$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25755      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25756$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25757      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25758    fi
25759  else
25760    input_to_shortpath="$new_path"
25761  fi
25762
25763  # Call helper function which possibly converts this using DOS-style short mode.
25764  # If so, the updated path is stored in $new_path.
25765  new_path="$input_to_shortpath"
25766
25767  input_path="$input_to_shortpath"
25768  # Check if we need to convert this using DOS-style short mode. If the path
25769  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25770  # take no chances and rewrite it.
25771  # Note: m4 eats our [], so we need to use [ and ] instead.
25772  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25773  if test "x$has_forbidden_chars" != x; then
25774    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25775    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25776    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25777    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25778      # Going to short mode and back again did indeed matter. Since short mode is
25779      # case insensitive, let's make it lowercase to improve readability.
25780      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25781      # Now convert it back to Unix-stile (cygpath)
25782      input_path=`$CYGPATH -u "$shortmode_path"`
25783      new_path="$input_path"
25784    fi
25785  fi
25786
25787  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25788  if test "x$test_cygdrive_prefix" = x; then
25789    # As a simple fix, exclude /usr/bin since it's not a real path.
25790    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25791      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25792      # a path prefixed by /cygdrive for fixpath to work.
25793      new_path="$CYGWIN_ROOT_PATH$input_path"
25794    fi
25795  fi
25796
25797  # remove trailing .exe if any
25798  new_path="${new_path/%.exe/}"
25799
25800  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25801
25802  # First separate the path from the arguments. This will split at the first
25803  # space.
25804  complete="$NM"
25805  path="${complete%% *}"
25806  tmp="$complete EOL"
25807  arguments="${tmp#* }"
25808
25809  # Input might be given as Windows format, start by converting to
25810  # unix format.
25811  new_path="$path"
25812
25813  windows_path="$new_path"
25814  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25815    unix_path=`$CYGPATH -u "$windows_path"`
25816    new_path="$unix_path"
25817  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25818    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25819    new_path="$unix_path"
25820  fi
25821
25822
25823  # Now try to locate executable using which
25824  new_path=`$WHICH "$new_path" 2> /dev/null`
25825
25826  if test "x$new_path" = x; then
25827    # Oops. Which didn't find the executable.
25828    # The splitting of arguments from the executable at a space might have been incorrect,
25829    # since paths with space are more likely in Windows. Give it another try with the whole
25830    # argument.
25831    path="$complete"
25832    arguments="EOL"
25833    new_path="$path"
25834
25835  windows_path="$new_path"
25836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25837    unix_path=`$CYGPATH -u "$windows_path"`
25838    new_path="$unix_path"
25839  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25840    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25841    new_path="$unix_path"
25842  fi
25843
25844
25845    new_path=`$WHICH "$new_path" 2> /dev/null`
25846
25847    if test "x$new_path" = x; then
25848      # It's still not found. Now this is an unrecoverable error.
25849      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25850$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25851      has_space=`$ECHO "$complete" | $GREP " "`
25852      if test "x$has_space" != x; then
25853        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25854$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25855      fi
25856      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25857    fi
25858  fi
25859
25860  # Now new_path has a complete unix path to the binary
25861  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25862    # Keep paths in /bin as-is, but remove trailing .exe if any
25863    new_path="${new_path/%.exe/}"
25864    # Do not save /bin paths to all_fixpath_prefixes!
25865  else
25866    # Not in mixed or Windows style, start by that.
25867    new_path=`cmd //c echo $new_path`
25868
25869  input_path="$new_path"
25870  # Check if we need to convert this using DOS-style short mode. If the path
25871  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25872  # take no chances and rewrite it.
25873  # Note: m4 eats our [], so we need to use [ and ] instead.
25874  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25875  if test "x$has_forbidden_chars" != x; then
25876    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25877    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25878  fi
25879
25880    # Output is in $new_path
25881
25882  windows_path="$new_path"
25883  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25884    unix_path=`$CYGPATH -u "$windows_path"`
25885    new_path="$unix_path"
25886  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25887    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25888    new_path="$unix_path"
25889  fi
25890
25891    # remove trailing .exe if any
25892    new_path="${new_path/%.exe/}"
25893
25894    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25895    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25896  fi
25897
25898  else
25899    # We're on a posix platform. Hooray! :)
25900    # First separate the path from the arguments. This will split at the first
25901    # space.
25902    complete="$NM"
25903    path="${complete%% *}"
25904    tmp="$complete EOL"
25905    arguments="${tmp#* }"
25906
25907    # Cannot rely on the command "which" here since it doesn't always work.
25908    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25909    if test -z "$is_absolute_path"; then
25910      # Path to executable is not absolute. Find it.
25911      IFS_save="$IFS"
25912      IFS=:
25913      for p in $PATH; do
25914        if test -f "$p/$path" && test -x "$p/$path"; then
25915          new_path="$p/$path"
25916          break
25917        fi
25918      done
25919      IFS="$IFS_save"
25920    else
25921      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25922$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25923      new_path="$path"
25924    fi
25925
25926    if test "x$new_path" = x; then
25927      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25928$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25929      has_space=`$ECHO "$complete" | $GREP " "`
25930      if test "x$has_space" != x; then
25931        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25932$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25933      fi
25934      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25935    fi
25936  fi
25937
25938  # Now join together the path and the arguments once again
25939  if test "x$arguments" != xEOL; then
25940    new_complete="$new_path ${arguments% *}"
25941  else
25942    new_complete="$new_path"
25943  fi
25944
25945  if test "x$complete" != "x$new_complete"; then
25946    NM="$new_complete"
25947    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25948$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25949  fi
25950
25951    # Extract the first word of "gnm", so it can be a program name with args.
25952set dummy gnm; ac_word=$2
25953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25954$as_echo_n "checking for $ac_word... " >&6; }
25955if ${ac_cv_path_GNM+:} false; then :
25956  $as_echo_n "(cached) " >&6
25957else
25958  case $GNM in
25959  [\\/]* | ?:[\\/]*)
25960  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
25961  ;;
25962  *)
25963  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25964for as_dir in $PATH
25965do
25966  IFS=$as_save_IFS
25967  test -z "$as_dir" && as_dir=.
25968    for ac_exec_ext in '' $ac_executable_extensions; do
25969  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25970    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
25971    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25972    break 2
25973  fi
25974done
25975  done
25976IFS=$as_save_IFS
25977
25978  ;;
25979esac
25980fi
25981GNM=$ac_cv_path_GNM
25982if test -n "$GNM"; then
25983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
25984$as_echo "$GNM" >&6; }
25985else
25986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25987$as_echo "no" >&6; }
25988fi
25989
25990
25991
25992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25993
25994  # First separate the path from the arguments. This will split at the first
25995  # space.
25996  complete="$GNM"
25997  path="${complete%% *}"
25998  tmp="$complete EOL"
25999  arguments="${tmp#* }"
26000
26001  # Input might be given as Windows format, start by converting to
26002  # unix format.
26003  new_path=`$CYGPATH -u "$path"`
26004
26005  # Now try to locate executable using which
26006  new_path=`$WHICH "$new_path" 2> /dev/null`
26007  # bat and cmd files are not always considered executable in cygwin causing which
26008  # to not find them
26009  if test "x$new_path" = x \
26010      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26011      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26012    new_path=`$CYGPATH -u "$path"`
26013  fi
26014  if test "x$new_path" = x; then
26015    # Oops. Which didn't find the executable.
26016    # The splitting of arguments from the executable at a space might have been incorrect,
26017    # since paths with space are more likely in Windows. Give it another try with the whole
26018    # argument.
26019    path="$complete"
26020    arguments="EOL"
26021    new_path=`$CYGPATH -u "$path"`
26022    new_path=`$WHICH "$new_path" 2> /dev/null`
26023    # bat and cmd files are not always considered executable in cygwin causing which
26024    # to not find them
26025    if test "x$new_path" = x \
26026        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26027        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26028      new_path=`$CYGPATH -u "$path"`
26029    fi
26030    if test "x$new_path" = x; then
26031      # It's still not found. Now this is an unrecoverable error.
26032      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26033$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26034      has_space=`$ECHO "$complete" | $GREP " "`
26035      if test "x$has_space" != x; then
26036        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26037$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26038      fi
26039      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26040    fi
26041  fi
26042
26043  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26044  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26045  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26046  # "foo.exe" is OK but "foo" is an error.
26047  #
26048  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26049  # It is also a way to make sure we got the proper file name for the real test later on.
26050  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26051  if test "x$test_shortpath" = x; then
26052    # Short path failed, file does not exist as specified.
26053    # Try adding .exe or .cmd
26054    if test -f "${new_path}.exe"; then
26055      input_to_shortpath="${new_path}.exe"
26056    elif test -f "${new_path}.cmd"; then
26057      input_to_shortpath="${new_path}.cmd"
26058    else
26059      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
26060$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
26061      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26062$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26063      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26064    fi
26065  else
26066    input_to_shortpath="$new_path"
26067  fi
26068
26069  # Call helper function which possibly converts this using DOS-style short mode.
26070  # If so, the updated path is stored in $new_path.
26071  new_path="$input_to_shortpath"
26072
26073  input_path="$input_to_shortpath"
26074  # Check if we need to convert this using DOS-style short mode. If the path
26075  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26076  # take no chances and rewrite it.
26077  # Note: m4 eats our [], so we need to use [ and ] instead.
26078  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26079  if test "x$has_forbidden_chars" != x; then
26080    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26081    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26082    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26083    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26084      # Going to short mode and back again did indeed matter. Since short mode is
26085      # case insensitive, let's make it lowercase to improve readability.
26086      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26087      # Now convert it back to Unix-stile (cygpath)
26088      input_path=`$CYGPATH -u "$shortmode_path"`
26089      new_path="$input_path"
26090    fi
26091  fi
26092
26093  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26094  if test "x$test_cygdrive_prefix" = x; then
26095    # As a simple fix, exclude /usr/bin since it's not a real path.
26096    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26097      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26098      # a path prefixed by /cygdrive for fixpath to work.
26099      new_path="$CYGWIN_ROOT_PATH$input_path"
26100    fi
26101  fi
26102
26103  # remove trailing .exe if any
26104  new_path="${new_path/%.exe/}"
26105
26106  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26107
26108  # First separate the path from the arguments. This will split at the first
26109  # space.
26110  complete="$GNM"
26111  path="${complete%% *}"
26112  tmp="$complete EOL"
26113  arguments="${tmp#* }"
26114
26115  # Input might be given as Windows format, start by converting to
26116  # unix format.
26117  new_path="$path"
26118
26119  windows_path="$new_path"
26120  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26121    unix_path=`$CYGPATH -u "$windows_path"`
26122    new_path="$unix_path"
26123  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26124    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26125    new_path="$unix_path"
26126  fi
26127
26128
26129  # Now try to locate executable using which
26130  new_path=`$WHICH "$new_path" 2> /dev/null`
26131
26132  if test "x$new_path" = x; then
26133    # Oops. Which didn't find the executable.
26134    # The splitting of arguments from the executable at a space might have been incorrect,
26135    # since paths with space are more likely in Windows. Give it another try with the whole
26136    # argument.
26137    path="$complete"
26138    arguments="EOL"
26139    new_path="$path"
26140
26141  windows_path="$new_path"
26142  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26143    unix_path=`$CYGPATH -u "$windows_path"`
26144    new_path="$unix_path"
26145  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26146    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26147    new_path="$unix_path"
26148  fi
26149
26150
26151    new_path=`$WHICH "$new_path" 2> /dev/null`
26152
26153    if test "x$new_path" = x; then
26154      # It's still not found. Now this is an unrecoverable error.
26155      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26156$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26157      has_space=`$ECHO "$complete" | $GREP " "`
26158      if test "x$has_space" != x; then
26159        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26160$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26161      fi
26162      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26163    fi
26164  fi
26165
26166  # Now new_path has a complete unix path to the binary
26167  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26168    # Keep paths in /bin as-is, but remove trailing .exe if any
26169    new_path="${new_path/%.exe/}"
26170    # Do not save /bin paths to all_fixpath_prefixes!
26171  else
26172    # Not in mixed or Windows style, start by that.
26173    new_path=`cmd //c echo $new_path`
26174
26175  input_path="$new_path"
26176  # Check if we need to convert this using DOS-style short mode. If the path
26177  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26178  # take no chances and rewrite it.
26179  # Note: m4 eats our [], so we need to use [ and ] instead.
26180  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26181  if test "x$has_forbidden_chars" != x; then
26182    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26183    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26184  fi
26185
26186    # Output is in $new_path
26187
26188  windows_path="$new_path"
26189  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26190    unix_path=`$CYGPATH -u "$windows_path"`
26191    new_path="$unix_path"
26192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26193    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26194    new_path="$unix_path"
26195  fi
26196
26197    # remove trailing .exe if any
26198    new_path="${new_path/%.exe/}"
26199
26200    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26201    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26202  fi
26203
26204  else
26205    # We're on a posix platform. Hooray! :)
26206    # First separate the path from the arguments. This will split at the first
26207    # space.
26208    complete="$GNM"
26209    path="${complete%% *}"
26210    tmp="$complete EOL"
26211    arguments="${tmp#* }"
26212
26213    # Cannot rely on the command "which" here since it doesn't always work.
26214    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26215    if test -z "$is_absolute_path"; then
26216      # Path to executable is not absolute. Find it.
26217      IFS_save="$IFS"
26218      IFS=:
26219      for p in $PATH; do
26220        if test -f "$p/$path" && test -x "$p/$path"; then
26221          new_path="$p/$path"
26222          break
26223        fi
26224      done
26225      IFS="$IFS_save"
26226    else
26227      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving GNM (as $path) failed, using $path directly." >&5
26228$as_echo "$as_me: Resolving GNM (as $path) failed, using $path directly." >&6;}
26229      new_path="$path"
26230    fi
26231
26232    if test "x$new_path" = x; then
26233      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26234$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26235      has_space=`$ECHO "$complete" | $GREP " "`
26236      if test "x$has_space" != x; then
26237        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26238$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26239      fi
26240      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26241    fi
26242  fi
26243
26244  # Now join together the path and the arguments once again
26245  if test "x$arguments" != xEOL; then
26246    new_complete="$new_path ${arguments% *}"
26247  else
26248    new_complete="$new_path"
26249  fi
26250
26251  if test "x$complete" != "x$new_complete"; then
26252    GNM="$new_complete"
26253    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
26254$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
26255  fi
26256
26257    # Extract the first word of "strip", so it can be a program name with args.
26258set dummy strip; ac_word=$2
26259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26260$as_echo_n "checking for $ac_word... " >&6; }
26261if ${ac_cv_path_STRIP+:} false; then :
26262  $as_echo_n "(cached) " >&6
26263else
26264  case $STRIP in
26265  [\\/]* | ?:[\\/]*)
26266  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
26267  ;;
26268  *)
26269  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26270for as_dir in $PATH
26271do
26272  IFS=$as_save_IFS
26273  test -z "$as_dir" && as_dir=.
26274    for ac_exec_ext in '' $ac_executable_extensions; do
26275  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26276    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
26277    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26278    break 2
26279  fi
26280done
26281  done
26282IFS=$as_save_IFS
26283
26284  ;;
26285esac
26286fi
26287STRIP=$ac_cv_path_STRIP
26288if test -n "$STRIP"; then
26289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
26290$as_echo "$STRIP" >&6; }
26291else
26292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26293$as_echo "no" >&6; }
26294fi
26295
26296
26297
26298  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26299
26300  # First separate the path from the arguments. This will split at the first
26301  # space.
26302  complete="$STRIP"
26303  path="${complete%% *}"
26304  tmp="$complete EOL"
26305  arguments="${tmp#* }"
26306
26307  # Input might be given as Windows format, start by converting to
26308  # unix format.
26309  new_path=`$CYGPATH -u "$path"`
26310
26311  # Now try to locate executable using which
26312  new_path=`$WHICH "$new_path" 2> /dev/null`
26313  # bat and cmd files are not always considered executable in cygwin causing which
26314  # to not find them
26315  if test "x$new_path" = x \
26316      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26317      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26318    new_path=`$CYGPATH -u "$path"`
26319  fi
26320  if test "x$new_path" = x; then
26321    # Oops. Which didn't find the executable.
26322    # The splitting of arguments from the executable at a space might have been incorrect,
26323    # since paths with space are more likely in Windows. Give it another try with the whole
26324    # argument.
26325    path="$complete"
26326    arguments="EOL"
26327    new_path=`$CYGPATH -u "$path"`
26328    new_path=`$WHICH "$new_path" 2> /dev/null`
26329    # bat and cmd files are not always considered executable in cygwin causing which
26330    # to not find them
26331    if test "x$new_path" = x \
26332        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26333        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26334      new_path=`$CYGPATH -u "$path"`
26335    fi
26336    if test "x$new_path" = x; then
26337      # It's still not found. Now this is an unrecoverable error.
26338      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26339$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26340      has_space=`$ECHO "$complete" | $GREP " "`
26341      if test "x$has_space" != x; then
26342        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26343$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26344      fi
26345      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26346    fi
26347  fi
26348
26349  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26350  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26351  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26352  # "foo.exe" is OK but "foo" is an error.
26353  #
26354  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26355  # It is also a way to make sure we got the proper file name for the real test later on.
26356  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26357  if test "x$test_shortpath" = x; then
26358    # Short path failed, file does not exist as specified.
26359    # Try adding .exe or .cmd
26360    if test -f "${new_path}.exe"; then
26361      input_to_shortpath="${new_path}.exe"
26362    elif test -f "${new_path}.cmd"; then
26363      input_to_shortpath="${new_path}.cmd"
26364    else
26365      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26366$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26367      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26368$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26369      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26370    fi
26371  else
26372    input_to_shortpath="$new_path"
26373  fi
26374
26375  # Call helper function which possibly converts this using DOS-style short mode.
26376  # If so, the updated path is stored in $new_path.
26377  new_path="$input_to_shortpath"
26378
26379  input_path="$input_to_shortpath"
26380  # Check if we need to convert this using DOS-style short mode. If the path
26381  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26382  # take no chances and rewrite it.
26383  # Note: m4 eats our [], so we need to use [ and ] instead.
26384  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26385  if test "x$has_forbidden_chars" != x; then
26386    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26387    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26388    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26389    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26390      # Going to short mode and back again did indeed matter. Since short mode is
26391      # case insensitive, let's make it lowercase to improve readability.
26392      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26393      # Now convert it back to Unix-stile (cygpath)
26394      input_path=`$CYGPATH -u "$shortmode_path"`
26395      new_path="$input_path"
26396    fi
26397  fi
26398
26399  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26400  if test "x$test_cygdrive_prefix" = x; then
26401    # As a simple fix, exclude /usr/bin since it's not a real path.
26402    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26403      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26404      # a path prefixed by /cygdrive for fixpath to work.
26405      new_path="$CYGWIN_ROOT_PATH$input_path"
26406    fi
26407  fi
26408
26409  # remove trailing .exe if any
26410  new_path="${new_path/%.exe/}"
26411
26412  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26413
26414  # First separate the path from the arguments. This will split at the first
26415  # space.
26416  complete="$STRIP"
26417  path="${complete%% *}"
26418  tmp="$complete EOL"
26419  arguments="${tmp#* }"
26420
26421  # Input might be given as Windows format, start by converting to
26422  # unix format.
26423  new_path="$path"
26424
26425  windows_path="$new_path"
26426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26427    unix_path=`$CYGPATH -u "$windows_path"`
26428    new_path="$unix_path"
26429  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26430    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26431    new_path="$unix_path"
26432  fi
26433
26434
26435  # Now try to locate executable using which
26436  new_path=`$WHICH "$new_path" 2> /dev/null`
26437
26438  if test "x$new_path" = x; then
26439    # Oops. Which didn't find the executable.
26440    # The splitting of arguments from the executable at a space might have been incorrect,
26441    # since paths with space are more likely in Windows. Give it another try with the whole
26442    # argument.
26443    path="$complete"
26444    arguments="EOL"
26445    new_path="$path"
26446
26447  windows_path="$new_path"
26448  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26449    unix_path=`$CYGPATH -u "$windows_path"`
26450    new_path="$unix_path"
26451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26452    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26453    new_path="$unix_path"
26454  fi
26455
26456
26457    new_path=`$WHICH "$new_path" 2> /dev/null`
26458
26459    if test "x$new_path" = x; then
26460      # It's still not found. Now this is an unrecoverable error.
26461      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26462$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26463      has_space=`$ECHO "$complete" | $GREP " "`
26464      if test "x$has_space" != x; then
26465        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26466$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26467      fi
26468      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26469    fi
26470  fi
26471
26472  # Now new_path has a complete unix path to the binary
26473  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26474    # Keep paths in /bin as-is, but remove trailing .exe if any
26475    new_path="${new_path/%.exe/}"
26476    # Do not save /bin paths to all_fixpath_prefixes!
26477  else
26478    # Not in mixed or Windows style, start by that.
26479    new_path=`cmd //c echo $new_path`
26480
26481  input_path="$new_path"
26482  # Check if we need to convert this using DOS-style short mode. If the path
26483  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26484  # take no chances and rewrite it.
26485  # Note: m4 eats our [], so we need to use [ and ] instead.
26486  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26487  if test "x$has_forbidden_chars" != x; then
26488    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26489    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26490  fi
26491
26492    # Output is in $new_path
26493
26494  windows_path="$new_path"
26495  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26496    unix_path=`$CYGPATH -u "$windows_path"`
26497    new_path="$unix_path"
26498  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26499    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26500    new_path="$unix_path"
26501  fi
26502
26503    # remove trailing .exe if any
26504    new_path="${new_path/%.exe/}"
26505
26506    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26507    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26508  fi
26509
26510  else
26511    # We're on a posix platform. Hooray! :)
26512    # First separate the path from the arguments. This will split at the first
26513    # space.
26514    complete="$STRIP"
26515    path="${complete%% *}"
26516    tmp="$complete EOL"
26517    arguments="${tmp#* }"
26518
26519    # Cannot rely on the command "which" here since it doesn't always work.
26520    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26521    if test -z "$is_absolute_path"; then
26522      # Path to executable is not absolute. Find it.
26523      IFS_save="$IFS"
26524      IFS=:
26525      for p in $PATH; do
26526        if test -f "$p/$path" && test -x "$p/$path"; then
26527          new_path="$p/$path"
26528          break
26529        fi
26530      done
26531      IFS="$IFS_save"
26532    else
26533      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26534$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26535      new_path="$path"
26536    fi
26537
26538    if test "x$new_path" = x; then
26539      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26540$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26541      has_space=`$ECHO "$complete" | $GREP " "`
26542      if test "x$has_space" != x; then
26543        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26544$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26545      fi
26546      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26547    fi
26548  fi
26549
26550  # Now join together the path and the arguments once again
26551  if test "x$arguments" != xEOL; then
26552    new_complete="$new_path ${arguments% *}"
26553  else
26554    new_complete="$new_path"
26555  fi
26556
26557  if test "x$complete" != "x$new_complete"; then
26558    STRIP="$new_complete"
26559    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26560$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26561  fi
26562
26563    # Extract the first word of "mcs", so it can be a program name with args.
26564set dummy mcs; ac_word=$2
26565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26566$as_echo_n "checking for $ac_word... " >&6; }
26567if ${ac_cv_path_MCS+:} false; then :
26568  $as_echo_n "(cached) " >&6
26569else
26570  case $MCS in
26571  [\\/]* | ?:[\\/]*)
26572  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
26573  ;;
26574  *)
26575  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26576for as_dir in $PATH
26577do
26578  IFS=$as_save_IFS
26579  test -z "$as_dir" && as_dir=.
26580    for ac_exec_ext in '' $ac_executable_extensions; do
26581  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26582    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
26583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26584    break 2
26585  fi
26586done
26587  done
26588IFS=$as_save_IFS
26589
26590  ;;
26591esac
26592fi
26593MCS=$ac_cv_path_MCS
26594if test -n "$MCS"; then
26595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
26596$as_echo "$MCS" >&6; }
26597else
26598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26599$as_echo "no" >&6; }
26600fi
26601
26602
26603
26604  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26605
26606  # First separate the path from the arguments. This will split at the first
26607  # space.
26608  complete="$MCS"
26609  path="${complete%% *}"
26610  tmp="$complete EOL"
26611  arguments="${tmp#* }"
26612
26613  # Input might be given as Windows format, start by converting to
26614  # unix format.
26615  new_path=`$CYGPATH -u "$path"`
26616
26617  # Now try to locate executable using which
26618  new_path=`$WHICH "$new_path" 2> /dev/null`
26619  # bat and cmd files are not always considered executable in cygwin causing which
26620  # to not find them
26621  if test "x$new_path" = x \
26622      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26623      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26624    new_path=`$CYGPATH -u "$path"`
26625  fi
26626  if test "x$new_path" = x; then
26627    # Oops. Which didn't find the executable.
26628    # The splitting of arguments from the executable at a space might have been incorrect,
26629    # since paths with space are more likely in Windows. Give it another try with the whole
26630    # argument.
26631    path="$complete"
26632    arguments="EOL"
26633    new_path=`$CYGPATH -u "$path"`
26634    new_path=`$WHICH "$new_path" 2> /dev/null`
26635    # bat and cmd files are not always considered executable in cygwin causing which
26636    # to not find them
26637    if test "x$new_path" = x \
26638        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26639        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26640      new_path=`$CYGPATH -u "$path"`
26641    fi
26642    if test "x$new_path" = x; then
26643      # It's still not found. Now this is an unrecoverable error.
26644      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26645$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26646      has_space=`$ECHO "$complete" | $GREP " "`
26647      if test "x$has_space" != x; then
26648        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26649$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26650      fi
26651      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26652    fi
26653  fi
26654
26655  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26656  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26657  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26658  # "foo.exe" is OK but "foo" is an error.
26659  #
26660  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26661  # It is also a way to make sure we got the proper file name for the real test later on.
26662  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26663  if test "x$test_shortpath" = x; then
26664    # Short path failed, file does not exist as specified.
26665    # Try adding .exe or .cmd
26666    if test -f "${new_path}.exe"; then
26667      input_to_shortpath="${new_path}.exe"
26668    elif test -f "${new_path}.cmd"; then
26669      input_to_shortpath="${new_path}.cmd"
26670    else
26671      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
26672$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
26673      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26674$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26675      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26676    fi
26677  else
26678    input_to_shortpath="$new_path"
26679  fi
26680
26681  # Call helper function which possibly converts this using DOS-style short mode.
26682  # If so, the updated path is stored in $new_path.
26683  new_path="$input_to_shortpath"
26684
26685  input_path="$input_to_shortpath"
26686  # Check if we need to convert this using DOS-style short mode. If the path
26687  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26688  # take no chances and rewrite it.
26689  # Note: m4 eats our [], so we need to use [ and ] instead.
26690  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26691  if test "x$has_forbidden_chars" != x; then
26692    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26693    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26694    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26695    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26696      # Going to short mode and back again did indeed matter. Since short mode is
26697      # case insensitive, let's make it lowercase to improve readability.
26698      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26699      # Now convert it back to Unix-stile (cygpath)
26700      input_path=`$CYGPATH -u "$shortmode_path"`
26701      new_path="$input_path"
26702    fi
26703  fi
26704
26705  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26706  if test "x$test_cygdrive_prefix" = x; then
26707    # As a simple fix, exclude /usr/bin since it's not a real path.
26708    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26709      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26710      # a path prefixed by /cygdrive for fixpath to work.
26711      new_path="$CYGWIN_ROOT_PATH$input_path"
26712    fi
26713  fi
26714
26715  # remove trailing .exe if any
26716  new_path="${new_path/%.exe/}"
26717
26718  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26719
26720  # First separate the path from the arguments. This will split at the first
26721  # space.
26722  complete="$MCS"
26723  path="${complete%% *}"
26724  tmp="$complete EOL"
26725  arguments="${tmp#* }"
26726
26727  # Input might be given as Windows format, start by converting to
26728  # unix format.
26729  new_path="$path"
26730
26731  windows_path="$new_path"
26732  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26733    unix_path=`$CYGPATH -u "$windows_path"`
26734    new_path="$unix_path"
26735  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26736    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26737    new_path="$unix_path"
26738  fi
26739
26740
26741  # Now try to locate executable using which
26742  new_path=`$WHICH "$new_path" 2> /dev/null`
26743
26744  if test "x$new_path" = x; then
26745    # Oops. Which didn't find the executable.
26746    # The splitting of arguments from the executable at a space might have been incorrect,
26747    # since paths with space are more likely in Windows. Give it another try with the whole
26748    # argument.
26749    path="$complete"
26750    arguments="EOL"
26751    new_path="$path"
26752
26753  windows_path="$new_path"
26754  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26755    unix_path=`$CYGPATH -u "$windows_path"`
26756    new_path="$unix_path"
26757  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26758    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26759    new_path="$unix_path"
26760  fi
26761
26762
26763    new_path=`$WHICH "$new_path" 2> /dev/null`
26764
26765    if test "x$new_path" = x; then
26766      # It's still not found. Now this is an unrecoverable error.
26767      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26768$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26769      has_space=`$ECHO "$complete" | $GREP " "`
26770      if test "x$has_space" != x; then
26771        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26772$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26773      fi
26774      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26775    fi
26776  fi
26777
26778  # Now new_path has a complete unix path to the binary
26779  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26780    # Keep paths in /bin as-is, but remove trailing .exe if any
26781    new_path="${new_path/%.exe/}"
26782    # Do not save /bin paths to all_fixpath_prefixes!
26783  else
26784    # Not in mixed or Windows style, start by that.
26785    new_path=`cmd //c echo $new_path`
26786
26787  input_path="$new_path"
26788  # Check if we need to convert this using DOS-style short mode. If the path
26789  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26790  # take no chances and rewrite it.
26791  # Note: m4 eats our [], so we need to use [ and ] instead.
26792  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26793  if test "x$has_forbidden_chars" != x; then
26794    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26795    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26796  fi
26797
26798    # Output is in $new_path
26799
26800  windows_path="$new_path"
26801  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26802    unix_path=`$CYGPATH -u "$windows_path"`
26803    new_path="$unix_path"
26804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26805    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26806    new_path="$unix_path"
26807  fi
26808
26809    # remove trailing .exe if any
26810    new_path="${new_path/%.exe/}"
26811
26812    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26813    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26814  fi
26815
26816  else
26817    # We're on a posix platform. Hooray! :)
26818    # First separate the path from the arguments. This will split at the first
26819    # space.
26820    complete="$MCS"
26821    path="${complete%% *}"
26822    tmp="$complete EOL"
26823    arguments="${tmp#* }"
26824
26825    # Cannot rely on the command "which" here since it doesn't always work.
26826    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26827    if test -z "$is_absolute_path"; then
26828      # Path to executable is not absolute. Find it.
26829      IFS_save="$IFS"
26830      IFS=:
26831      for p in $PATH; do
26832        if test -f "$p/$path" && test -x "$p/$path"; then
26833          new_path="$p/$path"
26834          break
26835        fi
26836      done
26837      IFS="$IFS_save"
26838    else
26839      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
26840$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
26841      new_path="$path"
26842    fi
26843
26844    if test "x$new_path" = x; then
26845      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26846$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26847      has_space=`$ECHO "$complete" | $GREP " "`
26848      if test "x$has_space" != x; then
26849        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26850$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26851      fi
26852      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26853    fi
26854  fi
26855
26856  # Now join together the path and the arguments once again
26857  if test "x$arguments" != xEOL; then
26858    new_complete="$new_path ${arguments% *}"
26859  else
26860    new_complete="$new_path"
26861  fi
26862
26863  if test "x$complete" != "x$new_complete"; then
26864    MCS="$new_complete"
26865    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
26866$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
26867  fi
26868
26869  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
26870    if test -n "$ac_tool_prefix"; then
26871  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
26872set dummy ${ac_tool_prefix}nm; ac_word=$2
26873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26874$as_echo_n "checking for $ac_word... " >&6; }
26875if ${ac_cv_prog_NM+:} false; then :
26876  $as_echo_n "(cached) " >&6
26877else
26878  if test -n "$NM"; then
26879  ac_cv_prog_NM="$NM" # Let the user override the test.
26880else
26881as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26882for as_dir in $PATH
26883do
26884  IFS=$as_save_IFS
26885  test -z "$as_dir" && as_dir=.
26886    for ac_exec_ext in '' $ac_executable_extensions; do
26887  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26888    ac_cv_prog_NM="${ac_tool_prefix}nm"
26889    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26890    break 2
26891  fi
26892done
26893  done
26894IFS=$as_save_IFS
26895
26896fi
26897fi
26898NM=$ac_cv_prog_NM
26899if test -n "$NM"; then
26900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
26901$as_echo "$NM" >&6; }
26902else
26903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26904$as_echo "no" >&6; }
26905fi
26906
26907
26908fi
26909if test -z "$ac_cv_prog_NM"; then
26910  ac_ct_NM=$NM
26911  # Extract the first word of "nm", so it can be a program name with args.
26912set dummy nm; ac_word=$2
26913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26914$as_echo_n "checking for $ac_word... " >&6; }
26915if ${ac_cv_prog_ac_ct_NM+:} false; then :
26916  $as_echo_n "(cached) " >&6
26917else
26918  if test -n "$ac_ct_NM"; then
26919  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
26920else
26921as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26922for as_dir in $PATH
26923do
26924  IFS=$as_save_IFS
26925  test -z "$as_dir" && as_dir=.
26926    for ac_exec_ext in '' $ac_executable_extensions; do
26927  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26928    ac_cv_prog_ac_ct_NM="nm"
26929    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26930    break 2
26931  fi
26932done
26933  done
26934IFS=$as_save_IFS
26935
26936fi
26937fi
26938ac_ct_NM=$ac_cv_prog_ac_ct_NM
26939if test -n "$ac_ct_NM"; then
26940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
26941$as_echo "$ac_ct_NM" >&6; }
26942else
26943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26944$as_echo "no" >&6; }
26945fi
26946
26947  if test "x$ac_ct_NM" = x; then
26948    NM=""
26949  else
26950    case $cross_compiling:$ac_tool_warned in
26951yes:)
26952{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26953$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26954ac_tool_warned=yes ;;
26955esac
26956    NM=$ac_ct_NM
26957  fi
26958else
26959  NM="$ac_cv_prog_NM"
26960fi
26961
26962
26963  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26964
26965  # First separate the path from the arguments. This will split at the first
26966  # space.
26967  complete="$NM"
26968  path="${complete%% *}"
26969  tmp="$complete EOL"
26970  arguments="${tmp#* }"
26971
26972  # Input might be given as Windows format, start by converting to
26973  # unix format.
26974  new_path=`$CYGPATH -u "$path"`
26975
26976  # Now try to locate executable using which
26977  new_path=`$WHICH "$new_path" 2> /dev/null`
26978  # bat and cmd files are not always considered executable in cygwin causing which
26979  # to not find them
26980  if test "x$new_path" = x \
26981      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26982      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26983    new_path=`$CYGPATH -u "$path"`
26984  fi
26985  if test "x$new_path" = x; then
26986    # Oops. Which didn't find the executable.
26987    # The splitting of arguments from the executable at a space might have been incorrect,
26988    # since paths with space are more likely in Windows. Give it another try with the whole
26989    # argument.
26990    path="$complete"
26991    arguments="EOL"
26992    new_path=`$CYGPATH -u "$path"`
26993    new_path=`$WHICH "$new_path" 2> /dev/null`
26994    # bat and cmd files are not always considered executable in cygwin causing which
26995    # to not find them
26996    if test "x$new_path" = x \
26997        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26998        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26999      new_path=`$CYGPATH -u "$path"`
27000    fi
27001    if test "x$new_path" = x; then
27002      # It's still not found. Now this is an unrecoverable error.
27003      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27004$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27005      has_space=`$ECHO "$complete" | $GREP " "`
27006      if test "x$has_space" != x; then
27007        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27008$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27009      fi
27010      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27011    fi
27012  fi
27013
27014  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27015  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27016  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27017  # "foo.exe" is OK but "foo" is an error.
27018  #
27019  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27020  # It is also a way to make sure we got the proper file name for the real test later on.
27021  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27022  if test "x$test_shortpath" = x; then
27023    # Short path failed, file does not exist as specified.
27024    # Try adding .exe or .cmd
27025    if test -f "${new_path}.exe"; then
27026      input_to_shortpath="${new_path}.exe"
27027    elif test -f "${new_path}.cmd"; then
27028      input_to_shortpath="${new_path}.cmd"
27029    else
27030      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
27031$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
27032      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27033$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27034      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27035    fi
27036  else
27037    input_to_shortpath="$new_path"
27038  fi
27039
27040  # Call helper function which possibly converts this using DOS-style short mode.
27041  # If so, the updated path is stored in $new_path.
27042  new_path="$input_to_shortpath"
27043
27044  input_path="$input_to_shortpath"
27045  # Check if we need to convert this using DOS-style short mode. If the path
27046  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27047  # take no chances and rewrite it.
27048  # Note: m4 eats our [], so we need to use [ and ] instead.
27049  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27050  if test "x$has_forbidden_chars" != x; then
27051    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27052    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27053    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27054    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27055      # Going to short mode and back again did indeed matter. Since short mode is
27056      # case insensitive, let's make it lowercase to improve readability.
27057      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27058      # Now convert it back to Unix-stile (cygpath)
27059      input_path=`$CYGPATH -u "$shortmode_path"`
27060      new_path="$input_path"
27061    fi
27062  fi
27063
27064  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27065  if test "x$test_cygdrive_prefix" = x; then
27066    # As a simple fix, exclude /usr/bin since it's not a real path.
27067    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27068      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27069      # a path prefixed by /cygdrive for fixpath to work.
27070      new_path="$CYGWIN_ROOT_PATH$input_path"
27071    fi
27072  fi
27073
27074  # remove trailing .exe if any
27075  new_path="${new_path/%.exe/}"
27076
27077  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27078
27079  # First separate the path from the arguments. This will split at the first
27080  # space.
27081  complete="$NM"
27082  path="${complete%% *}"
27083  tmp="$complete EOL"
27084  arguments="${tmp#* }"
27085
27086  # Input might be given as Windows format, start by converting to
27087  # unix format.
27088  new_path="$path"
27089
27090  windows_path="$new_path"
27091  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27092    unix_path=`$CYGPATH -u "$windows_path"`
27093    new_path="$unix_path"
27094  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27095    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27096    new_path="$unix_path"
27097  fi
27098
27099
27100  # Now try to locate executable using which
27101  new_path=`$WHICH "$new_path" 2> /dev/null`
27102
27103  if test "x$new_path" = x; then
27104    # Oops. Which didn't find the executable.
27105    # The splitting of arguments from the executable at a space might have been incorrect,
27106    # since paths with space are more likely in Windows. Give it another try with the whole
27107    # argument.
27108    path="$complete"
27109    arguments="EOL"
27110    new_path="$path"
27111
27112  windows_path="$new_path"
27113  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27114    unix_path=`$CYGPATH -u "$windows_path"`
27115    new_path="$unix_path"
27116  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27117    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27118    new_path="$unix_path"
27119  fi
27120
27121
27122    new_path=`$WHICH "$new_path" 2> /dev/null`
27123
27124    if test "x$new_path" = x; then
27125      # It's still not found. Now this is an unrecoverable error.
27126      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27127$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27128      has_space=`$ECHO "$complete" | $GREP " "`
27129      if test "x$has_space" != x; then
27130        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27131$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27132      fi
27133      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27134    fi
27135  fi
27136
27137  # Now new_path has a complete unix path to the binary
27138  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27139    # Keep paths in /bin as-is, but remove trailing .exe if any
27140    new_path="${new_path/%.exe/}"
27141    # Do not save /bin paths to all_fixpath_prefixes!
27142  else
27143    # Not in mixed or Windows style, start by that.
27144    new_path=`cmd //c echo $new_path`
27145
27146  input_path="$new_path"
27147  # Check if we need to convert this using DOS-style short mode. If the path
27148  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27149  # take no chances and rewrite it.
27150  # Note: m4 eats our [], so we need to use [ and ] instead.
27151  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27152  if test "x$has_forbidden_chars" != x; then
27153    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27154    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27155  fi
27156
27157    # Output is in $new_path
27158
27159  windows_path="$new_path"
27160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27161    unix_path=`$CYGPATH -u "$windows_path"`
27162    new_path="$unix_path"
27163  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27164    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27165    new_path="$unix_path"
27166  fi
27167
27168    # remove trailing .exe if any
27169    new_path="${new_path/%.exe/}"
27170
27171    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27172    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27173  fi
27174
27175  else
27176    # We're on a posix platform. Hooray! :)
27177    # First separate the path from the arguments. This will split at the first
27178    # space.
27179    complete="$NM"
27180    path="${complete%% *}"
27181    tmp="$complete EOL"
27182    arguments="${tmp#* }"
27183
27184    # Cannot rely on the command "which" here since it doesn't always work.
27185    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27186    if test -z "$is_absolute_path"; then
27187      # Path to executable is not absolute. Find it.
27188      IFS_save="$IFS"
27189      IFS=:
27190      for p in $PATH; do
27191        if test -f "$p/$path" && test -x "$p/$path"; then
27192          new_path="$p/$path"
27193          break
27194        fi
27195      done
27196      IFS="$IFS_save"
27197    else
27198      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
27199$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
27200      new_path="$path"
27201    fi
27202
27203    if test "x$new_path" = x; then
27204      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27205$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27206      has_space=`$ECHO "$complete" | $GREP " "`
27207      if test "x$has_space" != x; then
27208        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27209$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27210      fi
27211      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27212    fi
27213  fi
27214
27215  # Now join together the path and the arguments once again
27216  if test "x$arguments" != xEOL; then
27217    new_complete="$new_path ${arguments% *}"
27218  else
27219    new_complete="$new_path"
27220  fi
27221
27222  if test "x$complete" != "x$new_complete"; then
27223    NM="$new_complete"
27224    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
27225$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
27226  fi
27227
27228    GNM="$NM"
27229
27230    if test -n "$ac_tool_prefix"; then
27231  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
27232set dummy ${ac_tool_prefix}strip; ac_word=$2
27233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27234$as_echo_n "checking for $ac_word... " >&6; }
27235if ${ac_cv_prog_STRIP+:} false; then :
27236  $as_echo_n "(cached) " >&6
27237else
27238  if test -n "$STRIP"; then
27239  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
27240else
27241as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27242for as_dir in $PATH
27243do
27244  IFS=$as_save_IFS
27245  test -z "$as_dir" && as_dir=.
27246    for ac_exec_ext in '' $ac_executable_extensions; do
27247  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27248    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
27249    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27250    break 2
27251  fi
27252done
27253  done
27254IFS=$as_save_IFS
27255
27256fi
27257fi
27258STRIP=$ac_cv_prog_STRIP
27259if test -n "$STRIP"; then
27260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
27261$as_echo "$STRIP" >&6; }
27262else
27263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27264$as_echo "no" >&6; }
27265fi
27266
27267
27268fi
27269if test -z "$ac_cv_prog_STRIP"; then
27270  ac_ct_STRIP=$STRIP
27271  # Extract the first word of "strip", so it can be a program name with args.
27272set dummy strip; ac_word=$2
27273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27274$as_echo_n "checking for $ac_word... " >&6; }
27275if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
27276  $as_echo_n "(cached) " >&6
27277else
27278  if test -n "$ac_ct_STRIP"; then
27279  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
27280else
27281as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27282for as_dir in $PATH
27283do
27284  IFS=$as_save_IFS
27285  test -z "$as_dir" && as_dir=.
27286    for ac_exec_ext in '' $ac_executable_extensions; do
27287  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27288    ac_cv_prog_ac_ct_STRIP="strip"
27289    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27290    break 2
27291  fi
27292done
27293  done
27294IFS=$as_save_IFS
27295
27296fi
27297fi
27298ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
27299if test -n "$ac_ct_STRIP"; then
27300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
27301$as_echo "$ac_ct_STRIP" >&6; }
27302else
27303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27304$as_echo "no" >&6; }
27305fi
27306
27307  if test "x$ac_ct_STRIP" = x; then
27308    STRIP=""
27309  else
27310    case $cross_compiling:$ac_tool_warned in
27311yes:)
27312{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27313$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27314ac_tool_warned=yes ;;
27315esac
27316    STRIP=$ac_ct_STRIP
27317  fi
27318else
27319  STRIP="$ac_cv_prog_STRIP"
27320fi
27321
27322
27323  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27324
27325  # First separate the path from the arguments. This will split at the first
27326  # space.
27327  complete="$STRIP"
27328  path="${complete%% *}"
27329  tmp="$complete EOL"
27330  arguments="${tmp#* }"
27331
27332  # Input might be given as Windows format, start by converting to
27333  # unix format.
27334  new_path=`$CYGPATH -u "$path"`
27335
27336  # Now try to locate executable using which
27337  new_path=`$WHICH "$new_path" 2> /dev/null`
27338  # bat and cmd files are not always considered executable in cygwin causing which
27339  # to not find them
27340  if test "x$new_path" = x \
27341      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27342      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27343    new_path=`$CYGPATH -u "$path"`
27344  fi
27345  if test "x$new_path" = x; then
27346    # Oops. Which didn't find the executable.
27347    # The splitting of arguments from the executable at a space might have been incorrect,
27348    # since paths with space are more likely in Windows. Give it another try with the whole
27349    # argument.
27350    path="$complete"
27351    arguments="EOL"
27352    new_path=`$CYGPATH -u "$path"`
27353    new_path=`$WHICH "$new_path" 2> /dev/null`
27354    # bat and cmd files are not always considered executable in cygwin causing which
27355    # to not find them
27356    if test "x$new_path" = x \
27357        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27358        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27359      new_path=`$CYGPATH -u "$path"`
27360    fi
27361    if test "x$new_path" = x; then
27362      # It's still not found. Now this is an unrecoverable error.
27363      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27364$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27365      has_space=`$ECHO "$complete" | $GREP " "`
27366      if test "x$has_space" != x; then
27367        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27368$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27369      fi
27370      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27371    fi
27372  fi
27373
27374  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27375  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27376  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27377  # "foo.exe" is OK but "foo" is an error.
27378  #
27379  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27380  # It is also a way to make sure we got the proper file name for the real test later on.
27381  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27382  if test "x$test_shortpath" = x; then
27383    # Short path failed, file does not exist as specified.
27384    # Try adding .exe or .cmd
27385    if test -f "${new_path}.exe"; then
27386      input_to_shortpath="${new_path}.exe"
27387    elif test -f "${new_path}.cmd"; then
27388      input_to_shortpath="${new_path}.cmd"
27389    else
27390      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
27391$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
27392      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27393$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27394      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27395    fi
27396  else
27397    input_to_shortpath="$new_path"
27398  fi
27399
27400  # Call helper function which possibly converts this using DOS-style short mode.
27401  # If so, the updated path is stored in $new_path.
27402  new_path="$input_to_shortpath"
27403
27404  input_path="$input_to_shortpath"
27405  # Check if we need to convert this using DOS-style short mode. If the path
27406  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27407  # take no chances and rewrite it.
27408  # Note: m4 eats our [], so we need to use [ and ] instead.
27409  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27410  if test "x$has_forbidden_chars" != x; then
27411    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27412    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27413    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27414    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27415      # Going to short mode and back again did indeed matter. Since short mode is
27416      # case insensitive, let's make it lowercase to improve readability.
27417      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27418      # Now convert it back to Unix-stile (cygpath)
27419      input_path=`$CYGPATH -u "$shortmode_path"`
27420      new_path="$input_path"
27421    fi
27422  fi
27423
27424  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27425  if test "x$test_cygdrive_prefix" = x; then
27426    # As a simple fix, exclude /usr/bin since it's not a real path.
27427    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27428      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27429      # a path prefixed by /cygdrive for fixpath to work.
27430      new_path="$CYGWIN_ROOT_PATH$input_path"
27431    fi
27432  fi
27433
27434  # remove trailing .exe if any
27435  new_path="${new_path/%.exe/}"
27436
27437  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27438
27439  # First separate the path from the arguments. This will split at the first
27440  # space.
27441  complete="$STRIP"
27442  path="${complete%% *}"
27443  tmp="$complete EOL"
27444  arguments="${tmp#* }"
27445
27446  # Input might be given as Windows format, start by converting to
27447  # unix format.
27448  new_path="$path"
27449
27450  windows_path="$new_path"
27451  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27452    unix_path=`$CYGPATH -u "$windows_path"`
27453    new_path="$unix_path"
27454  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27455    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27456    new_path="$unix_path"
27457  fi
27458
27459
27460  # Now try to locate executable using which
27461  new_path=`$WHICH "$new_path" 2> /dev/null`
27462
27463  if test "x$new_path" = x; then
27464    # Oops. Which didn't find the executable.
27465    # The splitting of arguments from the executable at a space might have been incorrect,
27466    # since paths with space are more likely in Windows. Give it another try with the whole
27467    # argument.
27468    path="$complete"
27469    arguments="EOL"
27470    new_path="$path"
27471
27472  windows_path="$new_path"
27473  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27474    unix_path=`$CYGPATH -u "$windows_path"`
27475    new_path="$unix_path"
27476  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27477    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27478    new_path="$unix_path"
27479  fi
27480
27481
27482    new_path=`$WHICH "$new_path" 2> /dev/null`
27483
27484    if test "x$new_path" = x; then
27485      # It's still not found. Now this is an unrecoverable error.
27486      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27487$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27488      has_space=`$ECHO "$complete" | $GREP " "`
27489      if test "x$has_space" != x; then
27490        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27491$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27492      fi
27493      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27494    fi
27495  fi
27496
27497  # Now new_path has a complete unix path to the binary
27498  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27499    # Keep paths in /bin as-is, but remove trailing .exe if any
27500    new_path="${new_path/%.exe/}"
27501    # Do not save /bin paths to all_fixpath_prefixes!
27502  else
27503    # Not in mixed or Windows style, start by that.
27504    new_path=`cmd //c echo $new_path`
27505
27506  input_path="$new_path"
27507  # Check if we need to convert this using DOS-style short mode. If the path
27508  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27509  # take no chances and rewrite it.
27510  # Note: m4 eats our [], so we need to use [ and ] instead.
27511  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27512  if test "x$has_forbidden_chars" != x; then
27513    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27514    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27515  fi
27516
27517    # Output is in $new_path
27518
27519  windows_path="$new_path"
27520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27521    unix_path=`$CYGPATH -u "$windows_path"`
27522    new_path="$unix_path"
27523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27524    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27525    new_path="$unix_path"
27526  fi
27527
27528    # remove trailing .exe if any
27529    new_path="${new_path/%.exe/}"
27530
27531    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27532    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27533  fi
27534
27535  else
27536    # We're on a posix platform. Hooray! :)
27537    # First separate the path from the arguments. This will split at the first
27538    # space.
27539    complete="$STRIP"
27540    path="${complete%% *}"
27541    tmp="$complete EOL"
27542    arguments="${tmp#* }"
27543
27544    # Cannot rely on the command "which" here since it doesn't always work.
27545    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27546    if test -z "$is_absolute_path"; then
27547      # Path to executable is not absolute. Find it.
27548      IFS_save="$IFS"
27549      IFS=:
27550      for p in $PATH; do
27551        if test -f "$p/$path" && test -x "$p/$path"; then
27552          new_path="$p/$path"
27553          break
27554        fi
27555      done
27556      IFS="$IFS_save"
27557    else
27558      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
27559$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
27560      new_path="$path"
27561    fi
27562
27563    if test "x$new_path" = x; then
27564      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27565$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27566      has_space=`$ECHO "$complete" | $GREP " "`
27567      if test "x$has_space" != x; then
27568        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27569$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27570      fi
27571      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27572    fi
27573  fi
27574
27575  # Now join together the path and the arguments once again
27576  if test "x$arguments" != xEOL; then
27577    new_complete="$new_path ${arguments% *}"
27578  else
27579    new_complete="$new_path"
27580  fi
27581
27582  if test "x$complete" != "x$new_complete"; then
27583    STRIP="$new_complete"
27584    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
27585$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
27586  fi
27587
27588  fi
27589
27590  # objcopy is used for moving debug symbols to separate files when
27591  # full debug symbols are enabled.
27592  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
27593    if test -n "$ac_tool_prefix"; then
27594  for ac_prog in gobjcopy objcopy
27595  do
27596    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27597set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27599$as_echo_n "checking for $ac_word... " >&6; }
27600if ${ac_cv_prog_OBJCOPY+:} false; then :
27601  $as_echo_n "(cached) " >&6
27602else
27603  if test -n "$OBJCOPY"; then
27604  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
27605else
27606as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27607for as_dir in $PATH
27608do
27609  IFS=$as_save_IFS
27610  test -z "$as_dir" && as_dir=.
27611    for ac_exec_ext in '' $ac_executable_extensions; do
27612  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27613    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
27614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27615    break 2
27616  fi
27617done
27618  done
27619IFS=$as_save_IFS
27620
27621fi
27622fi
27623OBJCOPY=$ac_cv_prog_OBJCOPY
27624if test -n "$OBJCOPY"; then
27625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
27626$as_echo "$OBJCOPY" >&6; }
27627else
27628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27629$as_echo "no" >&6; }
27630fi
27631
27632
27633    test -n "$OBJCOPY" && break
27634  done
27635fi
27636if test -z "$OBJCOPY"; then
27637  ac_ct_OBJCOPY=$OBJCOPY
27638  for ac_prog in gobjcopy objcopy
27639do
27640  # Extract the first word of "$ac_prog", so it can be a program name with args.
27641set dummy $ac_prog; ac_word=$2
27642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27643$as_echo_n "checking for $ac_word... " >&6; }
27644if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
27645  $as_echo_n "(cached) " >&6
27646else
27647  if test -n "$ac_ct_OBJCOPY"; then
27648  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
27649else
27650as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27651for as_dir in $PATH
27652do
27653  IFS=$as_save_IFS
27654  test -z "$as_dir" && as_dir=.
27655    for ac_exec_ext in '' $ac_executable_extensions; do
27656  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27657    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
27658    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27659    break 2
27660  fi
27661done
27662  done
27663IFS=$as_save_IFS
27664
27665fi
27666fi
27667ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
27668if test -n "$ac_ct_OBJCOPY"; then
27669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
27670$as_echo "$ac_ct_OBJCOPY" >&6; }
27671else
27672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27673$as_echo "no" >&6; }
27674fi
27675
27676
27677  test -n "$ac_ct_OBJCOPY" && break
27678done
27679
27680  if test "x$ac_ct_OBJCOPY" = x; then
27681    OBJCOPY=""
27682  else
27683    case $cross_compiling:$ac_tool_warned in
27684yes:)
27685{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27686$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27687ac_tool_warned=yes ;;
27688esac
27689    OBJCOPY=$ac_ct_OBJCOPY
27690  fi
27691fi
27692
27693    # Only call fixup if objcopy was found.
27694    if test -n "$OBJCOPY"; then
27695
27696  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27697
27698  # First separate the path from the arguments. This will split at the first
27699  # space.
27700  complete="$OBJCOPY"
27701  path="${complete%% *}"
27702  tmp="$complete EOL"
27703  arguments="${tmp#* }"
27704
27705  # Input might be given as Windows format, start by converting to
27706  # unix format.
27707  new_path=`$CYGPATH -u "$path"`
27708
27709  # Now try to locate executable using which
27710  new_path=`$WHICH "$new_path" 2> /dev/null`
27711  # bat and cmd files are not always considered executable in cygwin causing which
27712  # to not find them
27713  if test "x$new_path" = x \
27714      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27715      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27716    new_path=`$CYGPATH -u "$path"`
27717  fi
27718  if test "x$new_path" = x; then
27719    # Oops. Which didn't find the executable.
27720    # The splitting of arguments from the executable at a space might have been incorrect,
27721    # since paths with space are more likely in Windows. Give it another try with the whole
27722    # argument.
27723    path="$complete"
27724    arguments="EOL"
27725    new_path=`$CYGPATH -u "$path"`
27726    new_path=`$WHICH "$new_path" 2> /dev/null`
27727    # bat and cmd files are not always considered executable in cygwin causing which
27728    # to not find them
27729    if test "x$new_path" = x \
27730        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27731        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27732      new_path=`$CYGPATH -u "$path"`
27733    fi
27734    if test "x$new_path" = x; then
27735      # It's still not found. Now this is an unrecoverable error.
27736      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27737$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27738      has_space=`$ECHO "$complete" | $GREP " "`
27739      if test "x$has_space" != x; then
27740        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27741$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27742      fi
27743      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27744    fi
27745  fi
27746
27747  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27748  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27749  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27750  # "foo.exe" is OK but "foo" is an error.
27751  #
27752  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27753  # It is also a way to make sure we got the proper file name for the real test later on.
27754  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27755  if test "x$test_shortpath" = x; then
27756    # Short path failed, file does not exist as specified.
27757    # Try adding .exe or .cmd
27758    if test -f "${new_path}.exe"; then
27759      input_to_shortpath="${new_path}.exe"
27760    elif test -f "${new_path}.cmd"; then
27761      input_to_shortpath="${new_path}.cmd"
27762    else
27763      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
27764$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
27765      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27766$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27767      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27768    fi
27769  else
27770    input_to_shortpath="$new_path"
27771  fi
27772
27773  # Call helper function which possibly converts this using DOS-style short mode.
27774  # If so, the updated path is stored in $new_path.
27775  new_path="$input_to_shortpath"
27776
27777  input_path="$input_to_shortpath"
27778  # Check if we need to convert this using DOS-style short mode. If the path
27779  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27780  # take no chances and rewrite it.
27781  # Note: m4 eats our [], so we need to use [ and ] instead.
27782  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27783  if test "x$has_forbidden_chars" != x; then
27784    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27785    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27786    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27787    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27788      # Going to short mode and back again did indeed matter. Since short mode is
27789      # case insensitive, let's make it lowercase to improve readability.
27790      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27791      # Now convert it back to Unix-stile (cygpath)
27792      input_path=`$CYGPATH -u "$shortmode_path"`
27793      new_path="$input_path"
27794    fi
27795  fi
27796
27797  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27798  if test "x$test_cygdrive_prefix" = x; then
27799    # As a simple fix, exclude /usr/bin since it's not a real path.
27800    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27801      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27802      # a path prefixed by /cygdrive for fixpath to work.
27803      new_path="$CYGWIN_ROOT_PATH$input_path"
27804    fi
27805  fi
27806
27807  # remove trailing .exe if any
27808  new_path="${new_path/%.exe/}"
27809
27810  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27811
27812  # First separate the path from the arguments. This will split at the first
27813  # space.
27814  complete="$OBJCOPY"
27815  path="${complete%% *}"
27816  tmp="$complete EOL"
27817  arguments="${tmp#* }"
27818
27819  # Input might be given as Windows format, start by converting to
27820  # unix format.
27821  new_path="$path"
27822
27823  windows_path="$new_path"
27824  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27825    unix_path=`$CYGPATH -u "$windows_path"`
27826    new_path="$unix_path"
27827  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27828    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27829    new_path="$unix_path"
27830  fi
27831
27832
27833  # Now try to locate executable using which
27834  new_path=`$WHICH "$new_path" 2> /dev/null`
27835
27836  if test "x$new_path" = x; then
27837    # Oops. Which didn't find the executable.
27838    # The splitting of arguments from the executable at a space might have been incorrect,
27839    # since paths with space are more likely in Windows. Give it another try with the whole
27840    # argument.
27841    path="$complete"
27842    arguments="EOL"
27843    new_path="$path"
27844
27845  windows_path="$new_path"
27846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27847    unix_path=`$CYGPATH -u "$windows_path"`
27848    new_path="$unix_path"
27849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27850    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27851    new_path="$unix_path"
27852  fi
27853
27854
27855    new_path=`$WHICH "$new_path" 2> /dev/null`
27856
27857    if test "x$new_path" = x; then
27858      # It's still not found. Now this is an unrecoverable error.
27859      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27860$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27861      has_space=`$ECHO "$complete" | $GREP " "`
27862      if test "x$has_space" != x; then
27863        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27864$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27865      fi
27866      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27867    fi
27868  fi
27869
27870  # Now new_path has a complete unix path to the binary
27871  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27872    # Keep paths in /bin as-is, but remove trailing .exe if any
27873    new_path="${new_path/%.exe/}"
27874    # Do not save /bin paths to all_fixpath_prefixes!
27875  else
27876    # Not in mixed or Windows style, start by that.
27877    new_path=`cmd //c echo $new_path`
27878
27879  input_path="$new_path"
27880  # Check if we need to convert this using DOS-style short mode. If the path
27881  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27882  # take no chances and rewrite it.
27883  # Note: m4 eats our [], so we need to use [ and ] instead.
27884  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27885  if test "x$has_forbidden_chars" != x; then
27886    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27887    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27888  fi
27889
27890    # Output is in $new_path
27891
27892  windows_path="$new_path"
27893  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27894    unix_path=`$CYGPATH -u "$windows_path"`
27895    new_path="$unix_path"
27896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27897    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27898    new_path="$unix_path"
27899  fi
27900
27901    # remove trailing .exe if any
27902    new_path="${new_path/%.exe/}"
27903
27904    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27905    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27906  fi
27907
27908  else
27909    # We're on a posix platform. Hooray! :)
27910    # First separate the path from the arguments. This will split at the first
27911    # space.
27912    complete="$OBJCOPY"
27913    path="${complete%% *}"
27914    tmp="$complete EOL"
27915    arguments="${tmp#* }"
27916
27917    # Cannot rely on the command "which" here since it doesn't always work.
27918    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27919    if test -z "$is_absolute_path"; then
27920      # Path to executable is not absolute. Find it.
27921      IFS_save="$IFS"
27922      IFS=:
27923      for p in $PATH; do
27924        if test -f "$p/$path" && test -x "$p/$path"; then
27925          new_path="$p/$path"
27926          break
27927        fi
27928      done
27929      IFS="$IFS_save"
27930    else
27931      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
27932$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
27933      new_path="$path"
27934    fi
27935
27936    if test "x$new_path" = x; then
27937      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27938$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27939      has_space=`$ECHO "$complete" | $GREP " "`
27940      if test "x$has_space" != x; then
27941        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27942$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27943      fi
27944      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27945    fi
27946  fi
27947
27948  # Now join together the path and the arguments once again
27949  if test "x$arguments" != xEOL; then
27950    new_complete="$new_path ${arguments% *}"
27951  else
27952    new_complete="$new_path"
27953  fi
27954
27955  if test "x$complete" != "x$new_complete"; then
27956    OBJCOPY="$new_complete"
27957    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
27958$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
27959  fi
27960
27961    fi
27962  fi
27963
27964  if test -n "$ac_tool_prefix"; then
27965  for ac_prog in gobjdump objdump
27966  do
27967    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27968set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27970$as_echo_n "checking for $ac_word... " >&6; }
27971if ${ac_cv_prog_OBJDUMP+:} false; then :
27972  $as_echo_n "(cached) " >&6
27973else
27974  if test -n "$OBJDUMP"; then
27975  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
27976else
27977as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27978for as_dir in $PATH
27979do
27980  IFS=$as_save_IFS
27981  test -z "$as_dir" && as_dir=.
27982    for ac_exec_ext in '' $ac_executable_extensions; do
27983  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27984    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
27985    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27986    break 2
27987  fi
27988done
27989  done
27990IFS=$as_save_IFS
27991
27992fi
27993fi
27994OBJDUMP=$ac_cv_prog_OBJDUMP
27995if test -n "$OBJDUMP"; then
27996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
27997$as_echo "$OBJDUMP" >&6; }
27998else
27999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28000$as_echo "no" >&6; }
28001fi
28002
28003
28004    test -n "$OBJDUMP" && break
28005  done
28006fi
28007if test -z "$OBJDUMP"; then
28008  ac_ct_OBJDUMP=$OBJDUMP
28009  for ac_prog in gobjdump objdump
28010do
28011  # Extract the first word of "$ac_prog", so it can be a program name with args.
28012set dummy $ac_prog; ac_word=$2
28013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28014$as_echo_n "checking for $ac_word... " >&6; }
28015if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
28016  $as_echo_n "(cached) " >&6
28017else
28018  if test -n "$ac_ct_OBJDUMP"; then
28019  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
28020else
28021as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28022for as_dir in $PATH
28023do
28024  IFS=$as_save_IFS
28025  test -z "$as_dir" && as_dir=.
28026    for ac_exec_ext in '' $ac_executable_extensions; do
28027  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28028    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
28029    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28030    break 2
28031  fi
28032done
28033  done
28034IFS=$as_save_IFS
28035
28036fi
28037fi
28038ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
28039if test -n "$ac_ct_OBJDUMP"; then
28040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
28041$as_echo "$ac_ct_OBJDUMP" >&6; }
28042else
28043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28044$as_echo "no" >&6; }
28045fi
28046
28047
28048  test -n "$ac_ct_OBJDUMP" && break
28049done
28050
28051  if test "x$ac_ct_OBJDUMP" = x; then
28052    OBJDUMP=""
28053  else
28054    case $cross_compiling:$ac_tool_warned in
28055yes:)
28056{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28057$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28058ac_tool_warned=yes ;;
28059esac
28060    OBJDUMP=$ac_ct_OBJDUMP
28061  fi
28062fi
28063
28064  if test "x$OBJDUMP" != x; then
28065    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
28066
28067  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28068
28069  # First separate the path from the arguments. This will split at the first
28070  # space.
28071  complete="$OBJDUMP"
28072  path="${complete%% *}"
28073  tmp="$complete EOL"
28074  arguments="${tmp#* }"
28075
28076  # Input might be given as Windows format, start by converting to
28077  # unix format.
28078  new_path=`$CYGPATH -u "$path"`
28079
28080  # Now try to locate executable using which
28081  new_path=`$WHICH "$new_path" 2> /dev/null`
28082  # bat and cmd files are not always considered executable in cygwin causing which
28083  # to not find them
28084  if test "x$new_path" = x \
28085      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28086      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28087    new_path=`$CYGPATH -u "$path"`
28088  fi
28089  if test "x$new_path" = x; then
28090    # Oops. Which didn't find the executable.
28091    # The splitting of arguments from the executable at a space might have been incorrect,
28092    # since paths with space are more likely in Windows. Give it another try with the whole
28093    # argument.
28094    path="$complete"
28095    arguments="EOL"
28096    new_path=`$CYGPATH -u "$path"`
28097    new_path=`$WHICH "$new_path" 2> /dev/null`
28098    # bat and cmd files are not always considered executable in cygwin causing which
28099    # to not find them
28100    if test "x$new_path" = x \
28101        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28102        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28103      new_path=`$CYGPATH -u "$path"`
28104    fi
28105    if test "x$new_path" = x; then
28106      # It's still not found. Now this is an unrecoverable error.
28107      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28108$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28109      has_space=`$ECHO "$complete" | $GREP " "`
28110      if test "x$has_space" != x; then
28111        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28112$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28113      fi
28114      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28115    fi
28116  fi
28117
28118  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28119  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28120  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28121  # "foo.exe" is OK but "foo" is an error.
28122  #
28123  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28124  # It is also a way to make sure we got the proper file name for the real test later on.
28125  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28126  if test "x$test_shortpath" = x; then
28127    # Short path failed, file does not exist as specified.
28128    # Try adding .exe or .cmd
28129    if test -f "${new_path}.exe"; then
28130      input_to_shortpath="${new_path}.exe"
28131    elif test -f "${new_path}.cmd"; then
28132      input_to_shortpath="${new_path}.cmd"
28133    else
28134      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
28135$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
28136      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28137$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28138      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28139    fi
28140  else
28141    input_to_shortpath="$new_path"
28142  fi
28143
28144  # Call helper function which possibly converts this using DOS-style short mode.
28145  # If so, the updated path is stored in $new_path.
28146  new_path="$input_to_shortpath"
28147
28148  input_path="$input_to_shortpath"
28149  # Check if we need to convert this using DOS-style short mode. If the path
28150  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28151  # take no chances and rewrite it.
28152  # Note: m4 eats our [], so we need to use [ and ] instead.
28153  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28154  if test "x$has_forbidden_chars" != x; then
28155    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28156    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28157    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28158    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28159      # Going to short mode and back again did indeed matter. Since short mode is
28160      # case insensitive, let's make it lowercase to improve readability.
28161      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28162      # Now convert it back to Unix-stile (cygpath)
28163      input_path=`$CYGPATH -u "$shortmode_path"`
28164      new_path="$input_path"
28165    fi
28166  fi
28167
28168  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28169  if test "x$test_cygdrive_prefix" = x; then
28170    # As a simple fix, exclude /usr/bin since it's not a real path.
28171    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28172      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28173      # a path prefixed by /cygdrive for fixpath to work.
28174      new_path="$CYGWIN_ROOT_PATH$input_path"
28175    fi
28176  fi
28177
28178  # remove trailing .exe if any
28179  new_path="${new_path/%.exe/}"
28180
28181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28182
28183  # First separate the path from the arguments. This will split at the first
28184  # space.
28185  complete="$OBJDUMP"
28186  path="${complete%% *}"
28187  tmp="$complete EOL"
28188  arguments="${tmp#* }"
28189
28190  # Input might be given as Windows format, start by converting to
28191  # unix format.
28192  new_path="$path"
28193
28194  windows_path="$new_path"
28195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28196    unix_path=`$CYGPATH -u "$windows_path"`
28197    new_path="$unix_path"
28198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28199    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28200    new_path="$unix_path"
28201  fi
28202
28203
28204  # Now try to locate executable using which
28205  new_path=`$WHICH "$new_path" 2> /dev/null`
28206
28207  if test "x$new_path" = x; then
28208    # Oops. Which didn't find the executable.
28209    # The splitting of arguments from the executable at a space might have been incorrect,
28210    # since paths with space are more likely in Windows. Give it another try with the whole
28211    # argument.
28212    path="$complete"
28213    arguments="EOL"
28214    new_path="$path"
28215
28216  windows_path="$new_path"
28217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28218    unix_path=`$CYGPATH -u "$windows_path"`
28219    new_path="$unix_path"
28220  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28221    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28222    new_path="$unix_path"
28223  fi
28224
28225
28226    new_path=`$WHICH "$new_path" 2> /dev/null`
28227
28228    if test "x$new_path" = x; then
28229      # It's still not found. Now this is an unrecoverable error.
28230      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28231$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28232      has_space=`$ECHO "$complete" | $GREP " "`
28233      if test "x$has_space" != x; then
28234        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28235$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28236      fi
28237      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28238    fi
28239  fi
28240
28241  # Now new_path has a complete unix path to the binary
28242  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28243    # Keep paths in /bin as-is, but remove trailing .exe if any
28244    new_path="${new_path/%.exe/}"
28245    # Do not save /bin paths to all_fixpath_prefixes!
28246  else
28247    # Not in mixed or Windows style, start by that.
28248    new_path=`cmd //c echo $new_path`
28249
28250  input_path="$new_path"
28251  # Check if we need to convert this using DOS-style short mode. If the path
28252  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28253  # take no chances and rewrite it.
28254  # Note: m4 eats our [], so we need to use [ and ] instead.
28255  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28256  if test "x$has_forbidden_chars" != x; then
28257    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28258    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28259  fi
28260
28261    # Output is in $new_path
28262
28263  windows_path="$new_path"
28264  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28265    unix_path=`$CYGPATH -u "$windows_path"`
28266    new_path="$unix_path"
28267  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28268    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28269    new_path="$unix_path"
28270  fi
28271
28272    # remove trailing .exe if any
28273    new_path="${new_path/%.exe/}"
28274
28275    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28276    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28277  fi
28278
28279  else
28280    # We're on a posix platform. Hooray! :)
28281    # First separate the path from the arguments. This will split at the first
28282    # space.
28283    complete="$OBJDUMP"
28284    path="${complete%% *}"
28285    tmp="$complete EOL"
28286    arguments="${tmp#* }"
28287
28288    # Cannot rely on the command "which" here since it doesn't always work.
28289    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28290    if test -z "$is_absolute_path"; then
28291      # Path to executable is not absolute. Find it.
28292      IFS_save="$IFS"
28293      IFS=:
28294      for p in $PATH; do
28295        if test -f "$p/$path" && test -x "$p/$path"; then
28296          new_path="$p/$path"
28297          break
28298        fi
28299      done
28300      IFS="$IFS_save"
28301    else
28302      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
28303$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
28304      new_path="$path"
28305    fi
28306
28307    if test "x$new_path" = x; then
28308      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28309$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28310      has_space=`$ECHO "$complete" | $GREP " "`
28311      if test "x$has_space" != x; then
28312        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28313$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28314      fi
28315      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28316    fi
28317  fi
28318
28319  # Now join together the path and the arguments once again
28320  if test "x$arguments" != xEOL; then
28321    new_complete="$new_path ${arguments% *}"
28322  else
28323    new_complete="$new_path"
28324  fi
28325
28326  if test "x$complete" != "x$new_complete"; then
28327    OBJDUMP="$new_complete"
28328    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
28329$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
28330  fi
28331
28332  fi
28333
28334  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
28335    # Extract the first word of "lipo", so it can be a program name with args.
28336set dummy lipo; ac_word=$2
28337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28338$as_echo_n "checking for $ac_word... " >&6; }
28339if ${ac_cv_path_LIPO+:} false; then :
28340  $as_echo_n "(cached) " >&6
28341else
28342  case $LIPO in
28343  [\\/]* | ?:[\\/]*)
28344  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
28345  ;;
28346  *)
28347  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28348for as_dir in $PATH
28349do
28350  IFS=$as_save_IFS
28351  test -z "$as_dir" && as_dir=.
28352    for ac_exec_ext in '' $ac_executable_extensions; do
28353  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28354    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
28355    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28356    break 2
28357  fi
28358done
28359  done
28360IFS=$as_save_IFS
28361
28362  ;;
28363esac
28364fi
28365LIPO=$ac_cv_path_LIPO
28366if test -n "$LIPO"; then
28367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
28368$as_echo "$LIPO" >&6; }
28369else
28370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28371$as_echo "no" >&6; }
28372fi
28373
28374
28375
28376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28377
28378  # First separate the path from the arguments. This will split at the first
28379  # space.
28380  complete="$LIPO"
28381  path="${complete%% *}"
28382  tmp="$complete EOL"
28383  arguments="${tmp#* }"
28384
28385  # Input might be given as Windows format, start by converting to
28386  # unix format.
28387  new_path=`$CYGPATH -u "$path"`
28388
28389  # Now try to locate executable using which
28390  new_path=`$WHICH "$new_path" 2> /dev/null`
28391  # bat and cmd files are not always considered executable in cygwin causing which
28392  # to not find them
28393  if test "x$new_path" = x \
28394      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28395      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28396    new_path=`$CYGPATH -u "$path"`
28397  fi
28398  if test "x$new_path" = x; then
28399    # Oops. Which didn't find the executable.
28400    # The splitting of arguments from the executable at a space might have been incorrect,
28401    # since paths with space are more likely in Windows. Give it another try with the whole
28402    # argument.
28403    path="$complete"
28404    arguments="EOL"
28405    new_path=`$CYGPATH -u "$path"`
28406    new_path=`$WHICH "$new_path" 2> /dev/null`
28407    # bat and cmd files are not always considered executable in cygwin causing which
28408    # to not find them
28409    if test "x$new_path" = x \
28410        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28411        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28412      new_path=`$CYGPATH -u "$path"`
28413    fi
28414    if test "x$new_path" = x; then
28415      # It's still not found. Now this is an unrecoverable error.
28416      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28417$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28418      has_space=`$ECHO "$complete" | $GREP " "`
28419      if test "x$has_space" != x; then
28420        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28421$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28422      fi
28423      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28424    fi
28425  fi
28426
28427  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28428  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28429  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28430  # "foo.exe" is OK but "foo" is an error.
28431  #
28432  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28433  # It is also a way to make sure we got the proper file name for the real test later on.
28434  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28435  if test "x$test_shortpath" = x; then
28436    # Short path failed, file does not exist as specified.
28437    # Try adding .exe or .cmd
28438    if test -f "${new_path}.exe"; then
28439      input_to_shortpath="${new_path}.exe"
28440    elif test -f "${new_path}.cmd"; then
28441      input_to_shortpath="${new_path}.cmd"
28442    else
28443      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
28444$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
28445      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28446$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28447      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28448    fi
28449  else
28450    input_to_shortpath="$new_path"
28451  fi
28452
28453  # Call helper function which possibly converts this using DOS-style short mode.
28454  # If so, the updated path is stored in $new_path.
28455  new_path="$input_to_shortpath"
28456
28457  input_path="$input_to_shortpath"
28458  # Check if we need to convert this using DOS-style short mode. If the path
28459  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28460  # take no chances and rewrite it.
28461  # Note: m4 eats our [], so we need to use [ and ] instead.
28462  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28463  if test "x$has_forbidden_chars" != x; then
28464    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28465    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28466    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28467    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28468      # Going to short mode and back again did indeed matter. Since short mode is
28469      # case insensitive, let's make it lowercase to improve readability.
28470      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28471      # Now convert it back to Unix-stile (cygpath)
28472      input_path=`$CYGPATH -u "$shortmode_path"`
28473      new_path="$input_path"
28474    fi
28475  fi
28476
28477  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28478  if test "x$test_cygdrive_prefix" = x; then
28479    # As a simple fix, exclude /usr/bin since it's not a real path.
28480    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28481      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28482      # a path prefixed by /cygdrive for fixpath to work.
28483      new_path="$CYGWIN_ROOT_PATH$input_path"
28484    fi
28485  fi
28486
28487  # remove trailing .exe if any
28488  new_path="${new_path/%.exe/}"
28489
28490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28491
28492  # First separate the path from the arguments. This will split at the first
28493  # space.
28494  complete="$LIPO"
28495  path="${complete%% *}"
28496  tmp="$complete EOL"
28497  arguments="${tmp#* }"
28498
28499  # Input might be given as Windows format, start by converting to
28500  # unix format.
28501  new_path="$path"
28502
28503  windows_path="$new_path"
28504  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28505    unix_path=`$CYGPATH -u "$windows_path"`
28506    new_path="$unix_path"
28507  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28508    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28509    new_path="$unix_path"
28510  fi
28511
28512
28513  # Now try to locate executable using which
28514  new_path=`$WHICH "$new_path" 2> /dev/null`
28515
28516  if test "x$new_path" = x; then
28517    # Oops. Which didn't find the executable.
28518    # The splitting of arguments from the executable at a space might have been incorrect,
28519    # since paths with space are more likely in Windows. Give it another try with the whole
28520    # argument.
28521    path="$complete"
28522    arguments="EOL"
28523    new_path="$path"
28524
28525  windows_path="$new_path"
28526  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28527    unix_path=`$CYGPATH -u "$windows_path"`
28528    new_path="$unix_path"
28529  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28530    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28531    new_path="$unix_path"
28532  fi
28533
28534
28535    new_path=`$WHICH "$new_path" 2> /dev/null`
28536
28537    if test "x$new_path" = x; then
28538      # It's still not found. Now this is an unrecoverable error.
28539      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28540$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28541      has_space=`$ECHO "$complete" | $GREP " "`
28542      if test "x$has_space" != x; then
28543        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28544$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28545      fi
28546      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28547    fi
28548  fi
28549
28550  # Now new_path has a complete unix path to the binary
28551  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28552    # Keep paths in /bin as-is, but remove trailing .exe if any
28553    new_path="${new_path/%.exe/}"
28554    # Do not save /bin paths to all_fixpath_prefixes!
28555  else
28556    # Not in mixed or Windows style, start by that.
28557    new_path=`cmd //c echo $new_path`
28558
28559  input_path="$new_path"
28560  # Check if we need to convert this using DOS-style short mode. If the path
28561  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28562  # take no chances and rewrite it.
28563  # Note: m4 eats our [], so we need to use [ and ] instead.
28564  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28565  if test "x$has_forbidden_chars" != x; then
28566    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28567    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28568  fi
28569
28570    # Output is in $new_path
28571
28572  windows_path="$new_path"
28573  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28574    unix_path=`$CYGPATH -u "$windows_path"`
28575    new_path="$unix_path"
28576  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28577    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28578    new_path="$unix_path"
28579  fi
28580
28581    # remove trailing .exe if any
28582    new_path="${new_path/%.exe/}"
28583
28584    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28585    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28586  fi
28587
28588  else
28589    # We're on a posix platform. Hooray! :)
28590    # First separate the path from the arguments. This will split at the first
28591    # space.
28592    complete="$LIPO"
28593    path="${complete%% *}"
28594    tmp="$complete EOL"
28595    arguments="${tmp#* }"
28596
28597    # Cannot rely on the command "which" here since it doesn't always work.
28598    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28599    if test -z "$is_absolute_path"; then
28600      # Path to executable is not absolute. Find it.
28601      IFS_save="$IFS"
28602      IFS=:
28603      for p in $PATH; do
28604        if test -f "$p/$path" && test -x "$p/$path"; then
28605          new_path="$p/$path"
28606          break
28607        fi
28608      done
28609      IFS="$IFS_save"
28610    else
28611      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
28612$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
28613      new_path="$path"
28614    fi
28615
28616    if test "x$new_path" = x; then
28617      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28618$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28619      has_space=`$ECHO "$complete" | $GREP " "`
28620      if test "x$has_space" != x; then
28621        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28622$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28623      fi
28624      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28625    fi
28626  fi
28627
28628  # Now join together the path and the arguments once again
28629  if test "x$arguments" != xEOL; then
28630    new_complete="$new_path ${arguments% *}"
28631  else
28632    new_complete="$new_path"
28633  fi
28634
28635  if test "x$complete" != "x$new_complete"; then
28636    LIPO="$new_complete"
28637    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
28638$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
28639  fi
28640
28641  fi
28642
28643
28644
28645  # Restore old path without tools dir
28646  PATH="$OLD_PATH"
28647
28648
28649# FIXME: Currently we must test this after paths but before flags. Fix!
28650
28651# And we can test some aspects on the target using configure macros.
28652
28653
28654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
28655$as_echo_n "checking for ANSI C header files... " >&6; }
28656if ${ac_cv_header_stdc+:} false; then :
28657  $as_echo_n "(cached) " >&6
28658else
28659  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28660/* end confdefs.h.  */
28661#include <stdlib.h>
28662#include <stdarg.h>
28663#include <string.h>
28664#include <float.h>
28665
28666int
28667main ()
28668{
28669
28670  ;
28671  return 0;
28672}
28673_ACEOF
28674if ac_fn_cxx_try_compile "$LINENO"; then :
28675  ac_cv_header_stdc=yes
28676else
28677  ac_cv_header_stdc=no
28678fi
28679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28680
28681if test $ac_cv_header_stdc = yes; then
28682  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
28683  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28684/* end confdefs.h.  */
28685#include <string.h>
28686
28687_ACEOF
28688if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28689  $EGREP "memchr" >/dev/null 2>&1; then :
28690
28691else
28692  ac_cv_header_stdc=no
28693fi
28694rm -f conftest*
28695
28696fi
28697
28698if test $ac_cv_header_stdc = yes; then
28699  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
28700  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28701/* end confdefs.h.  */
28702#include <stdlib.h>
28703
28704_ACEOF
28705if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28706  $EGREP "free" >/dev/null 2>&1; then :
28707
28708else
28709  ac_cv_header_stdc=no
28710fi
28711rm -f conftest*
28712
28713fi
28714
28715if test $ac_cv_header_stdc = yes; then
28716  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
28717  if test "$cross_compiling" = yes; then :
28718  :
28719else
28720  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28721/* end confdefs.h.  */
28722#include <ctype.h>
28723#include <stdlib.h>
28724#if ((' ' & 0x0FF) == 0x020)
28725# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
28726# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
28727#else
28728# define ISLOWER(c) \
28729		   (('a' <= (c) && (c) <= 'i') \
28730		     || ('j' <= (c) && (c) <= 'r') \
28731		     || ('s' <= (c) && (c) <= 'z'))
28732# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
28733#endif
28734
28735#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
28736int
28737main ()
28738{
28739  int i;
28740  for (i = 0; i < 256; i++)
28741    if (XOR (islower (i), ISLOWER (i))
28742	|| toupper (i) != TOUPPER (i))
28743      return 2;
28744  return 0;
28745}
28746_ACEOF
28747if ac_fn_cxx_try_run "$LINENO"; then :
28748
28749else
28750  ac_cv_header_stdc=no
28751fi
28752rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28753  conftest.$ac_objext conftest.beam conftest.$ac_ext
28754fi
28755
28756fi
28757fi
28758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
28759$as_echo "$ac_cv_header_stdc" >&6; }
28760if test $ac_cv_header_stdc = yes; then
28761
28762$as_echo "#define STDC_HEADERS 1" >>confdefs.h
28763
28764fi
28765
28766# On IRIX 5.3, sys/types and inttypes.h are conflicting.
28767for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
28768		  inttypes.h stdint.h unistd.h
28769do :
28770  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28771ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
28772"
28773if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28774  cat >>confdefs.h <<_ACEOF
28775#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28776_ACEOF
28777
28778fi
28779
28780done
28781
28782
28783
28784  ###############################################################################
28785  #
28786  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
28787  # (The JVM can use 32 or 64 bit Java pointers but that decision
28788  # is made at runtime.)
28789  #
28790
28791  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28792    # Always specify -m flags on Solaris
28793
28794  # When we add flags to the "official" CFLAGS etc, we need to
28795  # keep track of these additions in ADDED_CFLAGS etc. These
28796  # will later be checked to make sure only controlled additions
28797  # have been made to CFLAGS etc.
28798  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28799  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28800  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28801
28802  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28803  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28804  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28805
28806  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28807  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28808  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28809
28810  elif test "x$COMPILE_TYPE" = xreduced; then
28811    if test "x$OPENJDK_TARGET_OS" != xwindows; then
28812      # Specify -m if running reduced on other Posix platforms
28813
28814  # When we add flags to the "official" CFLAGS etc, we need to
28815  # keep track of these additions in ADDED_CFLAGS etc. These
28816  # will later be checked to make sure only controlled additions
28817  # have been made to CFLAGS etc.
28818  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28819  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28820  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28821
28822  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28823  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28824  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28825
28826  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28827  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28828  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28829
28830    fi
28831  fi
28832
28833  # Make compilation sanity check
28834  for ac_header in stdio.h
28835do :
28836  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
28837if test "x$ac_cv_header_stdio_h" = xyes; then :
28838  cat >>confdefs.h <<_ACEOF
28839#define HAVE_STDIO_H 1
28840_ACEOF
28841
28842else
28843
28844    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
28845$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
28846    if test "x$COMPILE_TYPE" = xreduced; then
28847      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
28848$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
28849    elif test "x$COMPILE_TYPE" = xcross; then
28850      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
28851$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
28852    fi
28853    as_fn_error $? "Cannot continue." "$LINENO" 5
28854
28855fi
28856
28857done
28858
28859
28860  # The cast to long int works around a bug in the HP C Compiler
28861# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
28862# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
28863# This bug is HP SR number 8606223364.
28864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
28865$as_echo_n "checking size of int *... " >&6; }
28866if ${ac_cv_sizeof_int_p+:} false; then :
28867  $as_echo_n "(cached) " >&6
28868else
28869  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
28870
28871else
28872  if test "$ac_cv_type_int_p" = yes; then
28873     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28874$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28875as_fn_error 77 "cannot compute sizeof (int *)
28876See \`config.log' for more details" "$LINENO" 5; }
28877   else
28878     ac_cv_sizeof_int_p=0
28879   fi
28880fi
28881
28882fi
28883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
28884$as_echo "$ac_cv_sizeof_int_p" >&6; }
28885
28886
28887
28888cat >>confdefs.h <<_ACEOF
28889#define SIZEOF_INT_P $ac_cv_sizeof_int_p
28890_ACEOF
28891
28892
28893
28894  if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
28895    # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
28896    SIZEOF_INT_P="$ac_cv_sizeof_int_p"
28897  fi
28898
28899  if test "x$SIZEOF_INT_P" = x; then
28900    # The test failed, lets stick to the assumed value.
28901    { $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
28902$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
28903  else
28904    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
28905
28906    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
28907      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
28908    fi
28909  fi
28910
28911  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
28912$as_echo_n "checking for target address size... " >&6; }
28913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
28914$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
28915
28916
28917  ###############################################################################
28918  #
28919  # Is the target little of big endian?
28920  #
28921   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
28922$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
28923if ${ac_cv_c_bigendian+:} false; then :
28924  $as_echo_n "(cached) " >&6
28925else
28926  ac_cv_c_bigendian=unknown
28927    # See if we're dealing with a universal compiler.
28928    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28929/* end confdefs.h.  */
28930#ifndef __APPLE_CC__
28931	       not a universal capable compiler
28932	     #endif
28933	     typedef int dummy;
28934
28935_ACEOF
28936if ac_fn_cxx_try_compile "$LINENO"; then :
28937
28938	# Check for potential -arch flags.  It is not universal unless
28939	# there are at least two -arch flags with different values.
28940	ac_arch=
28941	ac_prev=
28942	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
28943	 if test -n "$ac_prev"; then
28944	   case $ac_word in
28945	     i?86 | x86_64 | ppc | ppc64)
28946	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
28947		 ac_arch=$ac_word
28948	       else
28949		 ac_cv_c_bigendian=universal
28950		 break
28951	       fi
28952	       ;;
28953	   esac
28954	   ac_prev=
28955	 elif test "x$ac_word" = "x-arch"; then
28956	   ac_prev=arch
28957	 fi
28958       done
28959fi
28960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28961    if test $ac_cv_c_bigendian = unknown; then
28962      # See if sys/param.h defines the BYTE_ORDER macro.
28963      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28964/* end confdefs.h.  */
28965#include <sys/types.h>
28966	     #include <sys/param.h>
28967
28968int
28969main ()
28970{
28971#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
28972		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
28973		     && LITTLE_ENDIAN)
28974	      bogus endian macros
28975	     #endif
28976
28977  ;
28978  return 0;
28979}
28980_ACEOF
28981if ac_fn_cxx_try_compile "$LINENO"; then :
28982  # It does; now see whether it defined to BIG_ENDIAN or not.
28983	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28984/* end confdefs.h.  */
28985#include <sys/types.h>
28986		#include <sys/param.h>
28987
28988int
28989main ()
28990{
28991#if BYTE_ORDER != BIG_ENDIAN
28992		 not big endian
28993		#endif
28994
28995  ;
28996  return 0;
28997}
28998_ACEOF
28999if ac_fn_cxx_try_compile "$LINENO"; then :
29000  ac_cv_c_bigendian=yes
29001else
29002  ac_cv_c_bigendian=no
29003fi
29004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29005fi
29006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29007    fi
29008    if test $ac_cv_c_bigendian = unknown; then
29009      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
29010      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29011/* end confdefs.h.  */
29012#include <limits.h>
29013
29014int
29015main ()
29016{
29017#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
29018	      bogus endian macros
29019	     #endif
29020
29021  ;
29022  return 0;
29023}
29024_ACEOF
29025if ac_fn_cxx_try_compile "$LINENO"; then :
29026  # It does; now see whether it defined to _BIG_ENDIAN or not.
29027	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29028/* end confdefs.h.  */
29029#include <limits.h>
29030
29031int
29032main ()
29033{
29034#ifndef _BIG_ENDIAN
29035		 not big endian
29036		#endif
29037
29038  ;
29039  return 0;
29040}
29041_ACEOF
29042if ac_fn_cxx_try_compile "$LINENO"; then :
29043  ac_cv_c_bigendian=yes
29044else
29045  ac_cv_c_bigendian=no
29046fi
29047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29048fi
29049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29050    fi
29051    if test $ac_cv_c_bigendian = unknown; then
29052      # Compile a test program.
29053      if test "$cross_compiling" = yes; then :
29054  # Try to guess by grepping values from an object file.
29055	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29056/* end confdefs.h.  */
29057short int ascii_mm[] =
29058		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
29059		short int ascii_ii[] =
29060		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
29061		int use_ascii (int i) {
29062		  return ascii_mm[i] + ascii_ii[i];
29063		}
29064		short int ebcdic_ii[] =
29065		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
29066		short int ebcdic_mm[] =
29067		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
29068		int use_ebcdic (int i) {
29069		  return ebcdic_mm[i] + ebcdic_ii[i];
29070		}
29071		extern int foo;
29072
29073int
29074main ()
29075{
29076return use_ascii (foo) == use_ebcdic (foo);
29077  ;
29078  return 0;
29079}
29080_ACEOF
29081if ac_fn_cxx_try_compile "$LINENO"; then :
29082  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
29083	      ac_cv_c_bigendian=yes
29084	    fi
29085	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
29086	      if test "$ac_cv_c_bigendian" = unknown; then
29087		ac_cv_c_bigendian=no
29088	      else
29089		# finding both strings is unlikely to happen, but who knows?
29090		ac_cv_c_bigendian=unknown
29091	      fi
29092	    fi
29093fi
29094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29095else
29096  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29097/* end confdefs.h.  */
29098$ac_includes_default
29099int
29100main ()
29101{
29102
29103	     /* Are we little or big endian?  From Harbison&Steele.  */
29104	     union
29105	     {
29106	       long int l;
29107	       char c[sizeof (long int)];
29108	     } u;
29109	     u.l = 1;
29110	     return u.c[sizeof (long int) - 1] == 1;
29111
29112  ;
29113  return 0;
29114}
29115_ACEOF
29116if ac_fn_cxx_try_run "$LINENO"; then :
29117  ac_cv_c_bigendian=no
29118else
29119  ac_cv_c_bigendian=yes
29120fi
29121rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29122  conftest.$ac_objext conftest.beam conftest.$ac_ext
29123fi
29124
29125    fi
29126fi
29127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
29128$as_echo "$ac_cv_c_bigendian" >&6; }
29129 case $ac_cv_c_bigendian in #(
29130   yes)
29131     ENDIAN="big";; #(
29132   no)
29133     ENDIAN="little" ;; #(
29134   universal)
29135     ENDIAN="universal_endianness"
29136     ;; #(
29137   *)
29138     ENDIAN="unknown" ;;
29139 esac
29140
29141
29142  if test "x$ENDIAN" = xuniversal_endianness; then
29143    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
29144  fi
29145  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
29146    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
29147  fi
29148
29149
29150# Configure flags for the tools
29151
29152
29153  ###############################################################################
29154  #
29155  # How to compile shared libraries.
29156  #
29157
29158  if test "x$GCC" = xyes; then
29159    COMPILER_NAME=gcc
29160    PICFLAG="-fPIC"
29161    LIBRARY_PREFIX=lib
29162    SHARED_LIBRARY='lib$1.so'
29163    STATIC_LIBRARY='lib$1.a'
29164    SHARED_LIBRARY_FLAGS="-shared"
29165    SHARED_LIBRARY_SUFFIX='.so'
29166    STATIC_LIBRARY_SUFFIX='.a'
29167    OBJ_SUFFIX='.o'
29168    EXE_SUFFIX=''
29169    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
29170    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
29171    C_FLAG_REORDER=''
29172    CXX_FLAG_REORDER=''
29173    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29174    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29175    LD="$CC"
29176    LDEXE="$CC"
29177    LDCXX="$CXX"
29178    LDEXECXX="$CXX"
29179    POST_STRIP_CMD="$STRIP -g"
29180
29181    # Linking is different on MacOSX
29182    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29183      # Might change in the future to clang.
29184      COMPILER_NAME=gcc
29185      SHARED_LIBRARY='lib$1.dylib'
29186      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
29187      SHARED_LIBRARY_SUFFIX='.dylib'
29188      EXE_SUFFIX=''
29189      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
29190      SET_SHARED_LIBRARY_MAPFILE=''
29191      SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
29192      SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29193      POST_STRIP_CMD="$STRIP -S"
29194    fi
29195  else
29196    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29197      # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
29198      COMPILER_NAME=ossc
29199      PICFLAG="-KPIC"
29200      LIBRARY_PREFIX=lib
29201      SHARED_LIBRARY='lib$1.so'
29202      STATIC_LIBRARY='lib$1.a'
29203      SHARED_LIBRARY_FLAGS="-G"
29204      SHARED_LIBRARY_SUFFIX='.so'
29205      STATIC_LIBRARY_SUFFIX='.a'
29206      OBJ_SUFFIX='.o'
29207      EXE_SUFFIX=''
29208      SET_SHARED_LIBRARY_NAME=''
29209      SET_SHARED_LIBRARY_MAPFILE='-M$1'
29210      C_FLAG_REORDER='-xF'
29211      CXX_FLAG_REORDER='-xF'
29212      SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
29213      SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29214      CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
29215      CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
29216      CFLAGS_JDKLIB_EXTRA='-xstrconst'
29217      POST_STRIP_CMD="$STRIP -x"
29218      POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
29219    fi
29220    if test "x$OPENJDK_TARGET_OS" = xwindows; then
29221      # If it is not gcc, then assume it is the MS Visual Studio compiler
29222      COMPILER_NAME=cl
29223      PICFLAG=""
29224      LIBRARY_PREFIX=
29225      SHARED_LIBRARY='$1.dll'
29226      STATIC_LIBRARY='$1.lib'
29227      SHARED_LIBRARY_FLAGS="-LD"
29228      SHARED_LIBRARY_SUFFIX='.dll'
29229      STATIC_LIBRARY_SUFFIX='.lib'
29230      OBJ_SUFFIX='.obj'
29231      EXE_SUFFIX='.exe'
29232      SET_SHARED_LIBRARY_NAME=''
29233      SET_SHARED_LIBRARY_MAPFILE=''
29234      SET_SHARED_LIBRARY_ORIGIN=''
29235      SET_EXECUTABLE_ORIGIN=''
29236    fi
29237  fi
29238
29239
29240
29241
29242
29243
29244
29245
29246
29247
29248
29249
29250
29251
29252
29253
29254
29255
29256
29257  # The (cross) compiler is now configured, we can now test capabilities
29258  # of the target platform.
29259
29260
29261
29262  ###############################################################################
29263  #
29264  # Setup the opt flags for different compilers
29265  # and different operating systems.
29266  #
29267
29268  #
29269  # NOTE: check for -mstackrealign needs to be below potential addition of -m32
29270  #
29271  if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
29272    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
29273    # While waiting for a better solution, the current workaround is to use -mstackrealign.
29274    CFLAGS="$CFLAGS -mstackrealign"
29275    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
29276$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
29277    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29278/* end confdefs.h.  */
29279int main() { return 0; }
29280_ACEOF
29281if ac_fn_cxx_try_link "$LINENO"; then :
29282
29283          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29284$as_echo "yes" >&6; }
29285
29286else
29287
29288          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29289$as_echo "no" >&6; }
29290          as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
29291
29292
29293fi
29294rm -f core conftest.err conftest.$ac_objext \
29295    conftest$ac_exeext conftest.$ac_ext
29296  fi
29297
29298  C_FLAG_DEPS="-MMD -MF"
29299  CXX_FLAG_DEPS="-MMD -MF"
29300
29301  case $COMPILER_TYPE in
29302    CC )
29303      case $COMPILER_NAME in
29304        gcc )
29305          case $OPENJDK_TARGET_OS in
29306            macosx )
29307              # On MacOSX we optimize for size, something
29308              # we should do for all platforms?
29309              C_O_FLAG_HI="-Os"
29310              C_O_FLAG_NORM="-Os"
29311              C_O_FLAG_NONE=""
29312              ;;
29313            *)
29314              C_O_FLAG_HI="-O3"
29315              C_O_FLAG_NORM="-O2"
29316              C_O_FLAG_NONE="-O0"
29317              ;;
29318          esac
29319          CXX_O_FLAG_HI="$C_O_FLAG_HI"
29320          CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29321          CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29322          CFLAGS_DEBUG_SYMBOLS="-g"
29323          CXXFLAGS_DEBUG_SYMBOLS="-g"
29324          if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
29325            CFLAGS_DEBUG_SYMBOLS="-g1"
29326            CXXFLAGS_DEBUG_SYMBOLS="-g1"
29327          fi
29328          ;;
29329        ossc )
29330          #
29331          # Forte has different names for this with their C++ compiler...
29332          #
29333          C_FLAG_DEPS="-xMMD -xMF"
29334          CXX_FLAG_DEPS="-xMMD -xMF"
29335
29336          # Extra options used with HIGHEST
29337          #
29338          # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
29339          #          done with care, there are some assumptions below that need to
29340          #          be understood about the use of pointers, and IEEE behavior.
29341          #
29342          # Use non-standard floating point mode (not IEEE 754)
29343          CC_HIGHEST="$CC_HIGHEST -fns"
29344          # Do some simplification of floating point arithmetic (not IEEE 754)
29345          CC_HIGHEST="$CC_HIGHEST -fsimple"
29346          # Use single precision floating point with 'float'
29347          CC_HIGHEST="$CC_HIGHEST -fsingle"
29348          # Assume memory references via basic pointer types do not alias
29349          #   (Source with excessing pointer casting and data access with mixed
29350          #    pointer types are not recommended)
29351          CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
29352          # Use intrinsic or inline versions for math/std functions
29353          #   (If you expect perfect errno behavior, do not use this)
29354          CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
29355          # Loop data dependency optimizations (need -xO3 or higher)
29356          CC_HIGHEST="$CC_HIGHEST -xdepend"
29357          # Pointer parameters to functions do not overlap
29358          #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
29359          #    If you pass in multiple pointers to the same data, do not use this)
29360          CC_HIGHEST="$CC_HIGHEST -xrestrict"
29361          # Inline some library routines
29362          #   (If you expect perfect errno behavior, do not use this)
29363          CC_HIGHEST="$CC_HIGHEST -xlibmil"
29364          # Use optimized math routines
29365          #   (If you expect perfect errno behavior, do not use this)
29366          #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
29367          #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
29368
29369          if test "x$OPENJDK_TARGET_CPU" = xsparc; then
29370            CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
29371            CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
29372          fi
29373
29374          case $OPENJDK_TARGET_CPU_ARCH in
29375            x86)
29376              C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
29377              C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
29378              C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
29379              C_O_FLAG_NONE="-xregs=no%frameptr"
29380              CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
29381              CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
29382              CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
29383              CXX_O_FLAG_NONE="-xregs=no%frameptr"
29384              if test "x$OPENJDK_TARGET_CPU" = xx86; then
29385                C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
29386                CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
29387              fi
29388              ;;
29389            sparc)
29390              CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29391              CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29392              C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29393              C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29394              C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29395              C_O_FLAG_NONE=""
29396              CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29397              CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29398              CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29399              CXX_O_FLAG_NONE=""
29400              ;;
29401          esac
29402
29403          CFLAGS_DEBUG_SYMBOLS="-g -xs"
29404          CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
29405      esac
29406      ;;
29407    CL )
29408      C_O_FLAG_HIGHEST="-O2"
29409      C_O_FLAG_HI="-O1"
29410      C_O_FLAG_NORM="-O1"
29411      C_O_FLAG_NONE="-Od"
29412      CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
29413      CXX_O_FLAG_HI="$C_O_FLAG_HI"
29414      CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29415      CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29416      ;;
29417  esac
29418
29419  if test -z "$C_O_FLAG_HIGHEST"; then
29420    C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
29421  fi
29422
29423  if test -z "$CXX_O_FLAG_HIGHEST"; then
29424    CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
29425  fi
29426
29427
29428
29429
29430
29431
29432
29433
29434
29435
29436
29437
29438
29439
29440  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29441    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29442$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29443  fi
29444
29445  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29446    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29447$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29448  fi
29449
29450  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29451    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29452$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29453  fi
29454
29455
29456# Check whether --with-extra-cflags was given.
29457if test "${with_extra_cflags+set}" = set; then :
29458  withval=$with_extra_cflags;
29459fi
29460
29461
29462
29463# Check whether --with-extra-cxxflags was given.
29464if test "${with_extra_cxxflags+set}" = set; then :
29465  withval=$with_extra_cxxflags;
29466fi
29467
29468
29469
29470# Check whether --with-extra-ldflags was given.
29471if test "${with_extra_ldflags+set}" = set; then :
29472  withval=$with_extra_ldflags;
29473fi
29474
29475
29476  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
29477  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
29478  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
29479
29480  # Hotspot needs these set in their legacy form
29481  LEGACY_EXTRA_CFLAGS=$with_extra_cflags
29482  LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
29483  LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
29484
29485
29486
29487
29488
29489  ###############################################################################
29490  #
29491  # Now setup the CFLAGS and LDFLAGS for the JDK build.
29492  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
29493  #
29494  case $COMPILER_NAME in
29495    gcc )
29496      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
29497      -pipe \
29498      -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
29499      case $OPENJDK_TARGET_CPU_ARCH in
29500        arm )
29501          # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
29502          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29503          ;;
29504        ppc )
29505          # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
29506          ;;
29507        * )
29508          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
29509          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29510          ;;
29511      esac
29512      ;;
29513    ossc )
29514      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
29515      case $OPENJDK_TARGET_CPU_ARCH in
29516        x86 )
29517          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
29518          CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
29519          ;;
29520      esac
29521
29522      CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
29523      CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
29524
29525      LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
29526      LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
29527      ;;
29528    cl )
29529      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
29530      -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
29531      -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
29532      -DWIN32 -DIAL"
29533      case $OPENJDK_TARGET_CPU in
29534        x86 )
29535          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
29536          ;;
29537        x86_64 )
29538          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
29539          ;;
29540      esac
29541      ;;
29542  esac
29543
29544  ###############################################################################
29545
29546  # Adjust flags according to debug level.
29547  case $DEBUG_LEVEL in
29548    fastdebug )
29549      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29550      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29551      C_O_FLAG_HI="$C_O_FLAG_NORM"
29552      C_O_FLAG_NORM="$C_O_FLAG_NORM"
29553      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
29554      CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
29555      JAVAC_FLAGS="$JAVAC_FLAGS -g"
29556      ;;
29557    slowdebug )
29558      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29559      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29560      C_O_FLAG_HI="$C_O_FLAG_NONE"
29561      C_O_FLAG_NORM="$C_O_FLAG_NONE"
29562      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
29563      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
29564      JAVAC_FLAGS="$JAVAC_FLAGS -g"
29565      ;;
29566  esac
29567
29568  CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
29569
29570  # The package path is used only on macosx?
29571  PACKAGE_PATH=/opt/local
29572
29573
29574  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
29575    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
29576    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
29577    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
29578    #   Note: -Dmacro         is the same as    #define macro 1
29579    #         -Dmacro=        is the same as    #define macro
29580    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29581      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
29582    else
29583      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
29584    fi
29585  else
29586    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
29587  fi
29588  if test "x$OPENJDK_TARGET_OS" = xlinux; then
29589    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
29590  fi
29591  if test "x$OPENJDK_TARGET_OS" = xwindows; then
29592    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
29593  fi
29594  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29595    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
29596  fi
29597  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29598    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
29599    # Setting these parameters makes it an error to link to macosx APIs that are
29600    # newer than the given OS version and makes the linked binaries compatible even
29601    # if built on a newer version of the OS.
29602    # The expected format is X.Y.Z
29603    MACOSX_VERSION_MIN=10.7.0
29604
29605    # The macro takes the version with no dots, ex: 1070
29606    # Let the flags variables get resolved in make for easier override on make
29607    # command line.
29608    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29609    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29610  fi
29611  if test "x$OPENJDK_TARGET_OS" = xbsd; then
29612    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
29613  fi
29614  if test "x$DEBUG_LEVEL" = xrelease; then
29615    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
29616  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29617    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
29618  fi
29619  else
29620    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
29621  fi
29622
29623  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
29624  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
29625
29626  CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
29627      -I${JDK_OUTPUTDIR}/include \
29628      -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
29629      -I${JDK_TOPDIR}/src/share/javavm/export \
29630      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
29631      -I${JDK_TOPDIR}/src/share/native/common \
29632      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
29633
29634  # The shared libraries are compiled using the picflag.
29635  CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
29636  CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
29637
29638  # Executable flags
29639  CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
29640  CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
29641
29642  # Now this is odd. The JDK native libraries have to link against libjvm.so
29643  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
29644  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
29645  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
29646  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
29647  # libraries will link to whatever is in memory. Yuck.
29648  #
29649  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
29650  if test "x$COMPILER_NAME" = xcl; then
29651    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
29652    if test "x$OPENJDK_TARGET_CPU" = xx86; then
29653      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
29654    fi
29655    # TODO: make -debug optional "--disable-full-debug-symbols"
29656    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
29657    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
29658    LDFLAGS_JDKLIB_SUFFIX=""
29659    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
29660      LDFLAGS_STACK_SIZE=1048576
29661    else
29662      LDFLAGS_STACK_SIZE=327680
29663    fi
29664    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
29665  else
29666    if test "x$COMPILER_NAME" = xgcc; then
29667      # If this is a --hash-style=gnu system, use --hash-style=both, why?
29668      HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
29669      if test -n "$HAS_GNU_HASH"; then
29670        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
29671      fi
29672      if test "x$OPENJDK_TARGET_OS" = xlinux; then
29673        # And since we now know that the linker is gnu, then add -z defs, to forbid
29674        # undefined symbols in object files.
29675        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
29676        if test "x$DEBUG_LEVEL" = "xrelease"; then
29677          # When building release libraries, tell the linker optimize them.
29678          # Should this be supplied to the OSS linker as well?
29679          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
29680        fi
29681      fi
29682    fi
29683    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
29684        -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
29685
29686    # On some platforms (mac) the linker warns about non existing -L dirs.
29687    # Add server first if available. Linking aginst client does not always produce the same results.
29688    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
29689    # Default to server for other variants.
29690    if test "x$JVM_VARIANT_SERVER" = xtrue; then
29691      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29692    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
29693      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
29694    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
29695      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
29696    else
29697      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29698    fi
29699
29700    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
29701    if test "x$COMPILER_NAME" = xossc; then
29702      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
29703    fi
29704
29705    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
29706    if test "x$OPENJDK_TARGET_OS" = xlinux; then
29707      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
29708    fi
29709  fi
29710
29711
29712
29713
29714
29715
29716
29717
29718
29719
29720
29721
29722
29723
29724
29725  # Some Zero and Shark settings.
29726  # ZERO_ARCHFLAG tells the compiler which mode to build for
29727  case "${OPENJDK_TARGET_CPU}" in
29728    s390)
29729      ZERO_ARCHFLAG="-m31"
29730      ;;
29731    *)
29732      ZERO_ARCHFLAG="-m${OPENJDK_TARGET_CPU_BITS}"
29733  esac
29734
29735  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
29736$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
29737  supports=yes
29738
29739  saved_cflags="$CFLAGS"
29740  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
29741  ac_ext=c
29742ac_cpp='$CPP $CPPFLAGS'
29743ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29744ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29745ac_compiler_gnu=$ac_cv_c_compiler_gnu
29746
29747  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29748/* end confdefs.h.  */
29749int i;
29750_ACEOF
29751if ac_fn_c_try_compile "$LINENO"; then :
29752
29753else
29754  supports=no
29755fi
29756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29757  ac_ext=cpp
29758ac_cpp='$CXXCPP $CPPFLAGS'
29759ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29760ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29761ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29762
29763  CFLAGS="$saved_cflags"
29764
29765  saved_cxxflags="$CXXFLAGS"
29766  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
29767  ac_ext=cpp
29768ac_cpp='$CXXCPP $CPPFLAGS'
29769ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29770ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29771ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29772
29773  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29774/* end confdefs.h.  */
29775int i;
29776_ACEOF
29777if ac_fn_cxx_try_compile "$LINENO"; then :
29778
29779else
29780  supports=no
29781fi
29782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29783  ac_ext=cpp
29784ac_cpp='$CXXCPP $CPPFLAGS'
29785ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29786ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29787ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29788
29789  CXXFLAGS="$saved_cxxflags"
29790
29791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29792$as_echo "$supports" >&6; }
29793  if test "x$supports" = "xyes" ; then
29794    :
29795  else
29796    ZERO_ARCHFLAG=""
29797  fi
29798
29799
29800
29801  # Check that the compiler supports -mX flags
29802  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
29803
29804  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"" >&5
29805$as_echo_n "checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
29806  supports=yes
29807
29808  saved_cflags="$CFLAGS"
29809  CFLAGS="$CFLAGS -m${OPENJDK_TARGET_CPU_BITS}"
29810  ac_ext=c
29811ac_cpp='$CPP $CPPFLAGS'
29812ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29813ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29814ac_compiler_gnu=$ac_cv_c_compiler_gnu
29815
29816  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29817/* end confdefs.h.  */
29818int i;
29819_ACEOF
29820if ac_fn_c_try_compile "$LINENO"; then :
29821
29822else
29823  supports=no
29824fi
29825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29826  ac_ext=cpp
29827ac_cpp='$CXXCPP $CPPFLAGS'
29828ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29829ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29830ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29831
29832  CFLAGS="$saved_cflags"
29833
29834  saved_cxxflags="$CXXFLAGS"
29835  CXXFLAGS="$CXXFLAG -m${OPENJDK_TARGET_CPU_BITS}"
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  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29843/* end confdefs.h.  */
29844int i;
29845_ACEOF
29846if ac_fn_cxx_try_compile "$LINENO"; then :
29847
29848else
29849  supports=no
29850fi
29851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29852  ac_ext=cpp
29853ac_cpp='$CXXCPP $CPPFLAGS'
29854ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29855ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29856ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29857
29858  CXXFLAGS="$saved_cxxflags"
29859
29860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29861$as_echo "$supports" >&6; }
29862  if test "x$supports" = "xyes" ; then
29863    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
29864  else
29865    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
29866  fi
29867
29868
29869
29870
29871# Setup debug symbols (need objcopy from the toolchain for that)
29872
29873  #
29874  # ENABLE_DEBUG_SYMBOLS
29875  # This must be done after the toolchain is setup, since we're looking at objcopy.
29876  #
29877  # Check whether --enable-debug-symbols was given.
29878if test "${enable_debug_symbols+set}" = set; then :
29879  enableval=$enable_debug_symbols;
29880fi
29881
29882
29883  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
29884$as_echo_n "checking if we should generate debug symbols... " >&6; }
29885
29886  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
29887    # explicit enabling of enable-debug-symbols and can't find objcopy
29888    #   this is an error
29889    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
29890  fi
29891
29892  if test "x$enable_debug_symbols" = "xyes"; then
29893    ENABLE_DEBUG_SYMBOLS=true
29894  elif test "x$enable_debug_symbols" = "xno"; then
29895    ENABLE_DEBUG_SYMBOLS=false
29896  else
29897  # Default is on if objcopy is found
29898  if test "x$OBJCOPY" != x; then
29899    ENABLE_DEBUG_SYMBOLS=true
29900  # MacOS X and Windows don't use objcopy but default is on for those OSes
29901  elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
29902      ENABLE_DEBUG_SYMBOLS=true
29903    else
29904      ENABLE_DEBUG_SYMBOLS=false
29905    fi
29906  fi
29907
29908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
29909$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
29910
29911  #
29912  # ZIP_DEBUGINFO_FILES
29913  #
29914  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
29915$as_echo_n "checking if we should zip debug-info files... " >&6; }
29916  # Check whether --enable-zip-debug-info was given.
29917if test "${enable_zip_debug_info+set}" = set; then :
29918  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
29919else
29920  enable_zip_debug_info="yes"
29921fi
29922
29923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
29924$as_echo "${enable_zip_debug_info}" >&6; }
29925
29926  if test "x${enable_zip_debug_info}" = "xno"; then
29927    ZIP_DEBUGINFO_FILES=false
29928  else
29929    ZIP_DEBUGINFO_FILES=true
29930  fi
29931
29932
29933
29934
29935
29936
29937
29938###############################################################################
29939#
29940# Check dependencies for external and internal libraries.
29941#
29942###############################################################################
29943
29944
29945
29946  ###############################################################################
29947  #
29948  # OS specific settings that we never will need to probe.
29949  #
29950  if test "x$OPENJDK_TARGET_OS" = xlinux; then
29951    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
29952$as_echo_n "checking what is not needed on Linux?... " >&6; }
29953    PULSE_NOT_NEEDED=yes
29954    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
29955$as_echo "pulse" >&6; }
29956  fi
29957
29958  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29959    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
29960$as_echo_n "checking what is not needed on Solaris?... " >&6; }
29961    ALSA_NOT_NEEDED=yes
29962    PULSE_NOT_NEEDED=yes
29963    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
29964$as_echo "alsa pulse" >&6; }
29965  fi
29966
29967  if test "x$OPENJDK_TARGET_OS" = xwindows; then
29968    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
29969$as_echo_n "checking what is not needed on Windows?... " >&6; }
29970    CUPS_NOT_NEEDED=yes
29971    ALSA_NOT_NEEDED=yes
29972    PULSE_NOT_NEEDED=yes
29973    X11_NOT_NEEDED=yes
29974    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
29975$as_echo "alsa cups pulse x11" >&6; }
29976  fi
29977
29978  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29979    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
29980$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
29981    ALSA_NOT_NEEDED=yes
29982    PULSE_NOT_NEEDED=yes
29983    X11_NOT_NEEDED=yes
29984    FREETYPE2_NOT_NEEDED=yes
29985    # If the java runtime framework is disabled, then we need X11.
29986    # This will be adjusted below.
29987    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11 freetype" >&5
29988$as_echo "alsa pulse x11 freetype" >&6; }
29989  fi
29990
29991  if test "x$OPENJDK_TARGET_OS" = xbsd; then
29992    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
29993$as_echo_n "checking what is not needed on bsd?... " >&6; }
29994    ALSA_NOT_NEEDED=yes
29995    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
29996$as_echo "alsa" >&6; }
29997  fi
29998
29999  if test "x$OPENJDK" = "xfalse"; then
30000    FREETYPE2_NOT_NEEDED=yes
30001  fi
30002
30003  if test "x$SUPPORT_HEADFUL" = xno; then
30004    X11_NOT_NEEDED=yes
30005  fi
30006
30007  ###############################################################################
30008  #
30009  # Check for MacOSX support for OpenJDK.
30010  #
30011
30012
30013  # Check whether --enable-macosx-runtime-support was given.
30014if test "${enable_macosx_runtime_support+set}" = set; then :
30015  enableval=$enable_macosx_runtime_support;
30016fi
30017
30018  if test "x$enable_macosx_runtime_support" != x; then
30019    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&5
30020$as_echo "$as_me: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&2;}
30021  fi
30022
30023
30024  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mac OS X Java Framework" >&5
30025$as_echo_n "checking for Mac OS X Java Framework... " >&6; }
30026  if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
30027    { $as_echo "$as_me:${as_lineno-$LINENO}: result: /System/Library/Frameworks/JavaVM.framework" >&5
30028$as_echo "/System/Library/Frameworks/JavaVM.framework" >&6; }
30029  else
30030    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30031$as_echo "no" >&6; }
30032  fi
30033
30034
30035
30036  ###############################################################################
30037  #
30038  # Check for X Windows
30039  #
30040
30041  # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
30042  # Make a simple check for the libraries at the sysroot, and setup --x-includes and
30043  # --x-libraries for the sysroot, if that seems to be correct.
30044  if test "x$SYS_ROOT" != "x/"; then
30045    if test "x$x_includes" = xNONE; then
30046      if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
30047        x_includes="$SYS_ROOT/usr/X11R6/include"
30048      elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
30049        x_includes="$SYS_ROOT/usr/include"
30050      fi
30051    fi
30052    if test "x$x_libraries" = xNONE; then
30053      if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
30054        x_libraries="$SYS_ROOT/usr/X11R6/lib"
30055      elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
30056        x_libraries="$SYS_ROOT/usr/lib64"
30057      elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
30058        x_libraries="$SYS_ROOT/usr/lib"
30059      fi
30060    fi
30061  fi
30062
30063  # Now let autoconf do it's magic
30064  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
30065$as_echo_n "checking for X... " >&6; }
30066
30067
30068# Check whether --with-x was given.
30069if test "${with_x+set}" = set; then :
30070  withval=$with_x;
30071fi
30072
30073# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
30074if test "x$with_x" = xno; then
30075  # The user explicitly disabled X.
30076  have_x=disabled
30077else
30078  case $x_includes,$x_libraries in #(
30079    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
30080    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
30081  $as_echo_n "(cached) " >&6
30082else
30083  # One or both of the vars are not set, and there is no cached value.
30084ac_x_includes=no ac_x_libraries=no
30085rm -f -r conftest.dir
30086if mkdir conftest.dir; then
30087  cd conftest.dir
30088  cat >Imakefile <<'_ACEOF'
30089incroot:
30090	@echo incroot='${INCROOT}'
30091usrlibdir:
30092	@echo usrlibdir='${USRLIBDIR}'
30093libdir:
30094	@echo libdir='${LIBDIR}'
30095_ACEOF
30096  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
30097    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
30098    for ac_var in incroot usrlibdir libdir; do
30099      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
30100    done
30101    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
30102    for ac_extension in a so sl dylib la dll; do
30103      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
30104	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
30105	ac_im_usrlibdir=$ac_im_libdir; break
30106      fi
30107    done
30108    # Screen out bogus values from the imake configuration.  They are
30109    # bogus both because they are the default anyway, and because
30110    # using them would break gcc on systems where it needs fixed includes.
30111    case $ac_im_incroot in
30112	/usr/include) ac_x_includes= ;;
30113	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
30114    esac
30115    case $ac_im_usrlibdir in
30116	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
30117	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
30118    esac
30119  fi
30120  cd ..
30121  rm -f -r conftest.dir
30122fi
30123
30124# Standard set of common directories for X headers.
30125# Check X11 before X11Rn because it is often a symlink to the current release.
30126ac_x_header_dirs='
30127/usr/X11/include
30128/usr/X11R7/include
30129/usr/X11R6/include
30130/usr/X11R5/include
30131/usr/X11R4/include
30132
30133/usr/include/X11
30134/usr/include/X11R7
30135/usr/include/X11R6
30136/usr/include/X11R5
30137/usr/include/X11R4
30138
30139/usr/local/X11/include
30140/usr/local/X11R7/include
30141/usr/local/X11R6/include
30142/usr/local/X11R5/include
30143/usr/local/X11R4/include
30144
30145/usr/local/include/X11
30146/usr/local/include/X11R7
30147/usr/local/include/X11R6
30148/usr/local/include/X11R5
30149/usr/local/include/X11R4
30150
30151/usr/X386/include
30152/usr/x386/include
30153/usr/XFree86/include/X11
30154
30155/usr/include
30156/usr/local/include
30157/usr/unsupported/include
30158/usr/athena/include
30159/usr/local/x11r5/include
30160/usr/lpp/Xamples/include
30161
30162/usr/openwin/include
30163/usr/openwin/share/include'
30164
30165if test "$ac_x_includes" = no; then
30166  # Guess where to find include files, by looking for Xlib.h.
30167  # First, try using that file with no special directory specified.
30168  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30169/* end confdefs.h.  */
30170#include <X11/Xlib.h>
30171_ACEOF
30172if ac_fn_cxx_try_cpp "$LINENO"; then :
30173  # We can compile using X headers with no special include directory.
30174ac_x_includes=
30175else
30176  for ac_dir in $ac_x_header_dirs; do
30177  if test -r "$ac_dir/X11/Xlib.h"; then
30178    ac_x_includes=$ac_dir
30179    break
30180  fi
30181done
30182fi
30183rm -f conftest.err conftest.i conftest.$ac_ext
30184fi # $ac_x_includes = no
30185
30186if test "$ac_x_libraries" = no; then
30187  # Check for the libraries.
30188  # See if we find them without any special options.
30189  # Don't add to $LIBS permanently.
30190  ac_save_LIBS=$LIBS
30191  LIBS="-lX11 $LIBS"
30192  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30193/* end confdefs.h.  */
30194#include <X11/Xlib.h>
30195int
30196main ()
30197{
30198XrmInitialize ()
30199  ;
30200  return 0;
30201}
30202_ACEOF
30203if ac_fn_cxx_try_link "$LINENO"; then :
30204  LIBS=$ac_save_LIBS
30205# We can link X programs with no special library path.
30206ac_x_libraries=
30207else
30208  LIBS=$ac_save_LIBS
30209for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
30210do
30211  # Don't even attempt the hair of trying to link an X program!
30212  for ac_extension in a so sl dylib la dll; do
30213    if test -r "$ac_dir/libX11.$ac_extension"; then
30214      ac_x_libraries=$ac_dir
30215      break 2
30216    fi
30217  done
30218done
30219fi
30220rm -f core conftest.err conftest.$ac_objext \
30221    conftest$ac_exeext conftest.$ac_ext
30222fi # $ac_x_libraries = no
30223
30224case $ac_x_includes,$ac_x_libraries in #(
30225  no,* | *,no | *\'*)
30226    # Didn't find X, or a directory has "'" in its name.
30227    ac_cv_have_x="have_x=no";; #(
30228  *)
30229    # Record where we found X for the cache.
30230    ac_cv_have_x="have_x=yes\
30231	ac_x_includes='$ac_x_includes'\
30232	ac_x_libraries='$ac_x_libraries'"
30233esac
30234fi
30235;; #(
30236    *) have_x=yes;;
30237  esac
30238  eval "$ac_cv_have_x"
30239fi # $with_x != no
30240
30241if test "$have_x" != yes; then
30242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
30243$as_echo "$have_x" >&6; }
30244  no_x=yes
30245else
30246  # If each of the values was on the command line, it overrides each guess.
30247  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
30248  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
30249  # Update the cache value to reflect the command line values.
30250  ac_cv_have_x="have_x=yes\
30251	ac_x_includes='$x_includes'\
30252	ac_x_libraries='$x_libraries'"
30253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
30254$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
30255fi
30256
30257  if test "$no_x" = yes; then
30258  # Not all programs may use this symbol, but it does not hurt to define it.
30259
30260$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
30261
30262  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
30263else
30264  if test -n "$x_includes"; then
30265    X_CFLAGS="$X_CFLAGS -I$x_includes"
30266  fi
30267
30268  # It would also be nice to do this for all -L options, not just this one.
30269  if test -n "$x_libraries"; then
30270    X_LIBS="$X_LIBS -L$x_libraries"
30271    # For Solaris; some versions of Sun CC require a space after -R and
30272    # others require no space.  Words are not sufficient . . . .
30273    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
30274$as_echo_n "checking whether -R must be followed by a space... " >&6; }
30275    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
30276    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
30277    ac_cxx_werror_flag=yes
30278    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30279/* end confdefs.h.  */
30280
30281int
30282main ()
30283{
30284
30285  ;
30286  return 0;
30287}
30288_ACEOF
30289if ac_fn_cxx_try_link "$LINENO"; then :
30290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30291$as_echo "no" >&6; }
30292       X_LIBS="$X_LIBS -R$x_libraries"
30293else
30294  LIBS="$ac_xsave_LIBS -R $x_libraries"
30295       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30296/* end confdefs.h.  */
30297
30298int
30299main ()
30300{
30301
30302  ;
30303  return 0;
30304}
30305_ACEOF
30306if ac_fn_cxx_try_link "$LINENO"; then :
30307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30308$as_echo "yes" >&6; }
30309	  X_LIBS="$X_LIBS -R $x_libraries"
30310else
30311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
30312$as_echo "neither works" >&6; }
30313fi
30314rm -f core conftest.err conftest.$ac_objext \
30315    conftest$ac_exeext conftest.$ac_ext
30316fi
30317rm -f core conftest.err conftest.$ac_objext \
30318    conftest$ac_exeext conftest.$ac_ext
30319    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
30320    LIBS=$ac_xsave_LIBS
30321  fi
30322
30323  # Check for system-dependent libraries X programs must link with.
30324  # Do this before checking for the system-independent R6 libraries
30325  # (-lICE), since we may need -lsocket or whatever for X linking.
30326
30327  if test "$ISC" = yes; then
30328    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
30329  else
30330    # Martyn Johnson says this is needed for Ultrix, if the X
30331    # libraries were built with DECnet support.  And Karl Berry says
30332    # the Alpha needs dnet_stub (dnet does not exist).
30333    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
30334    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30335/* end confdefs.h.  */
30336
30337/* Override any GCC internal prototype to avoid an error.
30338   Use char because int might match the return type of a GCC
30339   builtin and then its argument prototype would still apply.  */
30340#ifdef __cplusplus
30341extern "C"
30342#endif
30343char XOpenDisplay ();
30344int
30345main ()
30346{
30347return XOpenDisplay ();
30348  ;
30349  return 0;
30350}
30351_ACEOF
30352if ac_fn_cxx_try_link "$LINENO"; then :
30353
30354else
30355  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
30356$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
30357if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
30358  $as_echo_n "(cached) " >&6
30359else
30360  ac_check_lib_save_LIBS=$LIBS
30361LIBS="-ldnet  $LIBS"
30362cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30363/* end confdefs.h.  */
30364
30365/* Override any GCC internal prototype to avoid an error.
30366   Use char because int might match the return type of a GCC
30367   builtin and then its argument prototype would still apply.  */
30368#ifdef __cplusplus
30369extern "C"
30370#endif
30371char dnet_ntoa ();
30372int
30373main ()
30374{
30375return dnet_ntoa ();
30376  ;
30377  return 0;
30378}
30379_ACEOF
30380if ac_fn_cxx_try_link "$LINENO"; then :
30381  ac_cv_lib_dnet_dnet_ntoa=yes
30382else
30383  ac_cv_lib_dnet_dnet_ntoa=no
30384fi
30385rm -f core conftest.err conftest.$ac_objext \
30386    conftest$ac_exeext conftest.$ac_ext
30387LIBS=$ac_check_lib_save_LIBS
30388fi
30389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
30390$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
30391if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
30392  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
30393fi
30394
30395    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
30396      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
30397$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
30398if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
30399  $as_echo_n "(cached) " >&6
30400else
30401  ac_check_lib_save_LIBS=$LIBS
30402LIBS="-ldnet_stub  $LIBS"
30403cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30404/* end confdefs.h.  */
30405
30406/* Override any GCC internal prototype to avoid an error.
30407   Use char because int might match the return type of a GCC
30408   builtin and then its argument prototype would still apply.  */
30409#ifdef __cplusplus
30410extern "C"
30411#endif
30412char dnet_ntoa ();
30413int
30414main ()
30415{
30416return dnet_ntoa ();
30417  ;
30418  return 0;
30419}
30420_ACEOF
30421if ac_fn_cxx_try_link "$LINENO"; then :
30422  ac_cv_lib_dnet_stub_dnet_ntoa=yes
30423else
30424  ac_cv_lib_dnet_stub_dnet_ntoa=no
30425fi
30426rm -f core conftest.err conftest.$ac_objext \
30427    conftest$ac_exeext conftest.$ac_ext
30428LIBS=$ac_check_lib_save_LIBS
30429fi
30430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
30431$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
30432if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
30433  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
30434fi
30435
30436    fi
30437fi
30438rm -f core conftest.err conftest.$ac_objext \
30439    conftest$ac_exeext conftest.$ac_ext
30440    LIBS="$ac_xsave_LIBS"
30441
30442    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
30443    # to get the SysV transport functions.
30444    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
30445    # needs -lnsl.
30446    # The nsl library prevents programs from opening the X display
30447    # on Irix 5.2, according to T.E. Dickey.
30448    # The functions gethostbyname, getservbyname, and inet_addr are
30449    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
30450    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
30451if test "x$ac_cv_func_gethostbyname" = xyes; then :
30452
30453fi
30454
30455    if test $ac_cv_func_gethostbyname = no; then
30456      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
30457$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
30458if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
30459  $as_echo_n "(cached) " >&6
30460else
30461  ac_check_lib_save_LIBS=$LIBS
30462LIBS="-lnsl  $LIBS"
30463cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30464/* end confdefs.h.  */
30465
30466/* Override any GCC internal prototype to avoid an error.
30467   Use char because int might match the return type of a GCC
30468   builtin and then its argument prototype would still apply.  */
30469#ifdef __cplusplus
30470extern "C"
30471#endif
30472char gethostbyname ();
30473int
30474main ()
30475{
30476return gethostbyname ();
30477  ;
30478  return 0;
30479}
30480_ACEOF
30481if ac_fn_cxx_try_link "$LINENO"; then :
30482  ac_cv_lib_nsl_gethostbyname=yes
30483else
30484  ac_cv_lib_nsl_gethostbyname=no
30485fi
30486rm -f core conftest.err conftest.$ac_objext \
30487    conftest$ac_exeext conftest.$ac_ext
30488LIBS=$ac_check_lib_save_LIBS
30489fi
30490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
30491$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
30492if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
30493  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
30494fi
30495
30496      if test $ac_cv_lib_nsl_gethostbyname = no; then
30497	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
30498$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
30499if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
30500  $as_echo_n "(cached) " >&6
30501else
30502  ac_check_lib_save_LIBS=$LIBS
30503LIBS="-lbsd  $LIBS"
30504cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30505/* end confdefs.h.  */
30506
30507/* Override any GCC internal prototype to avoid an error.
30508   Use char because int might match the return type of a GCC
30509   builtin and then its argument prototype would still apply.  */
30510#ifdef __cplusplus
30511extern "C"
30512#endif
30513char gethostbyname ();
30514int
30515main ()
30516{
30517return gethostbyname ();
30518  ;
30519  return 0;
30520}
30521_ACEOF
30522if ac_fn_cxx_try_link "$LINENO"; then :
30523  ac_cv_lib_bsd_gethostbyname=yes
30524else
30525  ac_cv_lib_bsd_gethostbyname=no
30526fi
30527rm -f core conftest.err conftest.$ac_objext \
30528    conftest$ac_exeext conftest.$ac_ext
30529LIBS=$ac_check_lib_save_LIBS
30530fi
30531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
30532$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
30533if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
30534  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
30535fi
30536
30537      fi
30538    fi
30539
30540    # lieder@skyler.mavd.honeywell.com says without -lsocket,
30541    # socket/setsockopt and other routines are undefined under SCO ODT
30542    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
30543    # on later versions), says Simon Leinen: it contains gethostby*
30544    # variants that don't use the name server (or something).  -lsocket
30545    # must be given before -lnsl if both are needed.  We assume that
30546    # if connect needs -lnsl, so does gethostbyname.
30547    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
30548if test "x$ac_cv_func_connect" = xyes; then :
30549
30550fi
30551
30552    if test $ac_cv_func_connect = no; then
30553      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
30554$as_echo_n "checking for connect in -lsocket... " >&6; }
30555if ${ac_cv_lib_socket_connect+:} false; then :
30556  $as_echo_n "(cached) " >&6
30557else
30558  ac_check_lib_save_LIBS=$LIBS
30559LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
30560cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30561/* end confdefs.h.  */
30562
30563/* Override any GCC internal prototype to avoid an error.
30564   Use char because int might match the return type of a GCC
30565   builtin and then its argument prototype would still apply.  */
30566#ifdef __cplusplus
30567extern "C"
30568#endif
30569char connect ();
30570int
30571main ()
30572{
30573return connect ();
30574  ;
30575  return 0;
30576}
30577_ACEOF
30578if ac_fn_cxx_try_link "$LINENO"; then :
30579  ac_cv_lib_socket_connect=yes
30580else
30581  ac_cv_lib_socket_connect=no
30582fi
30583rm -f core conftest.err conftest.$ac_objext \
30584    conftest$ac_exeext conftest.$ac_ext
30585LIBS=$ac_check_lib_save_LIBS
30586fi
30587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
30588$as_echo "$ac_cv_lib_socket_connect" >&6; }
30589if test "x$ac_cv_lib_socket_connect" = xyes; then :
30590  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
30591fi
30592
30593    fi
30594
30595    # Guillermo Gomez says -lposix is necessary on A/UX.
30596    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
30597if test "x$ac_cv_func_remove" = xyes; then :
30598
30599fi
30600
30601    if test $ac_cv_func_remove = no; then
30602      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
30603$as_echo_n "checking for remove in -lposix... " >&6; }
30604if ${ac_cv_lib_posix_remove+:} false; then :
30605  $as_echo_n "(cached) " >&6
30606else
30607  ac_check_lib_save_LIBS=$LIBS
30608LIBS="-lposix  $LIBS"
30609cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30610/* end confdefs.h.  */
30611
30612/* Override any GCC internal prototype to avoid an error.
30613   Use char because int might match the return type of a GCC
30614   builtin and then its argument prototype would still apply.  */
30615#ifdef __cplusplus
30616extern "C"
30617#endif
30618char remove ();
30619int
30620main ()
30621{
30622return remove ();
30623  ;
30624  return 0;
30625}
30626_ACEOF
30627if ac_fn_cxx_try_link "$LINENO"; then :
30628  ac_cv_lib_posix_remove=yes
30629else
30630  ac_cv_lib_posix_remove=no
30631fi
30632rm -f core conftest.err conftest.$ac_objext \
30633    conftest$ac_exeext conftest.$ac_ext
30634LIBS=$ac_check_lib_save_LIBS
30635fi
30636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
30637$as_echo "$ac_cv_lib_posix_remove" >&6; }
30638if test "x$ac_cv_lib_posix_remove" = xyes; then :
30639  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
30640fi
30641
30642    fi
30643
30644    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
30645    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
30646if test "x$ac_cv_func_shmat" = xyes; then :
30647
30648fi
30649
30650    if test $ac_cv_func_shmat = no; then
30651      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
30652$as_echo_n "checking for shmat in -lipc... " >&6; }
30653if ${ac_cv_lib_ipc_shmat+:} false; then :
30654  $as_echo_n "(cached) " >&6
30655else
30656  ac_check_lib_save_LIBS=$LIBS
30657LIBS="-lipc  $LIBS"
30658cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30659/* end confdefs.h.  */
30660
30661/* Override any GCC internal prototype to avoid an error.
30662   Use char because int might match the return type of a GCC
30663   builtin and then its argument prototype would still apply.  */
30664#ifdef __cplusplus
30665extern "C"
30666#endif
30667char shmat ();
30668int
30669main ()
30670{
30671return shmat ();
30672  ;
30673  return 0;
30674}
30675_ACEOF
30676if ac_fn_cxx_try_link "$LINENO"; then :
30677  ac_cv_lib_ipc_shmat=yes
30678else
30679  ac_cv_lib_ipc_shmat=no
30680fi
30681rm -f core conftest.err conftest.$ac_objext \
30682    conftest$ac_exeext conftest.$ac_ext
30683LIBS=$ac_check_lib_save_LIBS
30684fi
30685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
30686$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
30687if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
30688  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
30689fi
30690
30691    fi
30692  fi
30693
30694  # Check for libraries that X11R6 Xt/Xaw programs need.
30695  ac_save_LDFLAGS=$LDFLAGS
30696  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
30697  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
30698  # check for ICE first), but we must link in the order -lSM -lICE or
30699  # we get undefined symbols.  So assume we have SM if we have ICE.
30700  # These have to be linked with before -lX11, unlike the other
30701  # libraries we check for below, so use a different variable.
30702  # John Interrante, Karl Berry
30703  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
30704$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
30705if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
30706  $as_echo_n "(cached) " >&6
30707else
30708  ac_check_lib_save_LIBS=$LIBS
30709LIBS="-lICE $X_EXTRA_LIBS $LIBS"
30710cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30711/* end confdefs.h.  */
30712
30713/* Override any GCC internal prototype to avoid an error.
30714   Use char because int might match the return type of a GCC
30715   builtin and then its argument prototype would still apply.  */
30716#ifdef __cplusplus
30717extern "C"
30718#endif
30719char IceConnectionNumber ();
30720int
30721main ()
30722{
30723return IceConnectionNumber ();
30724  ;
30725  return 0;
30726}
30727_ACEOF
30728if ac_fn_cxx_try_link "$LINENO"; then :
30729  ac_cv_lib_ICE_IceConnectionNumber=yes
30730else
30731  ac_cv_lib_ICE_IceConnectionNumber=no
30732fi
30733rm -f core conftest.err conftest.$ac_objext \
30734    conftest$ac_exeext conftest.$ac_ext
30735LIBS=$ac_check_lib_save_LIBS
30736fi
30737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
30738$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
30739if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
30740  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
30741fi
30742
30743  LDFLAGS=$ac_save_LDFLAGS
30744
30745fi
30746
30747
30748  # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
30749  # this doesn't make sense so we remove it.
30750  if test "x$COMPILE_TYPE" = xcross; then
30751    X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
30752  fi
30753
30754  if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
30755
30756  # Print a helpful message on how to acquire the necessary build dependency.
30757  # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30758  MISSING_DEPENDENCY=x11
30759
30760  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30761    cygwin_help $MISSING_DEPENDENCY
30762  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30763    msys_help $MISSING_DEPENDENCY
30764  else
30765    PKGHANDLER_COMMAND=
30766
30767    case $PKGHANDLER in
30768      apt-get)
30769        apt_help     $MISSING_DEPENDENCY ;;
30770      yum)
30771        yum_help     $MISSING_DEPENDENCY ;;
30772      port)
30773        port_help    $MISSING_DEPENDENCY ;;
30774      pkgutil)
30775        pkgutil_help $MISSING_DEPENDENCY ;;
30776      pkgadd)
30777        pkgadd_help  $MISSING_DEPENDENCY ;;
30778      * )
30779        break ;;
30780    esac
30781
30782    if test "x$PKGHANDLER_COMMAND" != x; then
30783      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30784    fi
30785  fi
30786
30787    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
30788  fi
30789
30790  # Some of the old makefiles require a setting of OPENWIN_HOME
30791  # Since the X11R6 directory has disappeared on later Linuxes,
30792  # we need to probe for it.
30793  if test "x$OPENJDK_TARGET_OS" = xlinux; then
30794    if test -d "$SYS_ROOT/usr/X11R6"; then
30795      OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
30796    elif test -d "$SYS_ROOT/usr/include/X11"; then
30797      OPENWIN_HOME="$SYS_ROOT/usr"
30798    fi
30799  fi
30800  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30801    OPENWIN_HOME="/usr/openwin"
30802  fi
30803
30804
30805
30806  #
30807  # Weird Sol10 something check...TODO change to try compile
30808  #
30809  if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
30810    if test "`uname -r`" = "5.10"; then
30811      if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
30812        X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
30813      fi
30814    fi
30815  fi
30816
30817  ac_ext=c
30818ac_cpp='$CPP $CPPFLAGS'
30819ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30820ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30821ac_compiler_gnu=$ac_cv_c_compiler_gnu
30822
30823  OLD_CFLAGS="$CFLAGS"
30824  CFLAGS="$CFLAGS $X_CFLAGS"
30825
30826  # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
30827  for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
30828do :
30829  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30830ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
30831        # include <X11/Xlib.h>
30832        # include <X11/Xutil.h>
30833
30834
30835"
30836if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30837  cat >>confdefs.h <<_ACEOF
30838#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30839_ACEOF
30840 X11_A_OK=yes
30841else
30842  X11_A_OK=no; break
30843fi
30844
30845done
30846
30847
30848  CFLAGS="$OLD_CFLAGS"
30849  ac_ext=cpp
30850ac_cpp='$CXXCPP $CPPFLAGS'
30851ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30852ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30853ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30854
30855
30856  if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
30857
30858  # Print a helpful message on how to acquire the necessary build dependency.
30859  # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30860  MISSING_DEPENDENCY=x11
30861
30862  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30863    cygwin_help $MISSING_DEPENDENCY
30864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30865    msys_help $MISSING_DEPENDENCY
30866  else
30867    PKGHANDLER_COMMAND=
30868
30869    case $PKGHANDLER in
30870      apt-get)
30871        apt_help     $MISSING_DEPENDENCY ;;
30872      yum)
30873        yum_help     $MISSING_DEPENDENCY ;;
30874      port)
30875        port_help    $MISSING_DEPENDENCY ;;
30876      pkgutil)
30877        pkgutil_help $MISSING_DEPENDENCY ;;
30878      pkgadd)
30879        pkgadd_help  $MISSING_DEPENDENCY ;;
30880      * )
30881        break ;;
30882    esac
30883
30884    if test "x$PKGHANDLER_COMMAND" != x; then
30885      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30886    fi
30887  fi
30888
30889    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
30890  fi
30891
30892
30893
30894
30895
30896
30897  ###############################################################################
30898  #
30899  # The common unix printing system cups is used to print from java.
30900  #
30901
30902# Check whether --with-cups was given.
30903if test "${with_cups+set}" = set; then :
30904  withval=$with_cups;
30905fi
30906
30907
30908# Check whether --with-cups-include was given.
30909if test "${with_cups_include+set}" = set; then :
30910  withval=$with_cups_include;
30911fi
30912
30913
30914  if test "x$CUPS_NOT_NEEDED" = xyes; then
30915    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
30916      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
30917$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
30918    fi
30919    CUPS_CFLAGS=
30920  else
30921    CUPS_FOUND=no
30922
30923    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
30924      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
30925    fi
30926
30927    if test "x${with_cups}" != x; then
30928      CUPS_CFLAGS="-I${with_cups}/include"
30929      CUPS_FOUND=yes
30930    fi
30931    if test "x${with_cups_include}" != x; then
30932      CUPS_CFLAGS="-I${with_cups_include}"
30933      CUPS_FOUND=yes
30934    fi
30935    if test "x$CUPS_FOUND" = xno; then
30936
30937
30938  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30939    # Source the builddeps file again, to make sure it uses the latest variables!
30940    . $builddepsfile
30941    # Look for a target and build machine specific resource!
30942    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30943    if test "x$resource" = x; then
30944      # Ok, lets instead look for a target specific resource
30945      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
30946    fi
30947    if test "x$resource" = x; then
30948      # Ok, lets instead look for a build specific resource
30949      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
30950    fi
30951    if test "x$resource" = x; then
30952      # Ok, lets instead look for a generic resource
30953      # (The cups comes from M4 and not the shell, thus no need for eval here.)
30954      resource=${builddep_cups}
30955    fi
30956    if test "x$resource" != x; then
30957      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
30958$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
30959      # If the resource in the builddeps.conf file is an existing directory,
30960      # for example /java/linux/cups
30961      if test -d ${resource}; then
30962        depdir=${resource}
30963      else
30964
30965  # cups is for example mymodule
30966  # $resource is for example libs/general/libmymod_1_2_3.zip
30967  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30968  # $with_builddeps_dir is for example /localhome/builddeps
30969  # depdir is the name of the variable into which we store the depdir, eg MYMOD
30970  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30971  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30972  filename=`basename $resource`
30973  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30974  filebase=${filename%%.*}
30975  extension=${filename#*.}
30976  installdir=$with_builddeps_dir/$filebase
30977  if test ! -f $installdir/$filename.unpacked; then
30978    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
30979$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30980    if test ! -d $installdir; then
30981      mkdir -p $installdir
30982    fi
30983    if test ! -d $installdir; then
30984      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30985    fi
30986    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
30987    touch $tmpfile
30988    if test ! -f $tmpfile; then
30989      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30990    fi
30991
30992  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30993  # $tmpfile is the local file name for the downloaded file.
30994  VALID_TOOL=no
30995  if test "x$BDEPS_FTP" = xwget; then
30996    VALID_TOOL=yes
30997    wget -O $tmpfile $with_builddeps_server/$resource
30998  fi
30999  if test "x$BDEPS_FTP" = xlftp; then
31000    VALID_TOOL=yes
31001    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31002  fi
31003  if test "x$BDEPS_FTP" = xftp; then
31004    VALID_TOOL=yes
31005    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31006    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31007    FTPUSERPWD=${FTPSERVER%%@*}
31008    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31009      FTPUSER=${userpwd%%:*}
31010      FTPPWD=${userpwd#*@}
31011      FTPSERVER=${FTPSERVER#*@}
31012    else
31013      FTPUSER=ftp
31014      FTPPWD=ftp
31015    fi
31016    # the "pass" command does not work on some
31017    # ftp clients (read ftp.exe) but if it works,
31018    # passive mode is better!
31019    ( \
31020        echo "user $FTPUSER $FTPPWD"        ; \
31021        echo "pass"                         ; \
31022        echo "bin"                          ; \
31023        echo "get $FTPPATH $tmpfile"              ; \
31024    ) | ftp -in $FTPSERVER
31025  fi
31026  if test "x$VALID_TOOL" != xyes; then
31027    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31028  fi
31029
31030    mv $tmpfile $installdir/$filename
31031    if test ! -s $installdir/$filename; then
31032      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31033    fi
31034    case "$extension" in
31035      zip)  echo "Unzipping $installdir/$filename..."
31036        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31037        ;;
31038      tar.gz) echo "Untaring $installdir/$filename..."
31039        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31040        ;;
31041      tgz) echo "Untaring $installdir/$filename..."
31042        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31043        ;;
31044      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31045        ;;
31046    esac
31047  fi
31048  if test -f $installdir/$filename.unpacked; then
31049    depdir=$installdir
31050  fi
31051
31052      fi
31053      # Source the builddeps file again, because in the previous command, the depdir
31054      # was updated to point at the current build dependency install directory.
31055      . $builddepsfile
31056      # Now extract variables from the builddeps.conf files.
31057      theroot=${builddep_cups_ROOT}
31058      thecflags=${builddep_cups_CFLAGS}
31059      thelibs=${builddep_cups_LIBS}
31060      if test "x$depdir" = x; then
31061        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
31062      fi
31063      CUPS=$depdir
31064      if test "x$theroot" != x; then
31065        CUPS="$theroot"
31066      fi
31067      if test "x$thecflags" != x; then
31068        CUPS_CFLAGS="$thecflags"
31069      fi
31070      if test "x$thelibs" != x; then
31071        CUPS_LIBS="$thelibs"
31072      fi
31073      CUPS_FOUND=yes
31074
31075    fi
31076
31077  fi
31078
31079    fi
31080    if test "x$CUPS_FOUND" = xno; then
31081      # Are the cups headers installed in the default /usr/include location?
31082      for ac_header in cups/cups.h cups/ppd.h
31083do :
31084  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
31085ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
31086if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
31087  cat >>confdefs.h <<_ACEOF
31088#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
31089_ACEOF
31090
31091            CUPS_FOUND=yes
31092            CUPS_CFLAGS=
31093            DEFAULT_CUPS=yes
31094
31095
31096fi
31097
31098done
31099
31100    fi
31101    if test "x$CUPS_FOUND" = xno; then
31102      # Getting nervous now? Lets poke around for standard Solaris third-party
31103      # package installation locations.
31104      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
31105$as_echo_n "checking for cups headers... " >&6; }
31106      if test -s /opt/sfw/cups/include/cups/cups.h; then
31107        # An SFW package seems to be installed!
31108        CUPS_FOUND=yes
31109        CUPS_CFLAGS="-I/opt/sfw/cups/include"
31110      elif test -s /opt/csw/include/cups/cups.h; then
31111        # A CSW package seems to be installed!
31112        CUPS_FOUND=yes
31113        CUPS_CFLAGS="-I/opt/csw/include"
31114      fi
31115      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
31116$as_echo "$CUPS_FOUND" >&6; }
31117    fi
31118    if test "x$CUPS_FOUND" = xno; then
31119
31120  # Print a helpful message on how to acquire the necessary build dependency.
31121  # cups is the help tag: freetyp2, cups, pulse, alsa etc
31122  MISSING_DEPENDENCY=cups
31123
31124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31125    cygwin_help $MISSING_DEPENDENCY
31126  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31127    msys_help $MISSING_DEPENDENCY
31128  else
31129    PKGHANDLER_COMMAND=
31130
31131    case $PKGHANDLER in
31132      apt-get)
31133        apt_help     $MISSING_DEPENDENCY ;;
31134      yum)
31135        yum_help     $MISSING_DEPENDENCY ;;
31136      port)
31137        port_help    $MISSING_DEPENDENCY ;;
31138      pkgutil)
31139        pkgutil_help $MISSING_DEPENDENCY ;;
31140      pkgadd)
31141        pkgadd_help  $MISSING_DEPENDENCY ;;
31142      * )
31143        break ;;
31144    esac
31145
31146    if test "x$PKGHANDLER_COMMAND" != x; then
31147      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31148    fi
31149  fi
31150
31151      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
31152    fi
31153  fi
31154
31155
31156
31157
31158
31159
31160  ###############################################################################
31161  #
31162  # The ubiquitous freetype2 library is used to render fonts.
31163  #
31164
31165# Check whether --with-freetype was given.
31166if test "${with_freetype+set}" = set; then :
31167  withval=$with_freetype;
31168fi
31169
31170
31171  # If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
31172  USING_SYSTEM_FT_LIB=false
31173
31174  if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
31175    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
31176      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
31177$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
31178    fi
31179    FREETYPE2_CFLAGS=
31180    FREETYPE2_LIBS=
31181    FREETYPE2_LIB_PATH=
31182  else
31183    FREETYPE2_FOUND=no
31184
31185    if test "x$with_freetype" != x; then
31186
31187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31188
31189  # Input might be given as Windows format, start by converting to
31190  # unix format.
31191  path="$with_freetype"
31192  new_path=`$CYGPATH -u "$path"`
31193
31194  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31195  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31196  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31197  # "foo.exe" is OK but "foo" is an error.
31198  #
31199  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31200  # It is also a way to make sure we got the proper file name for the real test later on.
31201  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31202  if test "x$test_shortpath" = x; then
31203    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
31204$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
31205    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
31206  fi
31207
31208  # Call helper function which possibly converts this using DOS-style short mode.
31209  # If so, the updated path is stored in $new_path.
31210
31211  input_path="$new_path"
31212  # Check if we need to convert this using DOS-style short mode. If the path
31213  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31214  # take no chances and rewrite it.
31215  # Note: m4 eats our [], so we need to use [ and ] instead.
31216  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31217  if test "x$has_forbidden_chars" != x; then
31218    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31219    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31220    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31221    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31222      # Going to short mode and back again did indeed matter. Since short mode is
31223      # case insensitive, let's make it lowercase to improve readability.
31224      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31225      # Now convert it back to Unix-stile (cygpath)
31226      input_path=`$CYGPATH -u "$shortmode_path"`
31227      new_path="$input_path"
31228    fi
31229  fi
31230
31231  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31232  if test "x$test_cygdrive_prefix" = x; then
31233    # As a simple fix, exclude /usr/bin since it's not a real path.
31234    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31235      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31236      # a path prefixed by /cygdrive for fixpath to work.
31237      new_path="$CYGWIN_ROOT_PATH$input_path"
31238    fi
31239  fi
31240
31241
31242  if test "x$path" != "x$new_path"; then
31243    with_freetype="$new_path"
31244    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
31245$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
31246  fi
31247
31248  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31249
31250  path="$with_freetype"
31251  has_colon=`$ECHO $path | $GREP ^.:`
31252  new_path="$path"
31253  if test "x$has_colon" = x; then
31254    # Not in mixed or Windows style, start by that.
31255    new_path=`cmd //c echo $path`
31256  fi
31257
31258
31259  input_path="$new_path"
31260  # Check if we need to convert this using DOS-style short mode. If the path
31261  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31262  # take no chances and rewrite it.
31263  # Note: m4 eats our [], so we need to use [ and ] instead.
31264  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31265  if test "x$has_forbidden_chars" != x; then
31266    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31267    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31268  fi
31269
31270
31271  windows_path="$new_path"
31272  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31273    unix_path=`$CYGPATH -u "$windows_path"`
31274    new_path="$unix_path"
31275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31276    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31277    new_path="$unix_path"
31278  fi
31279
31280  if test "x$path" != "x$new_path"; then
31281    with_freetype="$new_path"
31282    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
31283$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
31284  fi
31285
31286  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31287  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31288
31289  else
31290    # We're on a posix platform. Hooray! :)
31291    path="$with_freetype"
31292    has_space=`$ECHO "$path" | $GREP " "`
31293    if test "x$has_space" != x; then
31294      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
31295$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
31296      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31297    fi
31298
31299    # Use eval to expand a potential ~
31300    eval path="$path"
31301    if test ! -f "$path" && test ! -d "$path"; then
31302      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
31303    fi
31304
31305    with_freetype="`cd "$path"; $THEPWDCMD -L`"
31306  fi
31307
31308      FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
31309      FREETYPE2_LIB_PATH="$with_freetype/lib"
31310      if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
31311        FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
31312        FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
31313      fi
31314      if test "x$OPENJDK_TARGET_OS" = xwindows; then
31315        FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
31316      fi
31317      FREETYPE2_CFLAGS="-I$with_freetype/include"
31318      if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
31319        FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
31320      fi
31321      FREETYPE2_FOUND=yes
31322      if test "x$FREETYPE2_FOUND" = xyes; then
31323        # Verify that the directories exist
31324        if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
31325          as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
31326        fi
31327        # List the contents of the lib.
31328        FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
31329        if test "x$FREETYPELIB" = x; then
31330          as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
31331        fi
31332        # Check one h-file
31333        if ! test -s "$with_freetype/include/ft2build.h"; then
31334          as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
31335        fi
31336      fi
31337    fi
31338    if test "x$FREETYPE2_FOUND" = xno; then
31339
31340
31341  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31342    # Source the builddeps file again, to make sure it uses the latest variables!
31343    . $builddepsfile
31344    # Look for a target and build machine specific resource!
31345    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31346    if test "x$resource" = x; then
31347      # Ok, lets instead look for a target specific resource
31348      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
31349    fi
31350    if test "x$resource" = x; then
31351      # Ok, lets instead look for a build specific resource
31352      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
31353    fi
31354    if test "x$resource" = x; then
31355      # Ok, lets instead look for a generic resource
31356      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
31357      resource=${builddep_freetype2}
31358    fi
31359    if test "x$resource" != x; then
31360      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
31361$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
31362      # If the resource in the builddeps.conf file is an existing directory,
31363      # for example /java/linux/cups
31364      if test -d ${resource}; then
31365        depdir=${resource}
31366      else
31367
31368  # freetype2 is for example mymodule
31369  # $resource is for example libs/general/libmymod_1_2_3.zip
31370  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31371  # $with_builddeps_dir is for example /localhome/builddeps
31372  # depdir is the name of the variable into which we store the depdir, eg MYMOD
31373  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31374  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31375  filename=`basename $resource`
31376  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31377  filebase=${filename%%.*}
31378  extension=${filename#*.}
31379  installdir=$with_builddeps_dir/$filebase
31380  if test ! -f $installdir/$filename.unpacked; then
31381    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
31382$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31383    if test ! -d $installdir; then
31384      mkdir -p $installdir
31385    fi
31386    if test ! -d $installdir; then
31387      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31388    fi
31389    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
31390    touch $tmpfile
31391    if test ! -f $tmpfile; then
31392      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31393    fi
31394
31395  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31396  # $tmpfile is the local file name for the downloaded file.
31397  VALID_TOOL=no
31398  if test "x$BDEPS_FTP" = xwget; then
31399    VALID_TOOL=yes
31400    wget -O $tmpfile $with_builddeps_server/$resource
31401  fi
31402  if test "x$BDEPS_FTP" = xlftp; then
31403    VALID_TOOL=yes
31404    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31405  fi
31406  if test "x$BDEPS_FTP" = xftp; then
31407    VALID_TOOL=yes
31408    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31409    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31410    FTPUSERPWD=${FTPSERVER%%@*}
31411    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31412      FTPUSER=${userpwd%%:*}
31413      FTPPWD=${userpwd#*@}
31414      FTPSERVER=${FTPSERVER#*@}
31415    else
31416      FTPUSER=ftp
31417      FTPPWD=ftp
31418    fi
31419    # the "pass" command does not work on some
31420    # ftp clients (read ftp.exe) but if it works,
31421    # passive mode is better!
31422    ( \
31423        echo "user $FTPUSER $FTPPWD"        ; \
31424        echo "pass"                         ; \
31425        echo "bin"                          ; \
31426        echo "get $FTPPATH $tmpfile"              ; \
31427    ) | ftp -in $FTPSERVER
31428  fi
31429  if test "x$VALID_TOOL" != xyes; then
31430    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31431  fi
31432
31433    mv $tmpfile $installdir/$filename
31434    if test ! -s $installdir/$filename; then
31435      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31436    fi
31437    case "$extension" in
31438      zip)  echo "Unzipping $installdir/$filename..."
31439        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31440        ;;
31441      tar.gz) echo "Untaring $installdir/$filename..."
31442        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31443        ;;
31444      tgz) echo "Untaring $installdir/$filename..."
31445        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31446        ;;
31447      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31448        ;;
31449    esac
31450  fi
31451  if test -f $installdir/$filename.unpacked; then
31452    depdir=$installdir
31453  fi
31454
31455      fi
31456      # Source the builddeps file again, because in the previous command, the depdir
31457      # was updated to point at the current build dependency install directory.
31458      . $builddepsfile
31459      # Now extract variables from the builddeps.conf files.
31460      theroot=${builddep_freetype2_ROOT}
31461      thecflags=${builddep_freetype2_CFLAGS}
31462      thelibs=${builddep_freetype2_LIBS}
31463      if test "x$depdir" = x; then
31464        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
31465      fi
31466      FREETYPE2=$depdir
31467      if test "x$theroot" != x; then
31468        FREETYPE2="$theroot"
31469      fi
31470      if test "x$thecflags" != x; then
31471        FREETYPE2_CFLAGS="$thecflags"
31472      fi
31473      if test "x$thelibs" != x; then
31474        FREETYPE2_LIBS="$thelibs"
31475      fi
31476      FREETYPE2_FOUND=yes
31477      else FREETYPE2_FOUND=no
31478
31479    fi
31480    else FREETYPE2_FOUND=no
31481
31482  fi
31483
31484      USING_SYSTEM_FT_LIB=true
31485    fi
31486    if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
31487      FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
31488
31489  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31490
31491  # Input might be given as Windows format, start by converting to
31492  # unix format.
31493  path="$FREETYPELOCATION"
31494  new_path=`$CYGPATH -u "$path"`
31495
31496  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31497  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31498  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31499  # "foo.exe" is OK but "foo" is an error.
31500  #
31501  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31502  # It is also a way to make sure we got the proper file name for the real test later on.
31503  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31504  if test "x$test_shortpath" = x; then
31505    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31506$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31507    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
31508  fi
31509
31510  # Call helper function which possibly converts this using DOS-style short mode.
31511  # If so, the updated path is stored in $new_path.
31512
31513  input_path="$new_path"
31514  # Check if we need to convert this using DOS-style short mode. If the path
31515  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31516  # take no chances and rewrite it.
31517  # Note: m4 eats our [], so we need to use [ and ] instead.
31518  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31519  if test "x$has_forbidden_chars" != x; then
31520    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31521    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31522    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31523    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31524      # Going to short mode and back again did indeed matter. Since short mode is
31525      # case insensitive, let's make it lowercase to improve readability.
31526      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31527      # Now convert it back to Unix-stile (cygpath)
31528      input_path=`$CYGPATH -u "$shortmode_path"`
31529      new_path="$input_path"
31530    fi
31531  fi
31532
31533  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31534  if test "x$test_cygdrive_prefix" = x; then
31535    # As a simple fix, exclude /usr/bin since it's not a real path.
31536    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31537      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31538      # a path prefixed by /cygdrive for fixpath to work.
31539      new_path="$CYGWIN_ROOT_PATH$input_path"
31540    fi
31541  fi
31542
31543
31544  if test "x$path" != "x$new_path"; then
31545    FREETYPELOCATION="$new_path"
31546    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31547$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31548  fi
31549
31550  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31551
31552  path="$FREETYPELOCATION"
31553  has_colon=`$ECHO $path | $GREP ^.:`
31554  new_path="$path"
31555  if test "x$has_colon" = x; then
31556    # Not in mixed or Windows style, start by that.
31557    new_path=`cmd //c echo $path`
31558  fi
31559
31560
31561  input_path="$new_path"
31562  # Check if we need to convert this using DOS-style short mode. If the path
31563  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31564  # take no chances and rewrite it.
31565  # Note: m4 eats our [], so we need to use [ and ] instead.
31566  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31567  if test "x$has_forbidden_chars" != x; then
31568    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31569    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31570  fi
31571
31572
31573  windows_path="$new_path"
31574  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31575    unix_path=`$CYGPATH -u "$windows_path"`
31576    new_path="$unix_path"
31577  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31578    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31579    new_path="$unix_path"
31580  fi
31581
31582  if test "x$path" != "x$new_path"; then
31583    FREETYPELOCATION="$new_path"
31584    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31585$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31586  fi
31587
31588  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31589  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31590
31591  else
31592    # We're on a posix platform. Hooray! :)
31593    path="$FREETYPELOCATION"
31594    has_space=`$ECHO "$path" | $GREP " "`
31595    if test "x$has_space" != x; then
31596      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31597$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31598      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31599    fi
31600
31601    # Use eval to expand a potential ~
31602    eval path="$path"
31603    if test ! -f "$path" && test ! -d "$path"; then
31604      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
31605    fi
31606
31607    FREETYPELOCATION="`cd "$path"; $THEPWDCMD -L`"
31608  fi
31609
31610      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
31611$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
31612      if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
31613        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
31614        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
31615        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
31616        if ! test -s "$FREETYPE2_LIBS"; then
31617          as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
31618        fi
31619        if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
31620          as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
31621        fi
31622        USING_SYSTEM_FT_LIB=true
31623        FREETYPE2_FOUND=yes
31624      fi
31625      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31626$as_echo "$FREETYPE2_FOUND" >&6; }
31627    fi
31628    if test "x$FREETYPE2_FOUND" = xno; then
31629
31630pkg_failed=no
31631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
31632$as_echo_n "checking for FREETYPE2... " >&6; }
31633
31634if test -n "$FREETYPE2_CFLAGS"; then
31635    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
31636 elif test -n "$PKG_CONFIG"; then
31637    if test -n "$PKG_CONFIG" && \
31638    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31639  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31640  ac_status=$?
31641  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31642  test $ac_status = 0; }; then
31643  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
31644else
31645  pkg_failed=yes
31646fi
31647 else
31648    pkg_failed=untried
31649fi
31650if test -n "$FREETYPE2_LIBS"; then
31651    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
31652 elif test -n "$PKG_CONFIG"; then
31653    if test -n "$PKG_CONFIG" && \
31654    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31655  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31656  ac_status=$?
31657  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31658  test $ac_status = 0; }; then
31659  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
31660else
31661  pkg_failed=yes
31662fi
31663 else
31664    pkg_failed=untried
31665fi
31666
31667
31668
31669if test $pkg_failed = yes; then
31670
31671if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31672        _pkg_short_errors_supported=yes
31673else
31674        _pkg_short_errors_supported=no
31675fi
31676        if test $_pkg_short_errors_supported = yes; then
31677	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
31678        else
31679	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
31680        fi
31681	# Put the nasty error message in config.log where it belongs
31682	echo "$FREETYPE2_PKG_ERRORS" >&5
31683
31684	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31685$as_echo "no" >&6; }
31686                FREETYPE2_FOUND=no
31687elif test $pkg_failed = untried; then
31688	FREETYPE2_FOUND=no
31689else
31690	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
31691	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
31692        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31693$as_echo "yes" >&6; }
31694	FREETYPE2_FOUND=yes
31695fi
31696      # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
31697      FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
31698      USING_SYSTEM_FT_LIB=true
31699      # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
31700      if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
31701        FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
31702      fi
31703    fi
31704    if test "x$FREETYPE2_FOUND" = xno; then
31705      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
31706$as_echo_n "checking for freetype in some standard locations... " >&6; }
31707
31708      if test -s $SYS_ROOT/usr/X11/include/ft2build.h && test -d $SYS_ROOT/usr/X11/include/freetype2/freetype; then
31709        DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/X11/include/freetype2 -I$SYS_ROOT/usr/X11/include"
31710        DEFAULT_FREETYPE_LIBS="-L$SYS_ROOT/usr/X11/lib -lfreetype"
31711      fi
31712      if test -s $SYS_ROOT/usr/include/ft2build.h && test -d $SYS_ROOT/usr/include/freetype2/freetype; then
31713        DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/include/freetype2"
31714        DEFAULT_FREETYPE_LIBS="-lfreetype"
31715      fi
31716
31717      PREV_CXXCFLAGS="$CXXFLAGS"
31718      PREV_LDFLAGS="$LDFLAGS"
31719      CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
31720      LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
31721      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31722/* end confdefs.h.  */
31723
31724            #include<ft2build.h>
31725            #include FT_FREETYPE_H
31726            int main() { return 0; }
31727
31728_ACEOF
31729if ac_fn_cxx_try_link "$LINENO"; then :
31730
31731            # Yes, the default cflags and libs did the trick.
31732            FREETYPE2_FOUND=yes
31733            FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
31734            FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
31735
31736else
31737
31738            FREETYPE2_FOUND=no
31739
31740
31741fi
31742rm -f core conftest.err conftest.$ac_objext \
31743    conftest$ac_exeext conftest.$ac_ext
31744      CXXCFLAGS="$PREV_CXXFLAGS"
31745      LDFLAGS="$PREV_LDFLAGS"
31746      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31747$as_echo "$FREETYPE2_FOUND" >&6; }
31748      USING_SYSTEM_FT_LIB=true
31749    fi
31750    if test "x$FREETYPE2_FOUND" = xno; then
31751
31752  # Print a helpful message on how to acquire the necessary build dependency.
31753  # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
31754  MISSING_DEPENDENCY=freetype2
31755
31756  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31757    cygwin_help $MISSING_DEPENDENCY
31758  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31759    msys_help $MISSING_DEPENDENCY
31760  else
31761    PKGHANDLER_COMMAND=
31762
31763    case $PKGHANDLER in
31764      apt-get)
31765        apt_help     $MISSING_DEPENDENCY ;;
31766      yum)
31767        yum_help     $MISSING_DEPENDENCY ;;
31768      port)
31769        port_help    $MISSING_DEPENDENCY ;;
31770      pkgutil)
31771        pkgutil_help $MISSING_DEPENDENCY ;;
31772      pkgadd)
31773        pkgadd_help  $MISSING_DEPENDENCY ;;
31774      * )
31775        break ;;
31776    esac
31777
31778    if test "x$PKGHANDLER_COMMAND" != x; then
31779      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31780    fi
31781  fi
31782
31783      as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31784    fi
31785
31786    if test "x$OPENJDK_TARGET_OS" != xwindows; then
31787      # AC_CHECK_LIB does not support use of cl.exe
31788      PREV_LDFLAGS="$LDFLAGS"
31789      LDFLAGS="$FREETYPE2_LIBS"
31790      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
31791$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
31792if ${ac_cv_lib_freetype_FT_Init_FreeType+:} false; then :
31793  $as_echo_n "(cached) " >&6
31794else
31795  ac_check_lib_save_LIBS=$LIBS
31796LIBS="-lfreetype  $LIBS"
31797cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31798/* end confdefs.h.  */
31799
31800/* Override any GCC internal prototype to avoid an error.
31801   Use char because int might match the return type of a GCC
31802   builtin and then its argument prototype would still apply.  */
31803#ifdef __cplusplus
31804extern "C"
31805#endif
31806char FT_Init_FreeType ();
31807int
31808main ()
31809{
31810return FT_Init_FreeType ();
31811  ;
31812  return 0;
31813}
31814_ACEOF
31815if ac_fn_cxx_try_link "$LINENO"; then :
31816  ac_cv_lib_freetype_FT_Init_FreeType=yes
31817else
31818  ac_cv_lib_freetype_FT_Init_FreeType=no
31819fi
31820rm -f core conftest.err conftest.$ac_objext \
31821    conftest$ac_exeext conftest.$ac_ext
31822LIBS=$ac_check_lib_save_LIBS
31823fi
31824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
31825$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
31826if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = xyes; then :
31827  FREETYPE2_FOUND=true
31828else
31829  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31830fi
31831
31832      LDFLAGS="$PREV_LDFLAGS"
31833    fi
31834  fi
31835
31836
31837
31838
31839
31840
31841
31842
31843  ###############################################################################
31844  #
31845  # Check for alsa headers and libraries. Used on Linux/GNU systems.
31846  #
31847
31848# Check whether --with-alsa was given.
31849if test "${with_alsa+set}" = set; then :
31850  withval=$with_alsa;
31851fi
31852
31853
31854# Check whether --with-alsa-include was given.
31855if test "${with_alsa_include+set}" = set; then :
31856  withval=$with_alsa_include;
31857fi
31858
31859
31860# Check whether --with-alsa-lib was given.
31861if test "${with_alsa_lib+set}" = set; then :
31862  withval=$with_alsa_lib;
31863fi
31864
31865
31866  if test "x$ALSA_NOT_NEEDED" = xyes; then
31867    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
31868      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
31869$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
31870    fi
31871    ALSA_CFLAGS=
31872    ALSA_LIBS=
31873  else
31874    ALSA_FOUND=no
31875
31876    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
31877      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
31878    fi
31879
31880    if test "x${with_alsa}" != x; then
31881      ALSA_LIBS="-L${with_alsa}/lib -lalsa"
31882      ALSA_CFLAGS="-I${with_alsa}/include"
31883      ALSA_FOUND=yes
31884    fi
31885    if test "x${with_alsa_include}" != x; then
31886      ALSA_CFLAGS="-I${with_alsa_include}"
31887      ALSA_FOUND=yes
31888    fi
31889    if test "x${with_alsa_lib}" != x; then
31890      ALSA_LIBS="-L${with_alsa_lib} -lalsa"
31891      ALSA_FOUND=yes
31892    fi
31893    if test "x$ALSA_FOUND" = xno; then
31894
31895
31896  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31897    # Source the builddeps file again, to make sure it uses the latest variables!
31898    . $builddepsfile
31899    # Look for a target and build machine specific resource!
31900    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31901    if test "x$resource" = x; then
31902      # Ok, lets instead look for a target specific resource
31903      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
31904    fi
31905    if test "x$resource" = x; then
31906      # Ok, lets instead look for a build specific resource
31907      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
31908    fi
31909    if test "x$resource" = x; then
31910      # Ok, lets instead look for a generic resource
31911      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
31912      resource=${builddep_alsa}
31913    fi
31914    if test "x$resource" != x; then
31915      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
31916$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
31917      # If the resource in the builddeps.conf file is an existing directory,
31918      # for example /java/linux/cups
31919      if test -d ${resource}; then
31920        depdir=${resource}
31921      else
31922
31923  # alsa is for example mymodule
31924  # $resource is for example libs/general/libmymod_1_2_3.zip
31925  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31926  # $with_builddeps_dir is for example /localhome/builddeps
31927  # depdir is the name of the variable into which we store the depdir, eg MYMOD
31928  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31929  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31930  filename=`basename $resource`
31931  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31932  filebase=${filename%%.*}
31933  extension=${filename#*.}
31934  installdir=$with_builddeps_dir/$filebase
31935  if test ! -f $installdir/$filename.unpacked; then
31936    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
31937$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31938    if test ! -d $installdir; then
31939      mkdir -p $installdir
31940    fi
31941    if test ! -d $installdir; then
31942      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31943    fi
31944    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
31945    touch $tmpfile
31946    if test ! -f $tmpfile; then
31947      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31948    fi
31949
31950  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31951  # $tmpfile is the local file name for the downloaded file.
31952  VALID_TOOL=no
31953  if test "x$BDEPS_FTP" = xwget; then
31954    VALID_TOOL=yes
31955    wget -O $tmpfile $with_builddeps_server/$resource
31956  fi
31957  if test "x$BDEPS_FTP" = xlftp; then
31958    VALID_TOOL=yes
31959    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31960  fi
31961  if test "x$BDEPS_FTP" = xftp; then
31962    VALID_TOOL=yes
31963    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31964    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31965    FTPUSERPWD=${FTPSERVER%%@*}
31966    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31967      FTPUSER=${userpwd%%:*}
31968      FTPPWD=${userpwd#*@}
31969      FTPSERVER=${FTPSERVER#*@}
31970    else
31971      FTPUSER=ftp
31972      FTPPWD=ftp
31973    fi
31974    # the "pass" command does not work on some
31975    # ftp clients (read ftp.exe) but if it works,
31976    # passive mode is better!
31977    ( \
31978        echo "user $FTPUSER $FTPPWD"        ; \
31979        echo "pass"                         ; \
31980        echo "bin"                          ; \
31981        echo "get $FTPPATH $tmpfile"              ; \
31982    ) | ftp -in $FTPSERVER
31983  fi
31984  if test "x$VALID_TOOL" != xyes; then
31985    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31986  fi
31987
31988    mv $tmpfile $installdir/$filename
31989    if test ! -s $installdir/$filename; then
31990      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31991    fi
31992    case "$extension" in
31993      zip)  echo "Unzipping $installdir/$filename..."
31994        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31995        ;;
31996      tar.gz) echo "Untaring $installdir/$filename..."
31997        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31998        ;;
31999      tgz) echo "Untaring $installdir/$filename..."
32000        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
32001        ;;
32002      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
32003        ;;
32004    esac
32005  fi
32006  if test -f $installdir/$filename.unpacked; then
32007    depdir=$installdir
32008  fi
32009
32010      fi
32011      # Source the builddeps file again, because in the previous command, the depdir
32012      # was updated to point at the current build dependency install directory.
32013      . $builddepsfile
32014      # Now extract variables from the builddeps.conf files.
32015      theroot=${builddep_alsa_ROOT}
32016      thecflags=${builddep_alsa_CFLAGS}
32017      thelibs=${builddep_alsa_LIBS}
32018      if test "x$depdir" = x; then
32019        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
32020      fi
32021      ALSA=$depdir
32022      if test "x$theroot" != x; then
32023        ALSA="$theroot"
32024      fi
32025      if test "x$thecflags" != x; then
32026        ALSA_CFLAGS="$thecflags"
32027      fi
32028      if test "x$thelibs" != x; then
32029        ALSA_LIBS="$thelibs"
32030      fi
32031      ALSA_FOUND=yes
32032      else ALSA_FOUND=no
32033
32034    fi
32035    else ALSA_FOUND=no
32036
32037  fi
32038
32039    fi
32040    if test "x$ALSA_FOUND" = xno; then
32041
32042pkg_failed=no
32043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
32044$as_echo_n "checking for ALSA... " >&6; }
32045
32046if test -n "$ALSA_CFLAGS"; then
32047    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
32048 elif test -n "$PKG_CONFIG"; then
32049    if test -n "$PKG_CONFIG" && \
32050    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
32051  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
32052  ac_status=$?
32053  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32054  test $ac_status = 0; }; then
32055  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
32056else
32057  pkg_failed=yes
32058fi
32059 else
32060    pkg_failed=untried
32061fi
32062if test -n "$ALSA_LIBS"; then
32063    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
32064 elif test -n "$PKG_CONFIG"; then
32065    if test -n "$PKG_CONFIG" && \
32066    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
32067  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
32068  ac_status=$?
32069  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32070  test $ac_status = 0; }; then
32071  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
32072else
32073  pkg_failed=yes
32074fi
32075 else
32076    pkg_failed=untried
32077fi
32078
32079
32080
32081if test $pkg_failed = yes; then
32082
32083if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32084        _pkg_short_errors_supported=yes
32085else
32086        _pkg_short_errors_supported=no
32087fi
32088        if test $_pkg_short_errors_supported = yes; then
32089	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
32090        else
32091	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
32092        fi
32093	# Put the nasty error message in config.log where it belongs
32094	echo "$ALSA_PKG_ERRORS" >&5
32095
32096	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32097$as_echo "no" >&6; }
32098                ALSA_FOUND=no
32099elif test $pkg_failed = untried; then
32100	ALSA_FOUND=no
32101else
32102	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
32103	ALSA_LIBS=$pkg_cv_ALSA_LIBS
32104        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32105$as_echo "yes" >&6; }
32106	ALSA_FOUND=yes
32107fi
32108    fi
32109    if test "x$ALSA_FOUND" = xno; then
32110      for ac_header in alsa/asoundlib.h
32111do :
32112  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
32113if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
32114  cat >>confdefs.h <<_ACEOF
32115#define HAVE_ALSA_ASOUNDLIB_H 1
32116_ACEOF
32117
32118            ALSA_FOUND=yes
32119            ALSA_CFLAGS=-Iignoreme
32120            ALSA_LIBS=-lasound
32121            DEFAULT_ALSA=yes
32122
32123else
32124  ALSA_FOUND=no
32125fi
32126
32127done
32128
32129    fi
32130    if test "x$ALSA_FOUND" = xno; then
32131
32132  # Print a helpful message on how to acquire the necessary build dependency.
32133  # alsa is the help tag: freetyp2, cups, pulse, alsa etc
32134  MISSING_DEPENDENCY=alsa
32135
32136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32137    cygwin_help $MISSING_DEPENDENCY
32138  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32139    msys_help $MISSING_DEPENDENCY
32140  else
32141    PKGHANDLER_COMMAND=
32142
32143    case $PKGHANDLER in
32144      apt-get)
32145        apt_help     $MISSING_DEPENDENCY ;;
32146      yum)
32147        yum_help     $MISSING_DEPENDENCY ;;
32148      port)
32149        port_help    $MISSING_DEPENDENCY ;;
32150      pkgutil)
32151        pkgutil_help $MISSING_DEPENDENCY ;;
32152      pkgadd)
32153        pkgadd_help  $MISSING_DEPENDENCY ;;
32154      * )
32155        break ;;
32156    esac
32157
32158    if test "x$PKGHANDLER_COMMAND" != x; then
32159      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
32160    fi
32161  fi
32162
32163      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
32164    fi
32165  fi
32166
32167
32168
32169
32170
32171
32172  ###############################################################################
32173  #
32174  # Check for the jpeg library
32175  #
32176
32177  USE_EXTERNAL_LIBJPEG=true
32178  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
32179$as_echo_n "checking for main in -ljpeg... " >&6; }
32180if ${ac_cv_lib_jpeg_main+:} false; then :
32181  $as_echo_n "(cached) " >&6
32182else
32183  ac_check_lib_save_LIBS=$LIBS
32184LIBS="-ljpeg  $LIBS"
32185cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32186/* end confdefs.h.  */
32187
32188
32189int
32190main ()
32191{
32192return main ();
32193  ;
32194  return 0;
32195}
32196_ACEOF
32197if ac_fn_cxx_try_link "$LINENO"; then :
32198  ac_cv_lib_jpeg_main=yes
32199else
32200  ac_cv_lib_jpeg_main=no
32201fi
32202rm -f core conftest.err conftest.$ac_objext \
32203    conftest$ac_exeext conftest.$ac_ext
32204LIBS=$ac_check_lib_save_LIBS
32205fi
32206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
32207$as_echo "$ac_cv_lib_jpeg_main" >&6; }
32208if test "x$ac_cv_lib_jpeg_main" = xyes; then :
32209  cat >>confdefs.h <<_ACEOF
32210#define HAVE_LIBJPEG 1
32211_ACEOF
32212
32213  LIBS="-ljpeg $LIBS"
32214
32215else
32216   USE_EXTERNAL_LIBJPEG=false
32217      { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
32218$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
32219
32220fi
32221
32222
32223
32224  ###############################################################################
32225  #
32226  # Check for the gif library
32227  #
32228
32229
32230# Check whether --with-giflib was given.
32231if test "${with_giflib+set}" = set; then :
32232  withval=$with_giflib;
32233fi
32234
32235
32236
32237  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
32238$as_echo_n "checking for which giflib to use... " >&6; }
32239
32240  # default is bundled
32241  DEFAULT_GIFLIB=bundled
32242
32243  #
32244  # if user didn't specify, use DEFAULT_GIFLIB
32245  #
32246  if test "x${with_giflib}" = "x"; then
32247    with_giflib=${DEFAULT_GIFLIB}
32248  fi
32249
32250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
32251$as_echo "${with_giflib}" >&6; }
32252
32253  if test "x${with_giflib}" = "xbundled"; then
32254    USE_EXTERNAL_LIBGIF=false
32255  elif test "x${with_giflib}" = "xsystem"; then
32256    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
32257if test "x$ac_cv_header_gif_lib_h" = xyes; then :
32258
32259else
32260   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
32261fi
32262
32263
32264    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
32265$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
32266if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
32267  $as_echo_n "(cached) " >&6
32268else
32269  ac_check_lib_save_LIBS=$LIBS
32270LIBS="-lgif  $LIBS"
32271cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32272/* end confdefs.h.  */
32273
32274/* Override any GCC internal prototype to avoid an error.
32275   Use char because int might match the return type of a GCC
32276   builtin and then its argument prototype would still apply.  */
32277#ifdef __cplusplus
32278extern "C"
32279#endif
32280char DGifGetCode ();
32281int
32282main ()
32283{
32284return DGifGetCode ();
32285  ;
32286  return 0;
32287}
32288_ACEOF
32289if ac_fn_cxx_try_link "$LINENO"; then :
32290  ac_cv_lib_gif_DGifGetCode=yes
32291else
32292  ac_cv_lib_gif_DGifGetCode=no
32293fi
32294rm -f core conftest.err conftest.$ac_objext \
32295    conftest$ac_exeext conftest.$ac_ext
32296LIBS=$ac_check_lib_save_LIBS
32297fi
32298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
32299$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
32300if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
32301  cat >>confdefs.h <<_ACEOF
32302#define HAVE_LIBGIF 1
32303_ACEOF
32304
32305  LIBS="-lgif $LIBS"
32306
32307else
32308   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
32309fi
32310
32311
32312    USE_EXTERNAL_LIBGIF=true
32313  else
32314    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
32315  fi
32316
32317
32318  ###############################################################################
32319  #
32320  # Check for the zlib library
32321  #
32322
32323
32324# Check whether --with-zlib was given.
32325if test "${with_zlib+set}" = set; then :
32326  withval=$with_zlib;
32327fi
32328
32329
32330  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
32331$as_echo_n "checking for compress in -lz... " >&6; }
32332if ${ac_cv_lib_z_compress+:} false; then :
32333  $as_echo_n "(cached) " >&6
32334else
32335  ac_check_lib_save_LIBS=$LIBS
32336LIBS="-lz  $LIBS"
32337cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32338/* end confdefs.h.  */
32339
32340/* Override any GCC internal prototype to avoid an error.
32341   Use char because int might match the return type of a GCC
32342   builtin and then its argument prototype would still apply.  */
32343#ifdef __cplusplus
32344extern "C"
32345#endif
32346char compress ();
32347int
32348main ()
32349{
32350return compress ();
32351  ;
32352  return 0;
32353}
32354_ACEOF
32355if ac_fn_cxx_try_link "$LINENO"; then :
32356  ac_cv_lib_z_compress=yes
32357else
32358  ac_cv_lib_z_compress=no
32359fi
32360rm -f core conftest.err conftest.$ac_objext \
32361    conftest$ac_exeext conftest.$ac_ext
32362LIBS=$ac_check_lib_save_LIBS
32363fi
32364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
32365$as_echo "$ac_cv_lib_z_compress" >&6; }
32366if test "x$ac_cv_lib_z_compress" = xyes; then :
32367   ZLIB_FOUND=yes
32368else
32369   ZLIB_FOUND=no
32370fi
32371
32372
32373  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
32374$as_echo_n "checking for which zlib to use... " >&6; }
32375
32376  DEFAULT_ZLIB=bundled
32377  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32378    #
32379    # On macosx default is system...on others default is
32380    #
32381    DEFAULT_ZLIB=system
32382  fi
32383
32384  if test "x${ZLIB_FOUND}" != "xyes"; then
32385    #
32386    # If we don't find any system...set default to bundled
32387    #
32388    DEFAULT_ZLIB=bundled
32389  fi
32390
32391  #
32392  # If user didn't specify, use DEFAULT_ZLIB
32393  #
32394  if test "x${with_zlib}" = "x"; then
32395    with_zlib=${DEFAULT_ZLIB}
32396  fi
32397
32398  if test "x${with_zlib}" = "xbundled"; then
32399    USE_EXTERNAL_LIBZ=false
32400    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
32401$as_echo "bundled" >&6; }
32402  elif test "x${with_zlib}" = "xsystem"; then
32403    if test "x${ZLIB_FOUND}" = "xyes"; then
32404      USE_EXTERNAL_LIBZ=true
32405      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
32406$as_echo "system" >&6; }
32407    else
32408      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
32409$as_echo "system not found" >&6; }
32410      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
32411    fi
32412  else
32413    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
32414  fi
32415
32416
32417
32418  ###############################################################################
32419  LIBZIP_CAN_USE_MMAP=true
32420
32421
32422
32423  ###############################################################################
32424  #
32425  # Check if altzone exists in time.h
32426  #
32427
32428  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32429/* end confdefs.h.  */
32430#include <time.h>
32431int
32432main ()
32433{
32434return (int)altzone;
32435  ;
32436  return 0;
32437}
32438_ACEOF
32439if ac_fn_cxx_try_link "$LINENO"; then :
32440  has_altzone=yes
32441else
32442  has_altzone=no
32443fi
32444rm -f core conftest.err conftest.$ac_objext \
32445    conftest$ac_exeext conftest.$ac_ext
32446  if test "x$has_altzone" = xyes; then
32447
32448$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
32449
32450  fi
32451
32452  ###############################################################################
32453  #
32454  # Check the maths library
32455  #
32456
32457  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
32458$as_echo_n "checking for cos in -lm... " >&6; }
32459if ${ac_cv_lib_m_cos+:} false; then :
32460  $as_echo_n "(cached) " >&6
32461else
32462  ac_check_lib_save_LIBS=$LIBS
32463LIBS="-lm  $LIBS"
32464cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32465/* end confdefs.h.  */
32466
32467/* Override any GCC internal prototype to avoid an error.
32468   Use char because int might match the return type of a GCC
32469   builtin and then its argument prototype would still apply.  */
32470#ifdef __cplusplus
32471extern "C"
32472#endif
32473char cos ();
32474int
32475main ()
32476{
32477return cos ();
32478  ;
32479  return 0;
32480}
32481_ACEOF
32482if ac_fn_cxx_try_link "$LINENO"; then :
32483  ac_cv_lib_m_cos=yes
32484else
32485  ac_cv_lib_m_cos=no
32486fi
32487rm -f core conftest.err conftest.$ac_objext \
32488    conftest$ac_exeext conftest.$ac_ext
32489LIBS=$ac_check_lib_save_LIBS
32490fi
32491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
32492$as_echo "$ac_cv_lib_m_cos" >&6; }
32493if test "x$ac_cv_lib_m_cos" = xyes; then :
32494  cat >>confdefs.h <<_ACEOF
32495#define HAVE_LIBM 1
32496_ACEOF
32497
32498  LIBS="-lm $LIBS"
32499
32500else
32501
32502        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
32503$as_echo "$as_me: Maths library was not found" >&6;}
32504
32505
32506fi
32507
32508
32509
32510  ###############################################################################
32511  #
32512  # Check for libdl.so
32513
32514  save_LIBS="$LIBS"
32515  LIBS=""
32516  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
32517$as_echo_n "checking for dlopen in -ldl... " >&6; }
32518if ${ac_cv_lib_dl_dlopen+:} false; then :
32519  $as_echo_n "(cached) " >&6
32520else
32521  ac_check_lib_save_LIBS=$LIBS
32522LIBS="-ldl  $LIBS"
32523cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32524/* end confdefs.h.  */
32525
32526/* Override any GCC internal prototype to avoid an error.
32527   Use char because int might match the return type of a GCC
32528   builtin and then its argument prototype would still apply.  */
32529#ifdef __cplusplus
32530extern "C"
32531#endif
32532char dlopen ();
32533int
32534main ()
32535{
32536return dlopen ();
32537  ;
32538  return 0;
32539}
32540_ACEOF
32541if ac_fn_cxx_try_link "$LINENO"; then :
32542  ac_cv_lib_dl_dlopen=yes
32543else
32544  ac_cv_lib_dl_dlopen=no
32545fi
32546rm -f core conftest.err conftest.$ac_objext \
32547    conftest$ac_exeext conftest.$ac_ext
32548LIBS=$ac_check_lib_save_LIBS
32549fi
32550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
32551$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
32552if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
32553  cat >>confdefs.h <<_ACEOF
32554#define HAVE_LIBDL 1
32555_ACEOF
32556
32557  LIBS="-ldl $LIBS"
32558
32559fi
32560
32561  LIBDL="$LIBS"
32562
32563  LIBS="$save_LIBS"
32564
32565
32566  ###############################################################################
32567  #
32568  # statically link libstdc++ before C++ ABI is stablized on Linux unless
32569  # dynamic build is configured on command line.
32570  #
32571
32572# Check whether --with-stdc++lib was given.
32573if test "${with_stdc__lib+set}" = set; then :
32574  withval=$with_stdc__lib;
32575        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
32576                && test "x$with_stdc__lib" != xdefault; then
32577          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
32578        fi
32579
32580else
32581  with_stdc__lib=default
32582
32583fi
32584
32585
32586  if test "x$OPENJDK_TARGET_OS" = xlinux; then
32587    # Test if -lstdc++ works.
32588    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
32589$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
32590    ac_ext=cpp
32591ac_cpp='$CXXCPP $CPPFLAGS'
32592ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32593ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32594ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32595
32596    OLD_CXXFLAGS="$CXXFLAGS"
32597    CXXFLAGS="$CXXFLAGS -lstdc++"
32598    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32599/* end confdefs.h.  */
32600
32601int
32602main ()
32603{
32604return 0;
32605  ;
32606  return 0;
32607}
32608_ACEOF
32609if ac_fn_cxx_try_link "$LINENO"; then :
32610  has_dynamic_libstdcxx=yes
32611else
32612  has_dynamic_libstdcxx=no
32613fi
32614rm -f core conftest.err conftest.$ac_objext \
32615    conftest$ac_exeext conftest.$ac_ext
32616    CXXFLAGS="$OLD_CXXFLAGS"
32617    ac_ext=cpp
32618ac_cpp='$CXXCPP $CPPFLAGS'
32619ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32620ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32621ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32622
32623    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
32624$as_echo "$has_dynamic_libstdcxx" >&6; }
32625
32626    # Test if stdc++ can be linked statically.
32627    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
32628$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
32629    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
32630    ac_ext=cpp
32631ac_cpp='$CXXCPP $CPPFLAGS'
32632ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32633ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32634ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32635
32636    OLD_LIBS="$LIBS"
32637    OLD_CXX="$CXX"
32638    LIBS="$STATIC_STDCXX_FLAGS"
32639    CXX="$CC"
32640    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32641/* end confdefs.h.  */
32642
32643int
32644main ()
32645{
32646return 0;
32647  ;
32648  return 0;
32649}
32650_ACEOF
32651if ac_fn_cxx_try_link "$LINENO"; then :
32652  has_static_libstdcxx=yes
32653else
32654  has_static_libstdcxx=no
32655fi
32656rm -f core conftest.err conftest.$ac_objext \
32657    conftest$ac_exeext conftest.$ac_ext
32658    LIBS="$OLD_LIBS"
32659    CXX="$OLD_CXX"
32660    ac_ext=cpp
32661ac_cpp='$CXXCPP $CPPFLAGS'
32662ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32663ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32664ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32665
32666    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
32667$as_echo "$has_static_libstdcxx" >&6; }
32668
32669    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
32670      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
32671    fi
32672
32673    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
32674      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
32675    fi
32676
32677    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
32678      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
32679    fi
32680
32681    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
32682$as_echo_n "checking how to link with libstdc++... " >&6; }
32683    # If dynamic was requested, it's available since it would fail above otherwise.
32684    # If dynamic wasn't requested, go with static unless it isn't available.
32685    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32686      LIBCXX="$LIBCXX -lstdc++"
32687      LDCXX="$CXX"
32688      STATIC_CXX_SETTING="STATIC_CXX=false"
32689      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
32690$as_echo "dynamic" >&6; }
32691    else
32692      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
32693      LDCXX="$CC"
32694      STATIC_CXX_SETTING="STATIC_CXX=true"
32695      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
32696$as_echo "static" >&6; }
32697    fi
32698  fi
32699
32700
32701  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32702    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
32703
32704pkg_failed=no
32705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
32706$as_echo_n "checking for LIBFFI... " >&6; }
32707
32708if test -n "$LIBFFI_CFLAGS"; then
32709    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
32710 elif test -n "$PKG_CONFIG"; then
32711    if test -n "$PKG_CONFIG" && \
32712    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32713  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32714  ac_status=$?
32715  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32716  test $ac_status = 0; }; then
32717  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
32718else
32719  pkg_failed=yes
32720fi
32721 else
32722    pkg_failed=untried
32723fi
32724if test -n "$LIBFFI_LIBS"; then
32725    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
32726 elif test -n "$PKG_CONFIG"; then
32727    if test -n "$PKG_CONFIG" && \
32728    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32729  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32730  ac_status=$?
32731  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32732  test $ac_status = 0; }; then
32733  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
32734else
32735  pkg_failed=yes
32736fi
32737 else
32738    pkg_failed=untried
32739fi
32740
32741
32742
32743if test $pkg_failed = yes; then
32744
32745if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32746        _pkg_short_errors_supported=yes
32747else
32748        _pkg_short_errors_supported=no
32749fi
32750        if test $_pkg_short_errors_supported = yes; then
32751	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
32752        else
32753	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
32754        fi
32755	# Put the nasty error message in config.log where it belongs
32756	echo "$LIBFFI_PKG_ERRORS" >&5
32757
32758	as_fn_error $? "Package requirements (libffi) were not met:
32759
32760$LIBFFI_PKG_ERRORS
32761
32762Consider adjusting the PKG_CONFIG_PATH environment variable if you
32763installed software in a non-standard prefix.
32764
32765Alternatively, you may set the environment variables LIBFFI_CFLAGS
32766and LIBFFI_LIBS to avoid the need to call pkg-config.
32767See the pkg-config man page for more details.
32768" "$LINENO" 5
32769elif test $pkg_failed = untried; then
32770	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32771$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32772as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
32773is in your PATH or set the PKG_CONFIG environment variable to the full
32774path to pkg-config.
32775
32776Alternatively, you may set the environment variables LIBFFI_CFLAGS
32777and LIBFFI_LIBS to avoid the need to call pkg-config.
32778See the pkg-config man page for more details.
32779
32780To get pkg-config, see <http://pkg-config.freedesktop.org/>.
32781See \`config.log' for more details" "$LINENO" 5; }
32782else
32783	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
32784	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
32785        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32786$as_echo "yes" >&6; }
32787	:
32788fi
32789
32790  fi
32791
32792  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32793    # Extract the first word of "llvm-config", so it can be a program name with args.
32794set dummy llvm-config; ac_word=$2
32795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32796$as_echo_n "checking for $ac_word... " >&6; }
32797if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
32798  $as_echo_n "(cached) " >&6
32799else
32800  if test -n "$LLVM_CONFIG"; then
32801  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
32802else
32803as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32804for as_dir in $PATH
32805do
32806  IFS=$as_save_IFS
32807  test -z "$as_dir" && as_dir=.
32808    for ac_exec_ext in '' $ac_executable_extensions; do
32809  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32810    ac_cv_prog_LLVM_CONFIG="llvm-config"
32811    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32812    break 2
32813  fi
32814done
32815  done
32816IFS=$as_save_IFS
32817
32818fi
32819fi
32820LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
32821if test -n "$LLVM_CONFIG"; then
32822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
32823$as_echo "$LLVM_CONFIG" >&6; }
32824else
32825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32826$as_echo "no" >&6; }
32827fi
32828
32829
32830
32831    if test "x$LLVM_CONFIG" != xllvm-config; then
32832      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
32833    fi
32834
32835    llvm_components="jit mcjit engine nativecodegen native"
32836    unset LLVM_CFLAGS
32837    for flag in $("$LLVM_CONFIG" --cxxflags); do
32838      if echo "${flag}" | grep -q '^-[ID]'; then
32839        if test "${flag}" != "-D_DEBUG" ; then
32840          if test "${LLVM_CFLAGS}" != "" ; then
32841            LLVM_CFLAGS="${LLVM_CFLAGS} "
32842          fi
32843          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
32844        fi
32845      fi
32846    done
32847    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
32848    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
32849
32850    unset LLVM_LDFLAGS
32851    for flag in $("${LLVM_CONFIG}" --ldflags); do
32852      if echo "${flag}" | grep -q '^-L'; then
32853        if test "${LLVM_LDFLAGS}" != ""; then
32854          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
32855        fi
32856        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
32857      fi
32858    done
32859
32860    unset LLVM_LIBS
32861    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
32862      if echo "${flag}" | grep -q '^-l'; then
32863        if test "${LLVM_LIBS}" != ""; then
32864          LLVM_LIBS="${LLVM_LIBS} "
32865        fi
32866        LLVM_LIBS="${LLVM_LIBS}${flag}"
32867      fi
32868    done
32869
32870
32871
32872
32873  fi
32874
32875  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
32876  if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
32877    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
32878  fi
32879
32880  # TODO better (platform agnostic) test
32881  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
32882    LIBCXX="-lstdc++"
32883  fi
32884
32885
32886
32887
32888# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
32889
32890  # When using cygwin or msys, we need a wrapper binary that renames
32891  # /cygdrive/c/ arguments into c:/ arguments and peeks into
32892  # @files and rewrites these too! This wrapper binary is
32893  # called fixpath.
32894  FIXPATH=
32895  if test "x$OPENJDK_BUILD_OS" = xwindows; then
32896    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
32897$as_echo_n "checking if fixpath can be created... " >&6; }
32898    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
32899    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
32900    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
32901      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
32902      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
32903      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
32904      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
32905    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
32906      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
32907      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
32908
32909      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
32910      # @ was chosen as separator to minimize risk of other tools messing around with it
32911      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
32912      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
32913
32914      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
32915    fi
32916    rm -f $OUTPUT_ROOT/fixpath*
32917    cd $OUTPUT_ROOT
32918    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
32919    cd $CURDIR
32920
32921    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
32922      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32923$as_echo "no" >&6; }
32924      cat $OUTPUT_ROOT/fixpath1.log
32925      as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
32926    fi
32927    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32928$as_echo "yes" >&6; }
32929    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
32930$as_echo_n "checking if fixpath.exe works... " >&6; }
32931    cd $OUTPUT_ROOT
32932    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
32933    cd $CURDIR
32934    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
32935      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32936$as_echo "no" >&6; }
32937      cat $OUTPUT_ROOT/fixpath2.log
32938      as_fn_error $? "fixpath did not work!" "$LINENO" 5
32939    fi
32940    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32941$as_echo "yes" >&6; }
32942    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
32943  fi
32944
32945
32946
32947
32948###############################################################################
32949#
32950# We need to do some final tweaking, when everything else is done.
32951#
32952###############################################################################
32953
32954
32955  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
32956
32957
32958  # The name of the Service Agent jar.
32959  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
32960  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
32961    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
32962  fi
32963
32964
32965
32966    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
32967$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
32968
32969    if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
32970      ENABLE_INTREE_EC=yes
32971      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32972$as_echo "yes" >&6; }
32973    else
32974      ENABLE_INTREE_EC=no
32975      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32976$as_echo "no" >&6; }
32977    fi
32978
32979
32980
32981
32982###############################################################################
32983#
32984# Configure parts of the build that only affect the build performance,
32985# not the result.
32986#
32987###############################################################################
32988
32989
32990  # How many cores do we have on this build system?
32991
32992# Check whether --with-num-cores was given.
32993if test "${with_num_cores+set}" = set; then :
32994  withval=$with_num_cores;
32995fi
32996
32997  if test "x$with_num_cores" = x; then
32998    # The number of cores were not specified, try to probe them.
32999
33000  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
33001$as_echo_n "checking for number of cores... " >&6; }
33002  NUM_CORES=1
33003  FOUND_CORES=no
33004
33005  if test -f /proc/cpuinfo; then
33006    # Looks like a Linux (or cygwin) system
33007    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
33008    FOUND_CORES=yes
33009  elif test -x /usr/sbin/psrinfo; then
33010    # Looks like a Solaris system
33011    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
33012    FOUND_CORES=yes
33013  elif test -x /usr/sbin/system_profiler; then
33014    # Looks like a MacOSX system
33015    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
33016    FOUND_CORES=yes
33017  elif test -n "$NUMBER_OF_PROCESSORS"; then
33018    # On windows, look in the env
33019    NUM_CORES=$NUMBER_OF_PROCESSORS
33020    FOUND_CORES=yes
33021  fi
33022
33023  if test "x$FOUND_CORES" = xyes; then
33024    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
33025$as_echo "$NUM_CORES" >&6; }
33026  else
33027    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
33028$as_echo "could not detect number of cores, defaulting to 1" >&6; }
33029    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
33030$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
33031  fi
33032
33033  else
33034    NUM_CORES=$with_num_cores
33035  fi
33036
33037
33038
33039  # How much memory do we have on this build system?
33040
33041# Check whether --with-memory-size was given.
33042if test "${with_memory_size+set}" = set; then :
33043  withval=$with_memory_size;
33044fi
33045
33046  if test "x$with_memory_size" = x; then
33047    # The memory size was not specified, try to probe it.
33048
33049  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
33050$as_echo_n "checking for memory size... " >&6; }
33051  # Default to 1024 MB
33052  MEMORY_SIZE=1024
33053  FOUND_MEM=no
33054
33055  if test -f /proc/meminfo; then
33056    # Looks like a Linux (or cygwin) system
33057    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
33058    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
33059    FOUND_MEM=yes
33060  elif test -x /usr/sbin/prtconf; then
33061    # Looks like a Solaris system
33062    MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
33063    FOUND_MEM=yes
33064  elif test -x /usr/sbin/system_profiler; then
33065    # Looks like a MacOSX system
33066    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
33067    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
33068    FOUND_MEM=yes
33069  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
33070    # Windows, but without cygwin
33071    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
33072    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
33073    FOUND_MEM=yes
33074  fi
33075
33076  if test "x$FOUND_MEM" = xyes; then
33077    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
33078$as_echo "$MEMORY_SIZE MB" >&6; }
33079  else
33080    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
33081$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
33082    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
33083$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
33084  fi
33085
33086  else
33087    MEMORY_SIZE=$with_memory_size
33088  fi
33089
33090
33091
33092  # Provide a decent default number of parallel jobs for make depending on
33093  # number of cores, amount of memory and machine architecture.
33094
33095# Check whether --with-jobs was given.
33096if test "${with_jobs+set}" = set; then :
33097  withval=$with_jobs;
33098fi
33099
33100  if test "x$with_jobs" = x; then
33101    # Number of jobs was not specified, calculate.
33102    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
33103$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
33104    # Approximate memory in GB, rounding up a bit.
33105    memory_gb=`expr $MEMORY_SIZE / 1100`
33106    # Pick the lowest of memory in gb and number of cores.
33107    if test "$memory_gb" -lt "$NUM_CORES"; then
33108      JOBS="$memory_gb"
33109    else
33110      JOBS="$NUM_CORES"
33111      # On bigger machines, leave some room for other processes to run
33112      if test "$JOBS" -gt "4"; then
33113        JOBS=`expr $JOBS '*' 90 / 100`
33114      fi
33115    fi
33116    # Cap number of jobs to 16
33117    if test "$JOBS" -gt "16"; then
33118      JOBS=16
33119    fi
33120    if test "$JOBS" -eq "0"; then
33121      JOBS=1
33122    fi
33123    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
33124$as_echo "$JOBS" >&6; }
33125  else
33126    JOBS=$with_jobs
33127  fi
33128
33129
33130
33131# Setup smart javac (after cores and memory have been setup)
33132
33133
33134# Check whether --with-sjavac-server-java was given.
33135if test "${with_sjavac_server_java+set}" = set; then :
33136  withval=$with_sjavac_server_java;
33137fi
33138
33139
33140  if test "x$with_sjavac_server_java" != x; then
33141    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
33142    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
33143    if test "x$FOUND_VERSION" = x; then
33144      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
33145    fi
33146  else
33147    SJAVAC_SERVER_JAVA=""
33148    # Hotspot specific options.
33149
33150  $ECHO "Check if jvm arg is ok: -verbosegc" >&5
33151  $ECHO "Command: $JAVA -verbosegc -version" >&5
33152  OUTPUT=`$JAVA -verbosegc -version 2>&1`
33153  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33154  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33155  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33156    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
33157    JVM_ARG_OK=true
33158  else
33159    $ECHO "Arg failed:" >&5
33160    $ECHO "$OUTPUT" >&5
33161    JVM_ARG_OK=false
33162  fi
33163
33164    # JRockit specific options.
33165
33166  $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
33167  $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
33168  OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
33169  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33170  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33171  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33172    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
33173    JVM_ARG_OK=true
33174  else
33175    $ECHO "Arg failed:" >&5
33176    $ECHO "$OUTPUT" >&5
33177    JVM_ARG_OK=false
33178  fi
33179
33180    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
33181  fi
33182
33183
33184  if test "$MEMORY_SIZE" -gt "2500"; then
33185
33186  $ECHO "Check if jvm arg is ok: -d64" >&5
33187  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
33188  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
33189  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33190  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33191  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33192    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
33193    JVM_ARG_OK=true
33194  else
33195    $ECHO "Arg failed:" >&5
33196    $ECHO "$OUTPUT" >&5
33197    JVM_ARG_OK=false
33198  fi
33199
33200    if test "$JVM_ARG_OK" = true; then
33201      JVM_64BIT=true
33202      JVM_ARG_OK=false
33203    fi
33204  fi
33205
33206  if test "$JVM_64BIT" = true; then
33207    if test "$MEMORY_SIZE" -gt "17000"; then
33208
33209  $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
33210  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
33211  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
33212  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33213  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33214  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33215    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
33216    JVM_ARG_OK=true
33217  else
33218    $ECHO "Arg failed:" >&5
33219    $ECHO "$OUTPUT" >&5
33220    JVM_ARG_OK=false
33221  fi
33222
33223    fi
33224    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
33225
33226  $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
33227  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
33228  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
33229  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33230  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33231  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33232    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
33233    JVM_ARG_OK=true
33234  else
33235    $ECHO "Arg failed:" >&5
33236    $ECHO "$OUTPUT" >&5
33237    JVM_ARG_OK=false
33238  fi
33239
33240    fi
33241    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
33242
33243  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
33244  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
33245  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
33246  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33247  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33248  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33249    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
33250    JVM_ARG_OK=true
33251  else
33252    $ECHO "Arg failed:" >&5
33253    $ECHO "$OUTPUT" >&5
33254    JVM_ARG_OK=false
33255  fi
33256
33257    fi
33258    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
33259
33260  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
33261  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
33262  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
33263  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33264  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33265  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33266    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
33267    JVM_ARG_OK=true
33268  else
33269    $ECHO "Arg failed:" >&5
33270    $ECHO "$OUTPUT" >&5
33271    JVM_ARG_OK=false
33272  fi
33273
33274    fi
33275  fi
33276  if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
33277
33278  $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
33279  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
33280  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
33281  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33282  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33283  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33284    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
33285    JVM_ARG_OK=true
33286  else
33287    $ECHO "Arg failed:" >&5
33288    $ECHO "$OUTPUT" >&5
33289    JVM_ARG_OK=false
33290  fi
33291
33292  fi
33293  if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
33294
33295  $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
33296  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
33297  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
33298  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33299  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33300  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33301    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
33302    JVM_ARG_OK=true
33303  else
33304    $ECHO "Arg failed:" >&5
33305    $ECHO "$OUTPUT" >&5
33306    JVM_ARG_OK=false
33307  fi
33308
33309  fi
33310  if test "$JVM_ARG_OK" = false; then
33311
33312  $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
33313  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
33314  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
33315  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33316  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33317  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33318    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
33319    JVM_ARG_OK=true
33320  else
33321    $ECHO "Arg failed:" >&5
33322    $ECHO "$OUTPUT" >&5
33323    JVM_ARG_OK=false
33324  fi
33325
33326  fi
33327
33328  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
33329$as_echo_n "checking whether to use sjavac... " >&6; }
33330  # Check whether --enable-sjavac was given.
33331if test "${enable_sjavac+set}" = set; then :
33332  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
33333else
33334  ENABLE_SJAVAC='no'
33335fi
33336
33337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
33338$as_echo "$ENABLE_SJAVAC" >&6; }
33339
33340
33341  if test "x$ENABLE_SJAVAC" = xyes; then
33342    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
33343  else
33344    SJAVAC_SERVER_DIR=
33345  fi
33346
33347
33348
33349# Can the C/C++ compiler use precompiled headers?
33350
33351
33352  ###############################################################################
33353  #
33354  # Can the C/C++ compiler use precompiled headers?
33355  #
33356  # Check whether --enable-precompiled-headers was given.
33357if test "${enable_precompiled_headers+set}" = set; then :
33358  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
33359else
33360  ENABLE_PRECOMPH=yes
33361fi
33362
33363
33364  USE_PRECOMPILED_HEADER=1
33365  if test "x$ENABLE_PRECOMPH" = xno; then
33366    USE_PRECOMPILED_HEADER=0
33367  fi
33368
33369  if test "x$ENABLE_PRECOMPH" = xyes; then
33370    # Check that the compiler actually supports precomp headers.
33371    if test "x$GCC" = xyes; then
33372      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
33373$as_echo_n "checking that precompiled headers work... " >&6; }
33374      echo "int alfa();" > conftest.h
33375      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
33376      if test ! -f conftest.hpp.gch; then
33377        USE_PRECOMPILED_HEADER=0
33378        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33379$as_echo "no" >&6; }
33380      else
33381        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33382$as_echo "yes" >&6; }
33383      fi
33384      rm -f conftest.h conftest.hpp.gch
33385    fi
33386  fi
33387
33388
33389
33390
33391# Setup use of ccache, if available
33392
33393  # Check whether --enable-ccache was given.
33394if test "${enable_ccache+set}" = set; then :
33395  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
33396else
33397  ENABLE_CCACHE=yes
33398fi
33399
33400  if test "x$ENABLE_CCACHE" = xyes; then
33401    OLD_PATH="$PATH"
33402    if test "x$TOOLS_DIR" != x; then
33403      PATH=$TOOLS_DIR:$PATH
33404    fi
33405    # Extract the first word of "ccache", so it can be a program name with args.
33406set dummy ccache; ac_word=$2
33407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33408$as_echo_n "checking for $ac_word... " >&6; }
33409if ${ac_cv_path_CCACHE+:} false; then :
33410  $as_echo_n "(cached) " >&6
33411else
33412  case $CCACHE in
33413  [\\/]* | ?:[\\/]*)
33414  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
33415  ;;
33416  *)
33417  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33418for as_dir in $PATH
33419do
33420  IFS=$as_save_IFS
33421  test -z "$as_dir" && as_dir=.
33422    for ac_exec_ext in '' $ac_executable_extensions; do
33423  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33424    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
33425    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33426    break 2
33427  fi
33428done
33429  done
33430IFS=$as_save_IFS
33431
33432  ;;
33433esac
33434fi
33435CCACHE=$ac_cv_path_CCACHE
33436if test -n "$CCACHE"; then
33437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
33438$as_echo "$CCACHE" >&6; }
33439else
33440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33441$as_echo "no" >&6; }
33442fi
33443
33444
33445    PATH="$OLD_PATH"
33446  else
33447    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
33448$as_echo_n "checking for ccache... " >&6; }
33449    { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
33450$as_echo "explicitly disabled" >&6; }
33451    CCACHE=
33452  fi
33453
33454
33455
33456# Check whether --with-ccache-dir was given.
33457if test "${with_ccache_dir+set}" = set; then :
33458  withval=$with_ccache_dir;
33459fi
33460
33461
33462  if test "x$with_ccache_dir" != x; then
33463    # When using a non home ccache directory, assume the use is to share ccache files
33464    # with other users. Thus change the umask.
33465    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
33466  fi
33467  CCACHE_FOUND=""
33468  if test "x$CCACHE" != x; then
33469
33470  if test "x$CCACHE" != x; then
33471    CCACHE_FOUND="true"
33472    # Only use ccache if it is 3.1.4 or later, which supports
33473    # precompiled headers.
33474    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
33475$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
33476    HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
33477    if test "x$HAS_GOOD_CCACHE" = x; then
33478      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
33479$as_echo "no, disabling ccache" >&6; }
33480      CCACHE=
33481    else
33482      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33483$as_echo "yes" >&6; }
33484      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
33485$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
33486      PUSHED_FLAGS="$CXXFLAGS"
33487      CXXFLAGS="-fpch-preprocess $CXXFLAGS"
33488      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33489/* end confdefs.h.  */
33490
33491int
33492main ()
33493{
33494
33495  ;
33496  return 0;
33497}
33498_ACEOF
33499if ac_fn_cxx_try_compile "$LINENO"; then :
33500  CC_KNOWS_CCACHE_TRICK=yes
33501else
33502  CC_KNOWS_CCACHE_TRICK=no
33503fi
33504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33505      CXXFLAGS="$PUSHED_FLAGS"
33506      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
33507        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33508$as_echo "yes" >&6; }
33509      else
33510        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
33511$as_echo "no, disabling ccaching of precompiled headers" >&6; }
33512        CCACHE=
33513      fi
33514    fi
33515  fi
33516
33517  if test "x$CCACHE" != x; then
33518    CCACHE_SLOPPINESS=time_macros
33519    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
33520    CCACHE_FLAGS=-fpch-preprocess
33521
33522    if test "x$SET_CCACHE_DIR" != x; then
33523      mkdir -p $CCACHE_DIR > /dev/null 2>&1
33524      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
33525    fi
33526  fi
33527
33528  fi
33529
33530
33531###############################################################################
33532#
33533# And now the finish...
33534#
33535###############################################################################
33536
33537# Check for some common pitfalls
33538
33539  if test x"$OPENJDK_BUILD_OS" = xwindows; then
33540    file_to_test="$SRC_ROOT/LICENSE"
33541    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
33542      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
33543    fi
33544  fi
33545
33546
33547  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
33548$as_echo_n "checking if build directory is on local disk... " >&6; }
33549
33550  # df -l lists only local disks; if the given directory is not found then
33551  # a non-zero exit code is given
33552  if test "x$DF" = x; then
33553    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33554      # msys does not have df; use Windows "net use" instead.
33555      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
33556      if test "x$IS_NETWORK_DISK" = x; then
33557        OUTPUT_DIR_IS_LOCAL="yes"
33558      else
33559        OUTPUT_DIR_IS_LOCAL="no"
33560      fi
33561    else
33562      # No df here, say it's local
33563      OUTPUT_DIR_IS_LOCAL="yes"
33564    fi
33565  else
33566    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
33567      OUTPUT_DIR_IS_LOCAL="yes"
33568    else
33569      OUTPUT_DIR_IS_LOCAL="no"
33570    fi
33571  fi
33572
33573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
33574$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
33575
33576
33577
33578  # Check if the user has any old-style ALT_ variables set.
33579  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
33580
33581  # Before generating output files, test if they exist. If they do, this is a reconfigure.
33582  # Since we can't properly handle the dependencies for this, warn the user about the situation
33583  if test -e $OUTPUT_ROOT/spec.gmk; then
33584    IS_RECONFIGURE=yes
33585  else
33586    IS_RECONFIGURE=no
33587  fi
33588
33589  if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
33590    HIDE_PERFORMANCE_HINTS=yes
33591  else
33592    HIDE_PERFORMANCE_HINTS=no
33593    # Hide it the next time around...
33594    $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
33595  fi
33596
33597
33598# At the end, call the custom hook. (Dummy macro if no custom sources available)
33599
33600
33601# We're messing a bit with internal autoconf variables to put the config.status
33602# in the output directory instead of the current directory.
33603CONFIG_STATUS="$OUTPUT_ROOT/config.status"
33604
33605# Create the actual output files. Now the main work of configure is done.
33606cat >confcache <<\_ACEOF
33607# This file is a shell script that caches the results of configure
33608# tests run on this system so they can be shared between configure
33609# scripts and configure runs, see configure's option --config-cache.
33610# It is not useful on other systems.  If it contains results you don't
33611# want to keep, you may remove or edit it.
33612#
33613# config.status only pays attention to the cache file if you give it
33614# the --recheck option to rerun configure.
33615#
33616# `ac_cv_env_foo' variables (set or unset) will be overridden when
33617# loading this file, other *unset* `ac_cv_foo' will be assigned the
33618# following values.
33619
33620_ACEOF
33621
33622# The following way of writing the cache mishandles newlines in values,
33623# but we know of no workaround that is simple, portable, and efficient.
33624# So, we kill variables containing newlines.
33625# Ultrix sh set writes to stderr and can't be redirected directly,
33626# and sets the high bit in the cache file unless we assign to the vars.
33627(
33628  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
33629    eval ac_val=\$$ac_var
33630    case $ac_val in #(
33631    *${as_nl}*)
33632      case $ac_var in #(
33633      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
33634$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
33635      esac
33636      case $ac_var in #(
33637      _ | IFS | as_nl) ;; #(
33638      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
33639      *) { eval $ac_var=; unset $ac_var;} ;;
33640      esac ;;
33641    esac
33642  done
33643
33644  (set) 2>&1 |
33645    case $as_nl`(ac_space=' '; set) 2>&1` in #(
33646    *${as_nl}ac_space=\ *)
33647      # `set' does not quote correctly, so add quotes: double-quote
33648      # substitution turns \\\\ into \\, and sed turns \\ into \.
33649      sed -n \
33650	"s/'/'\\\\''/g;
33651	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
33652      ;; #(
33653    *)
33654      # `set' quotes correctly as required by POSIX, so do not add quotes.
33655      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
33656      ;;
33657    esac |
33658    sort
33659) |
33660  sed '
33661     /^ac_cv_env_/b end
33662     t clear
33663     :clear
33664     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
33665     t end
33666     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
33667     :end' >>confcache
33668if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
33669  if test -w "$cache_file"; then
33670    if test "x$cache_file" != "x/dev/null"; then
33671      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
33672$as_echo "$as_me: updating cache $cache_file" >&6;}
33673      if test ! -f "$cache_file" || test -h "$cache_file"; then
33674	cat confcache >"$cache_file"
33675      else
33676        case $cache_file in #(
33677        */* | ?:*)
33678	  mv -f confcache "$cache_file"$$ &&
33679	  mv -f "$cache_file"$$ "$cache_file" ;; #(
33680        *)
33681	  mv -f confcache "$cache_file" ;;
33682	esac
33683      fi
33684    fi
33685  else
33686    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
33687$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
33688  fi
33689fi
33690rm -f confcache
33691
33692test "x$prefix" = xNONE && prefix=$ac_default_prefix
33693# Let make expand exec_prefix.
33694test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
33695
33696DEFS=-DHAVE_CONFIG_H
33697
33698ac_libobjs=
33699ac_ltlibobjs=
33700U=
33701for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
33702  # 1. Remove the extension, and $U if already installed.
33703  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
33704  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
33705  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
33706  #    will be set to the directory where LIBOBJS objects are built.
33707  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
33708  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
33709done
33710LIBOBJS=$ac_libobjs
33711
33712LTLIBOBJS=$ac_ltlibobjs
33713
33714
33715
33716: "${CONFIG_STATUS=./config.status}"
33717ac_write_fail=0
33718ac_clean_files_save=$ac_clean_files
33719ac_clean_files="$ac_clean_files $CONFIG_STATUS"
33720{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
33721$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
33722as_write_fail=0
33723cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
33724#! $SHELL
33725# Generated by $as_me.
33726# Run this file to recreate the current configuration.
33727# Compiler output produced by configure, useful for debugging
33728# configure, is in config.log if it exists.
33729
33730debug=false
33731ac_cs_recheck=false
33732ac_cs_silent=false
33733
33734SHELL=\${CONFIG_SHELL-$SHELL}
33735export SHELL
33736_ASEOF
33737cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
33738## -------------------- ##
33739## M4sh Initialization. ##
33740## -------------------- ##
33741
33742# Be more Bourne compatible
33743DUALCASE=1; export DUALCASE # for MKS sh
33744if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
33745  emulate sh
33746  NULLCMD=:
33747  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
33748  # is contrary to our usage.  Disable this feature.
33749  alias -g '${1+"$@"}'='"$@"'
33750  setopt NO_GLOB_SUBST
33751else
33752  case `(set -o) 2>/dev/null` in #(
33753  *posix*) :
33754    set -o posix ;; #(
33755  *) :
33756     ;;
33757esac
33758fi
33759
33760
33761as_nl='
33762'
33763export as_nl
33764# Printing a long string crashes Solaris 7 /usr/bin/printf.
33765as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
33766as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
33767as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
33768# Prefer a ksh shell builtin over an external printf program on Solaris,
33769# but without wasting forks for bash or zsh.
33770if test -z "$BASH_VERSION$ZSH_VERSION" \
33771    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
33772  as_echo='print -r --'
33773  as_echo_n='print -rn --'
33774elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
33775  as_echo='printf %s\n'
33776  as_echo_n='printf %s'
33777else
33778  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
33779    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
33780    as_echo_n='/usr/ucb/echo -n'
33781  else
33782    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
33783    as_echo_n_body='eval
33784      arg=$1;
33785      case $arg in #(
33786      *"$as_nl"*)
33787	expr "X$arg" : "X\\(.*\\)$as_nl";
33788	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
33789      esac;
33790      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
33791    '
33792    export as_echo_n_body
33793    as_echo_n='sh -c $as_echo_n_body as_echo'
33794  fi
33795  export as_echo_body
33796  as_echo='sh -c $as_echo_body as_echo'
33797fi
33798
33799# The user is always right.
33800if test "${PATH_SEPARATOR+set}" != set; then
33801  PATH_SEPARATOR=:
33802  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
33803    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
33804      PATH_SEPARATOR=';'
33805  }
33806fi
33807
33808
33809# IFS
33810# We need space, tab and new line, in precisely that order.  Quoting is
33811# there to prevent editors from complaining about space-tab.
33812# (If _AS_PATH_WALK were called with IFS unset, it would disable word
33813# splitting by setting IFS to empty value.)
33814IFS=" ""	$as_nl"
33815
33816# Find who we are.  Look in the path if we contain no directory separator.
33817as_myself=
33818case $0 in #((
33819  *[\\/]* ) as_myself=$0 ;;
33820  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33821for as_dir in $PATH
33822do
33823  IFS=$as_save_IFS
33824  test -z "$as_dir" && as_dir=.
33825    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
33826  done
33827IFS=$as_save_IFS
33828
33829     ;;
33830esac
33831# We did not find ourselves, most probably we were run as `sh COMMAND'
33832# in which case we are not to be found in the path.
33833if test "x$as_myself" = x; then
33834  as_myself=$0
33835fi
33836if test ! -f "$as_myself"; then
33837  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
33838  exit 1
33839fi
33840
33841# Unset variables that we do not need and which cause bugs (e.g. in
33842# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
33843# suppresses any "Segmentation fault" message there.  '((' could
33844# trigger a bug in pdksh 5.2.14.
33845for as_var in BASH_ENV ENV MAIL MAILPATH
33846do eval test x\${$as_var+set} = xset \
33847  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
33848done
33849PS1='$ '
33850PS2='> '
33851PS4='+ '
33852
33853# NLS nuisances.
33854LC_ALL=C
33855export LC_ALL
33856LANGUAGE=C
33857export LANGUAGE
33858
33859# CDPATH.
33860(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
33861
33862
33863# as_fn_error STATUS ERROR [LINENO LOG_FD]
33864# ----------------------------------------
33865# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
33866# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
33867# script with STATUS, using 1 if that was 0.
33868as_fn_error ()
33869{
33870  as_status=$1; test $as_status -eq 0 && as_status=1
33871  if test "$4"; then
33872    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
33873    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
33874  fi
33875  $as_echo "$as_me: error: $2" >&2
33876  as_fn_exit $as_status
33877} # as_fn_error
33878
33879
33880# as_fn_set_status STATUS
33881# -----------------------
33882# Set $? to STATUS, without forking.
33883as_fn_set_status ()
33884{
33885  return $1
33886} # as_fn_set_status
33887
33888# as_fn_exit STATUS
33889# -----------------
33890# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
33891as_fn_exit ()
33892{
33893  set +e
33894  as_fn_set_status $1
33895  exit $1
33896} # as_fn_exit
33897
33898# as_fn_unset VAR
33899# ---------------
33900# Portably unset VAR.
33901as_fn_unset ()
33902{
33903  { eval $1=; unset $1;}
33904}
33905as_unset=as_fn_unset
33906# as_fn_append VAR VALUE
33907# ----------------------
33908# Append the text in VALUE to the end of the definition contained in VAR. Take
33909# advantage of any shell optimizations that allow amortized linear growth over
33910# repeated appends, instead of the typical quadratic growth present in naive
33911# implementations.
33912if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
33913  eval 'as_fn_append ()
33914  {
33915    eval $1+=\$2
33916  }'
33917else
33918  as_fn_append ()
33919  {
33920    eval $1=\$$1\$2
33921  }
33922fi # as_fn_append
33923
33924# as_fn_arith ARG...
33925# ------------------
33926# Perform arithmetic evaluation on the ARGs, and store the result in the
33927# global $as_val. Take advantage of shells that can avoid forks. The arguments
33928# must be portable across $(()) and expr.
33929if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
33930  eval 'as_fn_arith ()
33931  {
33932    as_val=$(( $* ))
33933  }'
33934else
33935  as_fn_arith ()
33936  {
33937    as_val=`expr "$@" || test $? -eq 1`
33938  }
33939fi # as_fn_arith
33940
33941
33942if expr a : '\(a\)' >/dev/null 2>&1 &&
33943   test "X`expr 00001 : '.*\(...\)'`" = X001; then
33944  as_expr=expr
33945else
33946  as_expr=false
33947fi
33948
33949if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
33950  as_basename=basename
33951else
33952  as_basename=false
33953fi
33954
33955if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
33956  as_dirname=dirname
33957else
33958  as_dirname=false
33959fi
33960
33961as_me=`$as_basename -- "$0" ||
33962$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
33963	 X"$0" : 'X\(//\)$' \| \
33964	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
33965$as_echo X/"$0" |
33966    sed '/^.*\/\([^/][^/]*\)\/*$/{
33967	    s//\1/
33968	    q
33969	  }
33970	  /^X\/\(\/\/\)$/{
33971	    s//\1/
33972	    q
33973	  }
33974	  /^X\/\(\/\).*/{
33975	    s//\1/
33976	    q
33977	  }
33978	  s/.*/./; q'`
33979
33980# Avoid depending upon Character Ranges.
33981as_cr_letters='abcdefghijklmnopqrstuvwxyz'
33982as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
33983as_cr_Letters=$as_cr_letters$as_cr_LETTERS
33984as_cr_digits='0123456789'
33985as_cr_alnum=$as_cr_Letters$as_cr_digits
33986
33987ECHO_C= ECHO_N= ECHO_T=
33988case `echo -n x` in #(((((
33989-n*)
33990  case `echo 'xy\c'` in
33991  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
33992  xy)  ECHO_C='\c';;
33993  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
33994       ECHO_T='	';;
33995  esac;;
33996*)
33997  ECHO_N='-n';;
33998esac
33999
34000rm -f conf$$ conf$$.exe conf$$.file
34001if test -d conf$$.dir; then
34002  rm -f conf$$.dir/conf$$.file
34003else
34004  rm -f conf$$.dir
34005  mkdir conf$$.dir 2>/dev/null
34006fi
34007if (echo >conf$$.file) 2>/dev/null; then
34008  if ln -s conf$$.file conf$$ 2>/dev/null; then
34009    as_ln_s='ln -s'
34010    # ... but there are two gotchas:
34011    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
34012    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
34013    # In both cases, we have to default to `cp -pR'.
34014    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
34015      as_ln_s='cp -pR'
34016  elif ln conf$$.file conf$$ 2>/dev/null; then
34017    as_ln_s=ln
34018  else
34019    as_ln_s='cp -pR'
34020  fi
34021else
34022  as_ln_s='cp -pR'
34023fi
34024rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
34025rmdir conf$$.dir 2>/dev/null
34026
34027
34028# as_fn_mkdir_p
34029# -------------
34030# Create "$as_dir" as a directory, including parents if necessary.
34031as_fn_mkdir_p ()
34032{
34033
34034  case $as_dir in #(
34035  -*) as_dir=./$as_dir;;
34036  esac
34037  test -d "$as_dir" || eval $as_mkdir_p || {
34038    as_dirs=
34039    while :; do
34040      case $as_dir in #(
34041      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
34042      *) as_qdir=$as_dir;;
34043      esac
34044      as_dirs="'$as_qdir' $as_dirs"
34045      as_dir=`$as_dirname -- "$as_dir" ||
34046$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34047	 X"$as_dir" : 'X\(//\)[^/]' \| \
34048	 X"$as_dir" : 'X\(//\)$' \| \
34049	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
34050$as_echo X"$as_dir" |
34051    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34052	    s//\1/
34053	    q
34054	  }
34055	  /^X\(\/\/\)[^/].*/{
34056	    s//\1/
34057	    q
34058	  }
34059	  /^X\(\/\/\)$/{
34060	    s//\1/
34061	    q
34062	  }
34063	  /^X\(\/\).*/{
34064	    s//\1/
34065	    q
34066	  }
34067	  s/.*/./; q'`
34068      test -d "$as_dir" && break
34069    done
34070    test -z "$as_dirs" || eval "mkdir $as_dirs"
34071  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
34072
34073
34074} # as_fn_mkdir_p
34075if mkdir -p . 2>/dev/null; then
34076  as_mkdir_p='mkdir -p "$as_dir"'
34077else
34078  test -d ./-p && rmdir ./-p
34079  as_mkdir_p=false
34080fi
34081
34082
34083# as_fn_executable_p FILE
34084# -----------------------
34085# Test if FILE is an executable regular file.
34086as_fn_executable_p ()
34087{
34088  test -f "$1" && test -x "$1"
34089} # as_fn_executable_p
34090as_test_x='test -x'
34091as_executable_p=as_fn_executable_p
34092
34093# Sed expression to map a string onto a valid CPP name.
34094as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
34095
34096# Sed expression to map a string onto a valid variable name.
34097as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
34098
34099
34100exec 6>&1
34101## ----------------------------------- ##
34102## Main body of $CONFIG_STATUS script. ##
34103## ----------------------------------- ##
34104_ASEOF
34105test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
34106
34107cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34108# Save the log message, to keep $0 and so on meaningful, and to
34109# report actual input values of CONFIG_FILES etc. instead of their
34110# values after options handling.
34111ac_log="
34112This file was extended by OpenJDK $as_me jdk8, which was
34113generated by GNU Autoconf 2.69.  Invocation command line was
34114
34115  CONFIG_FILES    = $CONFIG_FILES
34116  CONFIG_HEADERS  = $CONFIG_HEADERS
34117  CONFIG_LINKS    = $CONFIG_LINKS
34118  CONFIG_COMMANDS = $CONFIG_COMMANDS
34119  $ $0 $@
34120
34121on `(hostname || uname -n) 2>/dev/null | sed 1q`
34122"
34123
34124_ACEOF
34125
34126case $ac_config_files in *"
34127"*) set x $ac_config_files; shift; ac_config_files=$*;;
34128esac
34129
34130case $ac_config_headers in *"
34131"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
34132esac
34133
34134
34135cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34136# Files that config.status was made for.
34137config_files="$ac_config_files"
34138config_headers="$ac_config_headers"
34139
34140_ACEOF
34141
34142cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34143ac_cs_usage="\
34144\`$as_me' instantiates files and other configuration actions
34145from templates according to the current configuration.  Unless the files
34146and actions are specified as TAGs, all are instantiated by default.
34147
34148Usage: $0 [OPTION]... [TAG]...
34149
34150  -h, --help       print this help, then exit
34151  -V, --version    print version number and configuration settings, then exit
34152      --config     print configuration, then exit
34153  -q, --quiet, --silent
34154                   do not print progress messages
34155  -d, --debug      don't remove temporary files
34156      --recheck    update $as_me by reconfiguring in the same conditions
34157      --file=FILE[:TEMPLATE]
34158                   instantiate the configuration file FILE
34159      --header=FILE[:TEMPLATE]
34160                   instantiate the configuration header FILE
34161
34162Configuration files:
34163$config_files
34164
34165Configuration headers:
34166$config_headers
34167
34168Report bugs to <build-dev@openjdk.java.net>.
34169OpenJDK home page: <http://openjdk.java.net>."
34170
34171_ACEOF
34172cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34173ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
34174ac_cs_version="\\
34175OpenJDK config.status jdk8
34176configured by $0, generated by GNU Autoconf 2.69,
34177  with options \\"\$ac_cs_config\\"
34178
34179Copyright (C) 2012 Free Software Foundation, Inc.
34180This config.status script is free software; the Free Software Foundation
34181gives unlimited permission to copy, distribute and modify it."
34182
34183ac_pwd='$ac_pwd'
34184srcdir='$srcdir'
34185AWK='$AWK'
34186test -n "\$AWK" || AWK=awk
34187_ACEOF
34188
34189cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34190# The default lists apply if the user does not specify any file.
34191ac_need_defaults=:
34192while test $# != 0
34193do
34194  case $1 in
34195  --*=?*)
34196    ac_option=`expr "X$1" : 'X\([^=]*\)='`
34197    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
34198    ac_shift=:
34199    ;;
34200  --*=)
34201    ac_option=`expr "X$1" : 'X\([^=]*\)='`
34202    ac_optarg=
34203    ac_shift=:
34204    ;;
34205  *)
34206    ac_option=$1
34207    ac_optarg=$2
34208    ac_shift=shift
34209    ;;
34210  esac
34211
34212  case $ac_option in
34213  # Handling of the options.
34214  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
34215    ac_cs_recheck=: ;;
34216  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
34217    $as_echo "$ac_cs_version"; exit ;;
34218  --config | --confi | --conf | --con | --co | --c )
34219    $as_echo "$ac_cs_config"; exit ;;
34220  --debug | --debu | --deb | --de | --d | -d )
34221    debug=: ;;
34222  --file | --fil | --fi | --f )
34223    $ac_shift
34224    case $ac_optarg in
34225    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
34226    '') as_fn_error $? "missing file argument" ;;
34227    esac
34228    as_fn_append CONFIG_FILES " '$ac_optarg'"
34229    ac_need_defaults=false;;
34230  --header | --heade | --head | --hea )
34231    $ac_shift
34232    case $ac_optarg in
34233    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
34234    esac
34235    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
34236    ac_need_defaults=false;;
34237  --he | --h)
34238    # Conflict between --help and --header
34239    as_fn_error $? "ambiguous option: \`$1'
34240Try \`$0 --help' for more information.";;
34241  --help | --hel | -h )
34242    $as_echo "$ac_cs_usage"; exit ;;
34243  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
34244  | -silent | --silent | --silen | --sile | --sil | --si | --s)
34245    ac_cs_silent=: ;;
34246
34247  # This is an error.
34248  -*) as_fn_error $? "unrecognized option: \`$1'
34249Try \`$0 --help' for more information." ;;
34250
34251  *) as_fn_append ac_config_targets " $1"
34252     ac_need_defaults=false ;;
34253
34254  esac
34255  shift
34256done
34257
34258ac_configure_extra_args=
34259
34260if $ac_cs_silent; then
34261  exec 6>/dev/null
34262  ac_configure_extra_args="$ac_configure_extra_args --silent"
34263fi
34264
34265_ACEOF
34266cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34267if \$ac_cs_recheck; then
34268  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
34269  shift
34270  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
34271  CONFIG_SHELL='$SHELL'
34272  export CONFIG_SHELL
34273  exec "\$@"
34274fi
34275
34276_ACEOF
34277cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34278exec 5>>config.log
34279{
34280  echo
34281  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
34282## Running $as_me. ##
34283_ASBOX
34284  $as_echo "$ac_log"
34285} >&5
34286
34287_ACEOF
34288cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34289_ACEOF
34290
34291cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34292
34293# Handling of arguments.
34294for ac_config_target in $ac_config_targets
34295do
34296  case $ac_config_target in
34297    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
34298    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
34299    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
34300    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
34301    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
34302    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
34303    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
34304
34305  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
34306  esac
34307done
34308
34309
34310# If the user did not use the arguments to specify the items to instantiate,
34311# then the envvar interface is used.  Set only those that are not.
34312# We use the long form for the default assignment because of an extremely
34313# bizarre bug on SunOS 4.1.3.
34314if $ac_need_defaults; then
34315  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
34316  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
34317fi
34318
34319# Have a temporary directory for convenience.  Make it in the build tree
34320# simply because there is no reason against having it here, and in addition,
34321# creating and moving files from /tmp can sometimes cause problems.
34322# Hook for its removal unless debugging.
34323# Note that there is a small window in which the directory will not be cleaned:
34324# after its creation but before its name has been assigned to `$tmp'.
34325$debug ||
34326{
34327  tmp= ac_tmp=
34328  trap 'exit_status=$?
34329  : "${ac_tmp:=$tmp}"
34330  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
34331' 0
34332  trap 'as_fn_exit 1' 1 2 13 15
34333}
34334# Create a (secure) tmp directory for tmp files.
34335
34336{
34337  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
34338  test -d "$tmp"
34339}  ||
34340{
34341  tmp=./conf$$-$RANDOM
34342  (umask 077 && mkdir "$tmp")
34343} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
34344ac_tmp=$tmp
34345
34346# Set up the scripts for CONFIG_FILES section.
34347# No need to generate them if there are no CONFIG_FILES.
34348# This happens for instance with `./config.status config.h'.
34349if test -n "$CONFIG_FILES"; then
34350
34351
34352ac_cr=`echo X | tr X '\015'`
34353# On cygwin, bash can eat \r inside `` if the user requested igncr.
34354# But we know of no other shell where ac_cr would be empty at this
34355# point, so we can use a bashism as a fallback.
34356if test "x$ac_cr" = x; then
34357  eval ac_cr=\$\'\\r\'
34358fi
34359ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
34360if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
34361  ac_cs_awk_cr='\\r'
34362else
34363  ac_cs_awk_cr=$ac_cr
34364fi
34365
34366echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
34367_ACEOF
34368
34369
34370{
34371  echo "cat >conf$$subs.awk <<_ACEOF" &&
34372  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
34373  echo "_ACEOF"
34374} >conf$$subs.sh ||
34375  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34376ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
34377ac_delim='%!_!# '
34378for ac_last_try in false false false false false :; do
34379  . ./conf$$subs.sh ||
34380    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34381
34382  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
34383  if test $ac_delim_n = $ac_delim_num; then
34384    break
34385  elif $ac_last_try; then
34386    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34387  else
34388    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34389  fi
34390done
34391rm -f conf$$subs.sh
34392
34393cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34394cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
34395_ACEOF
34396sed -n '
34397h
34398s/^/S["/; s/!.*/"]=/
34399p
34400g
34401s/^[^!]*!//
34402:repl
34403t repl
34404s/'"$ac_delim"'$//
34405t delim
34406:nl
34407h
34408s/\(.\{148\}\)..*/\1/
34409t more1
34410s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
34411p
34412n
34413b repl
34414:more1
34415s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34416p
34417g
34418s/.\{148\}//
34419t nl
34420:delim
34421h
34422s/\(.\{148\}\)..*/\1/
34423t more2
34424s/["\\]/\\&/g; s/^/"/; s/$/"/
34425p
34426b
34427:more2
34428s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34429p
34430g
34431s/.\{148\}//
34432t delim
34433' <conf$$subs.awk | sed '
34434/^[^""]/{
34435  N
34436  s/\n//
34437}
34438' >>$CONFIG_STATUS || ac_write_fail=1
34439rm -f conf$$subs.awk
34440cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34441_ACAWK
34442cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
34443  for (key in S) S_is_set[key] = 1
34444  FS = ""
34445
34446}
34447{
34448  line = $ 0
34449  nfields = split(line, field, "@")
34450  substed = 0
34451  len = length(field[1])
34452  for (i = 2; i < nfields; i++) {
34453    key = field[i]
34454    keylen = length(key)
34455    if (S_is_set[key]) {
34456      value = S[key]
34457      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
34458      len += length(value) + length(field[++i])
34459      substed = 1
34460    } else
34461      len += 1 + keylen
34462  }
34463
34464  print line
34465}
34466
34467_ACAWK
34468_ACEOF
34469cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34470if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
34471  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
34472else
34473  cat
34474fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
34475  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
34476_ACEOF
34477
34478# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
34479# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
34480# trailing colons and then remove the whole line if VPATH becomes empty
34481# (actually we leave an empty line to preserve line numbers).
34482if test "x$srcdir" = x.; then
34483  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
34484h
34485s///
34486s/^/:/
34487s/[	 ]*$/:/
34488s/:\$(srcdir):/:/g
34489s/:\${srcdir}:/:/g
34490s/:@srcdir@:/:/g
34491s/^:*//
34492s/:*$//
34493x
34494s/\(=[	 ]*\).*/\1/
34495G
34496s/\n//
34497s/^[^=]*=[	 ]*$//
34498}'
34499fi
34500
34501cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34502fi # test -n "$CONFIG_FILES"
34503
34504# Set up the scripts for CONFIG_HEADERS section.
34505# No need to generate them if there are no CONFIG_HEADERS.
34506# This happens for instance with `./config.status Makefile'.
34507if test -n "$CONFIG_HEADERS"; then
34508cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
34509BEGIN {
34510_ACEOF
34511
34512# Transform confdefs.h into an awk script `defines.awk', embedded as
34513# here-document in config.status, that substitutes the proper values into
34514# config.h.in to produce config.h.
34515
34516# Create a delimiter string that does not exist in confdefs.h, to ease
34517# handling of long lines.
34518ac_delim='%!_!# '
34519for ac_last_try in false false :; do
34520  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
34521  if test -z "$ac_tt"; then
34522    break
34523  elif $ac_last_try; then
34524    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
34525  else
34526    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34527  fi
34528done
34529
34530# For the awk script, D is an array of macro values keyed by name,
34531# likewise P contains macro parameters if any.  Preserve backslash
34532# newline sequences.
34533
34534ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
34535sed -n '
34536s/.\{148\}/&'"$ac_delim"'/g
34537t rset
34538:rset
34539s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
34540t def
34541d
34542:def
34543s/\\$//
34544t bsnl
34545s/["\\]/\\&/g
34546s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34547D["\1"]=" \3"/p
34548s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
34549d
34550:bsnl
34551s/["\\]/\\&/g
34552s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34553D["\1"]=" \3\\\\\\n"\\/p
34554t cont
34555s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
34556t cont
34557d
34558:cont
34559n
34560s/.\{148\}/&'"$ac_delim"'/g
34561t clear
34562:clear
34563s/\\$//
34564t bsnlc
34565s/["\\]/\\&/g; s/^/"/; s/$/"/p
34566d
34567:bsnlc
34568s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
34569b cont
34570' <confdefs.h | sed '
34571s/'"$ac_delim"'/"\\\
34572"/g' >>$CONFIG_STATUS || ac_write_fail=1
34573
34574cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34575  for (key in D) D_is_set[key] = 1
34576  FS = ""
34577}
34578/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
34579  line = \$ 0
34580  split(line, arg, " ")
34581  if (arg[1] == "#") {
34582    defundef = arg[2]
34583    mac1 = arg[3]
34584  } else {
34585    defundef = substr(arg[1], 2)
34586    mac1 = arg[2]
34587  }
34588  split(mac1, mac2, "(") #)
34589  macro = mac2[1]
34590  prefix = substr(line, 1, index(line, defundef) - 1)
34591  if (D_is_set[macro]) {
34592    # Preserve the white space surrounding the "#".
34593    print prefix "define", macro P[macro] D[macro]
34594    next
34595  } else {
34596    # Replace #undef with comments.  This is necessary, for example,
34597    # in the case of _POSIX_SOURCE, which is predefined and required
34598    # on some systems where configure will not decide to define it.
34599    if (defundef == "undef") {
34600      print "/*", prefix defundef, macro, "*/"
34601      next
34602    }
34603  }
34604}
34605{ print }
34606_ACAWK
34607_ACEOF
34608cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34609  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
34610fi # test -n "$CONFIG_HEADERS"
34611
34612
34613eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
34614shift
34615for ac_tag
34616do
34617  case $ac_tag in
34618  :[FHLC]) ac_mode=$ac_tag; continue;;
34619  esac
34620  case $ac_mode$ac_tag in
34621  :[FHL]*:*);;
34622  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
34623  :[FH]-) ac_tag=-:-;;
34624  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
34625  esac
34626  ac_save_IFS=$IFS
34627  IFS=:
34628  set x $ac_tag
34629  IFS=$ac_save_IFS
34630  shift
34631  ac_file=$1
34632  shift
34633
34634  case $ac_mode in
34635  :L) ac_source=$1;;
34636  :[FH])
34637    ac_file_inputs=
34638    for ac_f
34639    do
34640      case $ac_f in
34641      -) ac_f="$ac_tmp/stdin";;
34642      *) # Look for the file first in the build tree, then in the source tree
34643	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
34644	 # because $ac_f cannot contain `:'.
34645	 test -f "$ac_f" ||
34646	   case $ac_f in
34647	   [\\/$]*) false;;
34648	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
34649	   esac ||
34650	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
34651      esac
34652      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
34653      as_fn_append ac_file_inputs " '$ac_f'"
34654    done
34655
34656    # Let's still pretend it is `configure' which instantiates (i.e., don't
34657    # use $as_me), people would be surprised to read:
34658    #    /* config.h.  Generated by config.status.  */
34659    configure_input='Generated from '`
34660	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
34661	`' by configure.'
34662    if test x"$ac_file" != x-; then
34663      configure_input="$ac_file.  $configure_input"
34664      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
34665$as_echo "$as_me: creating $ac_file" >&6;}
34666    fi
34667    # Neutralize special characters interpreted by sed in replacement strings.
34668    case $configure_input in #(
34669    *\&* | *\|* | *\\* )
34670       ac_sed_conf_input=`$as_echo "$configure_input" |
34671       sed 's/[\\\\&|]/\\\\&/g'`;; #(
34672    *) ac_sed_conf_input=$configure_input;;
34673    esac
34674
34675    case $ac_tag in
34676    *:-:* | *:-) cat >"$ac_tmp/stdin" \
34677      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
34678    esac
34679    ;;
34680  esac
34681
34682  ac_dir=`$as_dirname -- "$ac_file" ||
34683$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34684	 X"$ac_file" : 'X\(//\)[^/]' \| \
34685	 X"$ac_file" : 'X\(//\)$' \| \
34686	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
34687$as_echo X"$ac_file" |
34688    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34689	    s//\1/
34690	    q
34691	  }
34692	  /^X\(\/\/\)[^/].*/{
34693	    s//\1/
34694	    q
34695	  }
34696	  /^X\(\/\/\)$/{
34697	    s//\1/
34698	    q
34699	  }
34700	  /^X\(\/\).*/{
34701	    s//\1/
34702	    q
34703	  }
34704	  s/.*/./; q'`
34705  as_dir="$ac_dir"; as_fn_mkdir_p
34706  ac_builddir=.
34707
34708case "$ac_dir" in
34709.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
34710*)
34711  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
34712  # A ".." for each directory in $ac_dir_suffix.
34713  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
34714  case $ac_top_builddir_sub in
34715  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
34716  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
34717  esac ;;
34718esac
34719ac_abs_top_builddir=$ac_pwd
34720ac_abs_builddir=$ac_pwd$ac_dir_suffix
34721# for backward compatibility:
34722ac_top_builddir=$ac_top_build_prefix
34723
34724case $srcdir in
34725  .)  # We are building in place.
34726    ac_srcdir=.
34727    ac_top_srcdir=$ac_top_builddir_sub
34728    ac_abs_top_srcdir=$ac_pwd ;;
34729  [\\/]* | ?:[\\/]* )  # Absolute name.
34730    ac_srcdir=$srcdir$ac_dir_suffix;
34731    ac_top_srcdir=$srcdir
34732    ac_abs_top_srcdir=$srcdir ;;
34733  *) # Relative name.
34734    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
34735    ac_top_srcdir=$ac_top_build_prefix$srcdir
34736    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
34737esac
34738ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
34739
34740
34741  case $ac_mode in
34742  :F)
34743  #
34744  # CONFIG_FILE
34745  #
34746
34747_ACEOF
34748
34749cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34750# If the template does not know about datarootdir, expand it.
34751# FIXME: This hack should be removed a few years after 2.60.
34752ac_datarootdir_hack=; ac_datarootdir_seen=
34753ac_sed_dataroot='
34754/datarootdir/ {
34755  p
34756  q
34757}
34758/@datadir@/p
34759/@docdir@/p
34760/@infodir@/p
34761/@localedir@/p
34762/@mandir@/p'
34763case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
34764*datarootdir*) ac_datarootdir_seen=yes;;
34765*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
34766  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
34767$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
34768_ACEOF
34769cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34770  ac_datarootdir_hack='
34771  s&@datadir@&$datadir&g
34772  s&@docdir@&$docdir&g
34773  s&@infodir@&$infodir&g
34774  s&@localedir@&$localedir&g
34775  s&@mandir@&$mandir&g
34776  s&\\\${datarootdir}&$datarootdir&g' ;;
34777esac
34778_ACEOF
34779
34780# Neutralize VPATH when `$srcdir' = `.'.
34781# Shell code in configure.ac might set extrasub.
34782# FIXME: do we really want to maintain this feature?
34783cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34784ac_sed_extra="$ac_vpsub
34785$extrasub
34786_ACEOF
34787cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34788:t
34789/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
34790s|@configure_input@|$ac_sed_conf_input|;t t
34791s&@top_builddir@&$ac_top_builddir_sub&;t t
34792s&@top_build_prefix@&$ac_top_build_prefix&;t t
34793s&@srcdir@&$ac_srcdir&;t t
34794s&@abs_srcdir@&$ac_abs_srcdir&;t t
34795s&@top_srcdir@&$ac_top_srcdir&;t t
34796s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
34797s&@builddir@&$ac_builddir&;t t
34798s&@abs_builddir@&$ac_abs_builddir&;t t
34799s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
34800$ac_datarootdir_hack
34801"
34802eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
34803  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34804
34805test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
34806  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
34807  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
34808      "$ac_tmp/out"`; test -z "$ac_out"; } &&
34809  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34810which seems to be undefined.  Please make sure it is defined" >&5
34811$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34812which seems to be undefined.  Please make sure it is defined" >&2;}
34813
34814  rm -f "$ac_tmp/stdin"
34815  case $ac_file in
34816  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
34817  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
34818  esac \
34819  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34820 ;;
34821  :H)
34822  #
34823  # CONFIG_HEADER
34824  #
34825  if test x"$ac_file" != x-; then
34826    {
34827      $as_echo "/* $configure_input  */" \
34828      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
34829    } >"$ac_tmp/config.h" \
34830      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34831    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
34832      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
34833$as_echo "$as_me: $ac_file is unchanged" >&6;}
34834    else
34835      rm -f "$ac_file"
34836      mv "$ac_tmp/config.h" "$ac_file" \
34837	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
34838    fi
34839  else
34840    $as_echo "/* $configure_input  */" \
34841      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
34842      || as_fn_error $? "could not create -" "$LINENO" 5
34843  fi
34844 ;;
34845
34846
34847  esac
34848
34849done # for ac_tag
34850
34851
34852as_fn_exit 0
34853_ACEOF
34854ac_clean_files=$ac_clean_files_save
34855
34856test $ac_write_fail = 0 ||
34857  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
34858
34859
34860# configure is writing to config.log, and then calls config.status.
34861# config.status does its own redirection, appending to config.log.
34862# Unfortunately, on DOS this fails, as config.log is still kept open
34863# by configure, so config.status won't be able to write to it; its
34864# output is simply discarded.  So we exec the FD to /dev/null,
34865# effectively closing config.log, so it can be properly (re)opened and
34866# appended to by config.status.  When coming back to configure, we
34867# need to make the FD available again.
34868if test "$no_create" != yes; then
34869  ac_cs_success=:
34870  ac_config_status_args=
34871  test "$silent" = yes &&
34872    ac_config_status_args="$ac_config_status_args --quiet"
34873  exec 5>/dev/null
34874  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
34875  exec 5>>config.log
34876  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
34877  # would make configure fail if this is the last instruction.
34878  $ac_cs_success || as_fn_exit 1
34879fi
34880if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
34881  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
34882$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
34883fi
34884
34885
34886# Try to move the config.log file to the output directory.
34887if test -e ./config.log; then
34888  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
34889fi
34890
34891# Make the compare script executable
34892$CHMOD +x $OUTPUT_ROOT/compare.sh
34893
34894# Finally output some useful information to the user
34895
34896  # Finally output some useful information to the user
34897
34898  if test "x$CCACHE_FOUND" != x; then
34899    if  test "x$HAS_GOOD_CCACHE" = x; then
34900      CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
34901      CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
34902    else
34903      CCACHE_STATUS="installed and in use"
34904    fi
34905  else
34906    if test "x$GCC" = xyes; then
34907      CCACHE_STATUS="not installed (consider installing)"
34908      CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
34909    else
34910      CCACHE_STATUS="not available for your system"
34911    fi
34912  fi
34913
34914  printf "\n"
34915  printf "====================================================\n"
34916  printf "A new configuration has been successfully created in\n"
34917  printf "$OUTPUT_ROOT\n"
34918  if test "x$CONFIGURE_COMMAND_LINE" != x; then
34919    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
34920  else
34921    printf "using default settings.\n"
34922  fi
34923
34924  printf "\n"
34925  printf "Configuration summary:\n"
34926  printf "* Debug level:    $DEBUG_LEVEL\n"
34927  printf "* JDK variant:    $JDK_VARIANT\n"
34928  printf "* JVM variants:   $with_jvm_variants\n"
34929  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
34930
34931  printf "\n"
34932  printf "Tools summary:\n"
34933  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
34934    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
34935  fi
34936  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
34937  printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
34938  printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
34939
34940  printf "\n"
34941  printf "Build performance summary:\n"
34942  printf "* Cores to use:   $JOBS\n"
34943  printf "* Memory limit:   $MEMORY_SIZE MB\n"
34944  printf "* ccache status:  $CCACHE_STATUS\n"
34945  printf "\n"
34946
34947  if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
34948    printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
34949    printf "$CCACHE_HELP_MSG\n"
34950
34951  # Print a helpful message on how to acquire the necessary build dependency.
34952  # ccache is the help tag: freetyp2, cups, pulse, alsa etc
34953  MISSING_DEPENDENCY=ccache
34954
34955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34956    cygwin_help $MISSING_DEPENDENCY
34957  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34958    msys_help $MISSING_DEPENDENCY
34959  else
34960    PKGHANDLER_COMMAND=
34961
34962    case $PKGHANDLER in
34963      apt-get)
34964        apt_help     $MISSING_DEPENDENCY ;;
34965      yum)
34966        yum_help     $MISSING_DEPENDENCY ;;
34967      port)
34968        port_help    $MISSING_DEPENDENCY ;;
34969      pkgutil)
34970        pkgutil_help $MISSING_DEPENDENCY ;;
34971      pkgadd)
34972        pkgadd_help  $MISSING_DEPENDENCY ;;
34973      * )
34974        break ;;
34975    esac
34976
34977    if test "x$PKGHANDLER_COMMAND" != x; then
34978      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34979    fi
34980  fi
34981
34982    printf "$HELP_MSG\n"
34983    printf "\n"
34984  fi
34985
34986  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
34987    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
34988    printf "will result in longer build times.\n"
34989    printf "\n"
34990  fi
34991
34992  if test "x$FOUND_ALT_VARIABLES" != "x"; then
34993    printf "WARNING: You have old-style ALT_ environment variables set.\n"
34994    printf "These are not respected, and will be ignored. It is recommended\n"
34995    printf "that you clean your environment. The following variables are set:\n"
34996    printf "$FOUND_ALT_VARIABLES\n"
34997    printf "\n"
34998  fi
34999
35000  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
35001    printf "WARNING: Your build output directory is not on a local disk.\n"
35002    printf "This will severely degrade build performance!\n"
35003    printf "It is recommended that you create an output directory on a local disk,\n"
35004    printf "and run the configure script again from that directory.\n"
35005    printf "\n"
35006  fi
35007
35008  if test "x$IS_RECONFIGURE" = "xyes"; then
35009    printf "WARNING: The result of this configuration has overridden an older\n"
35010    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
35011    printf "proper build. Failure to do so might result in strange build problems.\n"
35012    printf "\n"
35013  fi
35014
35015