generated-configure.sh revision 852:22c6f0b7e2b5
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  --disable-macosx-runtime-support
1720                          disable the use of MacOSX Java runtime support
1721                          framework [enabled]
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
3153
3154# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3155# $1: variable to check
3156# $2: executable name to print in warning (optional)
3157
3158
3159# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3160# Arguments as AC_PATH_PROG:
3161# $1: variable to set
3162# $2: executable name to look for
3163
3164
3165# Setup the most fundamental tools that relies on not much else to set up,
3166# but is used by much of the early bootstrap code.
3167
3168
3169# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3170
3171
3172
3173
3174
3175
3176
3177#%%% Simple tools %%%
3178
3179# Check if we have found a usable version of make
3180# $1: the path to a potential make binary (or empty)
3181# $2: the description on how we found this
3182
3183
3184# Goes looking for a usable version of GNU make.
3185
3186
3187
3188
3189
3190
3191# Check if build directory is on local disk. If not possible to determine,
3192# we prefer to claim it's local.
3193# Argument 1: directory to test
3194# Argument 2: what to do if it is on local disk
3195# Argument 3: what to do otherwise (remote disk or failure)
3196
3197
3198# Check that source files have basic read permissions set. This might
3199# not be the case in cygwin in certain conditions.
3200
3201
3202
3203
3204#
3205# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3206# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3207#
3208# This code is free software; you can redistribute it and/or modify it
3209# under the terms of the GNU General Public License version 2 only, as
3210# published by the Free Software Foundation.  Oracle designates this
3211# particular file as subject to the "Classpath" exception as provided
3212# by Oracle in the LICENSE file that accompanied this code.
3213#
3214# This code is distributed in the hope that it will be useful, but WITHOUT
3215# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3216# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3217# version 2 for more details (a copy is included in the LICENSE file that
3218# accompanied this code).
3219#
3220# You should have received a copy of the GNU General Public License version
3221# 2 along with this work; if not, write to the Free Software Foundation,
3222# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3223#
3224# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3225# or visit www.oracle.com if you need additional information or have any
3226# questions.
3227#
3228
3229
3230
3231
3232
3233# Helper function which possibly converts a path using DOS-style short mode.
3234# If so, the updated path is stored in $new_path.
3235# $1: The path to check
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# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3244# and could probably be heavily simplified. However, all changes in this
3245# area tend to need lot of testing in different scenarios, and in lack of
3246# proper unit testing, cleaning this up has not been deemed worth the effort
3247# at the moment.
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3258
3259
3260
3261
3262#
3263# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3264# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3265#
3266# This code is free software; you can redistribute it and/or modify it
3267# under the terms of the GNU General Public License version 2 only, as
3268# published by the Free Software Foundation.  Oracle designates this
3269# particular file as subject to the "Classpath" exception as provided
3270# by Oracle in the LICENSE file that accompanied this code.
3271#
3272# This code is distributed in the hope that it will be useful, but WITHOUT
3273# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3274# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3275# version 2 for more details (a copy is included in the LICENSE file that
3276# accompanied this code).
3277#
3278# You should have received a copy of the GNU General Public License version
3279# 2 along with this work; if not, write to the Free Software Foundation,
3280# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3281#
3282# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3283# or visit www.oracle.com if you need additional information or have any
3284# questions.
3285#
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297# ... then the rest
3298#
3299# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3300# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3301#
3302# This code is free software; you can redistribute it and/or modify it
3303# under the terms of the GNU General Public License version 2 only, as
3304# published by the Free Software Foundation.  Oracle designates this
3305# particular file as subject to the "Classpath" exception as provided
3306# by Oracle in the LICENSE file that accompanied this code.
3307#
3308# This code is distributed in the hope that it will be useful, but WITHOUT
3309# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3310# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3311# version 2 for more details (a copy is included in the LICENSE file that
3312# accompanied this code).
3313#
3314# You should have received a copy of the GNU General Public License version
3315# 2 along with this work; if not, write to the Free Software Foundation,
3316# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3317#
3318# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3319# or visit www.oracle.com if you need additional information or have any
3320# questions.
3321#
3322
3323# Execute the check given as argument, and verify the result
3324# If the Boot JDK was previously found, do nothing
3325# $1 A command line (typically autoconf macro) to execute
3326
3327
3328# Test: Is bootjdk explicitely set by command line arguments?
3329
3330
3331# Test: Is bootjdk available from builddeps?
3332
3333
3334# Test: Is $JAVA_HOME set?
3335
3336
3337# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3338
3339
3340# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3341
3342
3343# Look for a jdk in the given path. If there are multiple, try to select the newest.
3344# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3345# $1 = Path to directory containing jdk installations.
3346# $2 = String to append to the found JDK directory to get the proper JDK home
3347
3348
3349# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3350# environmental variable as base for where to look.
3351# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3352
3353
3354# Test: Is there a JDK installed in default, well-known locations?
3355
3356
3357# Check that a command-line tool in the Boot JDK is correct
3358# $1 = name of variable to assign
3359# $2 = name of binary
3360
3361
3362###############################################################################
3363#
3364# We need a Boot JDK to bootstrap the build.
3365#
3366
3367
3368
3369
3370
3371#
3372# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3373# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3374#
3375# This code is free software; you can redistribute it and/or modify it
3376# under the terms of the GNU General Public License version 2 only, as
3377# published by the Free Software Foundation.  Oracle designates this
3378# particular file as subject to the "Classpath" exception as provided
3379# by Oracle in the LICENSE file that accompanied this code.
3380#
3381# This code is distributed in the hope that it will be useful, but WITHOUT
3382# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3383# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3384# version 2 for more details (a copy is included in the LICENSE file that
3385# accompanied this code).
3386#
3387# You should have received a copy of the GNU General Public License version
3388# 2 along with this work; if not, write to the Free Software Foundation,
3389# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3390#
3391# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3392# or visit www.oracle.com if you need additional information or have any
3393# questions.
3394#
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415#
3416# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3417# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3418#
3419# This code is free software; you can redistribute it and/or modify it
3420# under the terms of the GNU General Public License version 2 only, as
3421# published by the Free Software Foundation.  Oracle designates this
3422# particular file as subject to the "Classpath" exception as provided
3423# by Oracle in the LICENSE file that accompanied this code.
3424#
3425# This code is distributed in the hope that it will be useful, but WITHOUT
3426# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3427# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3428# version 2 for more details (a copy is included in the LICENSE file that
3429# accompanied this code).
3430#
3431# You should have received a copy of the GNU General Public License version
3432# 2 along with this work; if not, write to the Free Software Foundation,
3433# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3434#
3435# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3436# or visit www.oracle.com if you need additional information or have any
3437# questions.
3438#
3439
3440
3441
3442
3443
3444cygwin_help() {
3445    case $1 in
3446    unzip)
3447        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3448    zip)
3449        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3450    make)
3451        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3452    * )
3453       break ;;
3454    esac
3455}
3456
3457apt_help() {
3458    case $1 in
3459    devkit)
3460        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3461    openjdk)
3462        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3463    alsa)
3464        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3465    cups)
3466        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3467    freetype2)
3468        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3469    pulse)
3470        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3471    x11)
3472        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3473    ccache)
3474        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3475    * )
3476       break ;;
3477    esac
3478}
3479
3480yum_help() {
3481    case $1 in
3482    devkit)
3483        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3484    openjdk)
3485        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3486    alsa)
3487        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3488    cups)
3489        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3490    freetype2)
3491        PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3492    pulse)
3493        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3494    x11)
3495        PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
3496    ccache)
3497        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3498    * )
3499       break ;;
3500    esac
3501}
3502
3503port_help() {
3504    PKGHANDLER_COMMAND=""
3505}
3506
3507pkgutil_help() {
3508    PKGHANDLER_COMMAND=""
3509}
3510
3511pkgadd_help() {
3512    PKGHANDLER_COMMAND=""
3513}
3514
3515
3516
3517#
3518# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3519# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3520#
3521# This code is free software; you can redistribute it and/or modify it
3522# under the terms of the GNU General Public License version 2 only, as
3523# published by the Free Software Foundation.  Oracle designates this
3524# particular file as subject to the "Classpath" exception as provided
3525# by Oracle in the LICENSE file that accompanied this code.
3526#
3527# This code is distributed in the hope that it will be useful, but WITHOUT
3528# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3529# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3530# version 2 for more details (a copy is included in the LICENSE file that
3531# accompanied this code).
3532#
3533# You should have received a copy of the GNU General Public License version
3534# 2 along with this work; if not, write to the Free Software Foundation,
3535# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3536#
3537# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3538# or visit www.oracle.com if you need additional information or have any
3539# questions.
3540#
3541
3542
3543
3544
3545
3546
3547
3548
3549###############################################################################
3550#
3551# Should we build only OpenJDK even if closed sources are present?
3552#
3553
3554
3555
3556
3557###############################################################################
3558#
3559# Setup version numbers
3560#
3561
3562
3563
3564
3565
3566
3567# Support for customization of the build process. Some build files
3568# will include counterparts from this location, if they exist. This allows
3569# for a degree of customization of the build targets and the rules/recipes
3570# to create them
3571
3572# Check whether --with-custom-make-dir was given.
3573if test "${with_custom_make_dir+set}" = set; then :
3574  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3575fi
3576
3577
3578
3579#
3580# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3581# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3582#
3583# This code is free software; you can redistribute it and/or modify it
3584# under the terms of the GNU General Public License version 2 only, as
3585# published by the Free Software Foundation.  Oracle designates this
3586# particular file as subject to the "Classpath" exception as provided
3587# by Oracle in the LICENSE file that accompanied this code.
3588#
3589# This code is distributed in the hope that it will be useful, but WITHOUT
3590# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3591# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3592# version 2 for more details (a copy is included in the LICENSE file that
3593# accompanied this code).
3594#
3595# You should have received a copy of the GNU General Public License version
3596# 2 along with this work; if not, write to the Free Software Foundation,
3597# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3598#
3599# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3600# or visit www.oracle.com if you need additional information or have any
3601# questions.
3602#
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618#
3619# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3620# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3621#
3622# This code is free software; you can redistribute it and/or modify it
3623# under the terms of the GNU General Public License version 2 only, as
3624# published by the Free Software Foundation.  Oracle designates this
3625# particular file as subject to the "Classpath" exception as provided
3626# by Oracle in the LICENSE file that accompanied this code.
3627#
3628# This code is distributed in the hope that it will be useful, but WITHOUT
3629# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3630# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3631# version 2 for more details (a copy is included in the LICENSE file that
3632# accompanied this code).
3633#
3634# You should have received a copy of the GNU General Public License version
3635# 2 along with this work; if not, write to the Free Software Foundation,
3636# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3637#
3638# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3639# or visit www.oracle.com if you need additional information or have any
3640# questions.
3641#
3642
3643# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3644# Converts autoconf style CPU name to OpenJDK style, into
3645# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3646
3647
3648# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3649# Converts autoconf style OS name to OpenJDK style, into
3650# VAR_OS and VAR_OS_API.
3651
3652
3653# Expects $host_os $host_cpu $build_os and $build_cpu
3654# and $with_target_bits to have been setup!
3655#
3656# Translate the standard triplet(quadruplet) definition
3657# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3658# OPENJDK_BUILD_OS, etc.
3659
3660
3661# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3662# accordingly. Must be done after setting up build and target system, but before
3663# doing anything else with these values.
3664
3665
3666    # Setup the legacy variables, for controlling the old makefiles.
3667    #
3668
3669
3670
3671
3672#%%% Build and target systems %%%
3673
3674
3675
3676
3677# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3678# Add -mX to various FLAGS variables.
3679
3680
3681
3682
3683
3684
3685#
3686# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3687# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3688#
3689# This code is free software; you can redistribute it and/or modify it
3690# under the terms of the GNU General Public License version 2 only, as
3691# published by the Free Software Foundation.  Oracle designates this
3692# particular file as subject to the "Classpath" exception as provided
3693# by Oracle in the LICENSE file that accompanied this code.
3694#
3695# This code is distributed in the hope that it will be useful, but WITHOUT
3696# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3697# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3698# version 2 for more details (a copy is included in the LICENSE file that
3699# accompanied this code).
3700#
3701# You should have received a copy of the GNU General Public License version
3702# 2 along with this work; if not, write to the Free Software Foundation,
3703# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3704#
3705# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3706# or visit www.oracle.com if you need additional information or have any
3707# questions.
3708#
3709
3710
3711
3712
3713
3714
3715
3716
3717#
3718# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3719# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3720#
3721# This code is free software; you can redistribute it and/or modify it
3722# under the terms of the GNU General Public License version 2 only, as
3723# published by the Free Software Foundation.  Oracle designates this
3724# particular file as subject to the "Classpath" exception as provided
3725# by Oracle in the LICENSE file that accompanied this code.
3726#
3727# This code is distributed in the hope that it will be useful, but WITHOUT
3728# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3729# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3730# version 2 for more details (a copy is included in the LICENSE file that
3731# accompanied this code).
3732#
3733# You should have received a copy of the GNU General Public License version
3734# 2 along with this work; if not, write to the Free Software Foundation,
3735# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3736#
3737# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3738# or visit www.oracle.com if you need additional information or have any
3739# questions.
3740#
3741
3742# $1 = compiler to test (CC or CXX)
3743# $2 = human readable name of compiler (C or C++)
3744
3745
3746
3747
3748
3749# $1 = compiler to test (CC or CXX)
3750# $2 = human readable name of compiler (C or C++)
3751# $3 = list of compiler names to search for
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765# TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3766#                                   [RUN-IF-FALSE])
3767# ------------------------------------------------------------
3768# Check that the c and c++ compilers support an argument
3769
3770
3771
3772
3773# Setup the JTREG paths
3774
3775
3776#
3777# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3778# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3779#
3780# This code is free software; you can redistribute it and/or modify it
3781# under the terms of the GNU General Public License version 2 only, as
3782# published by the Free Software Foundation.  Oracle designates this
3783# particular file as subject to the "Classpath" exception as provided
3784# by Oracle in the LICENSE file that accompanied this code.
3785#
3786# This code is distributed in the hope that it will be useful, but WITHOUT
3787# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3788# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3789# version 2 for more details (a copy is included in the LICENSE file that
3790# accompanied this code).
3791#
3792# You should have received a copy of the GNU General Public License version
3793# 2 along with this work; if not, write to the Free Software Foundation,
3794# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3795#
3796# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3797# or visit www.oracle.com if you need additional information or have any
3798# questions.
3799#
3800
3801
3802
3803
3804
3805
3806
3807# Check if the VS env variables were setup prior to running configure.
3808# If not, then find vcvarsall.bat and run it automatically, and integrate
3809# the set env variables into the spec file.
3810
3811
3812
3813
3814
3815
3816# This line needs to be here, verbatim, after all includes and the dummy hook
3817# definitions. It is replaced with custom functionality when building
3818# custom sources.
3819#CUSTOM_AUTOCONF_INCLUDE
3820
3821# Do not change or remove the following line, it is needed for consistency checks:
3822DATE_WHEN_GENERATED=1381162713
3823
3824###############################################################################
3825#
3826# Initialization / Boot-strapping
3827#
3828# The bootstrapping process needs to solve the "chicken or the egg" problem,
3829# thus it jumps back and forth, each time gaining something needed later on.
3830#
3831###############################################################################
3832
3833# Basic initialization that must happen first of all
3834
3835# Save the original command line. This is passed to us by the wrapper configure script.
3836
3837DATE_WHEN_CONFIGURED=`LANG=C date`
3838
3839{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3840$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3841{ $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3842$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3843
3844
3845
3846# Start with tools that do not need have cross compilation support
3847# and can be expected to be found in the default PATH. These tools are
3848# used by configure. Nor are these tools expected to be found in the
3849# devkit from the builddeps server either, since they are
3850# needed to download the devkit.
3851
3852# First are all the simple required tools.
3853
3854    for ac_prog in basename
3855do
3856  # Extract the first word of "$ac_prog", so it can be a program name with args.
3857set dummy $ac_prog; ac_word=$2
3858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3859$as_echo_n "checking for $ac_word... " >&6; }
3860if ${ac_cv_path_BASENAME+:} false; then :
3861  $as_echo_n "(cached) " >&6
3862else
3863  case $BASENAME in
3864  [\\/]* | ?:[\\/]*)
3865  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3866  ;;
3867  *)
3868  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3869for as_dir in $PATH
3870do
3871  IFS=$as_save_IFS
3872  test -z "$as_dir" && as_dir=.
3873    for ac_exec_ext in '' $ac_executable_extensions; do
3874  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3875    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3876    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3877    break 2
3878  fi
3879done
3880  done
3881IFS=$as_save_IFS
3882
3883  ;;
3884esac
3885fi
3886BASENAME=$ac_cv_path_BASENAME
3887if test -n "$BASENAME"; then
3888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3889$as_echo "$BASENAME" >&6; }
3890else
3891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3892$as_echo "no" >&6; }
3893fi
3894
3895
3896  test -n "$BASENAME" && break
3897done
3898
3899
3900    if test "x$BASENAME" = x; then
3901        if test "xbasename" = x; then
3902          PROG_NAME=basename
3903        else
3904          PROG_NAME=basename
3905        fi
3906        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3907$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3908        as_fn_error $? "Cannot continue" "$LINENO" 5
3909    fi
3910
3911
3912
3913    for ac_prog in bash
3914do
3915  # Extract the first word of "$ac_prog", so it can be a program name with args.
3916set dummy $ac_prog; ac_word=$2
3917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3918$as_echo_n "checking for $ac_word... " >&6; }
3919if ${ac_cv_path_BASH+:} false; then :
3920  $as_echo_n "(cached) " >&6
3921else
3922  case $BASH in
3923  [\\/]* | ?:[\\/]*)
3924  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3925  ;;
3926  *)
3927  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3928for as_dir in $PATH
3929do
3930  IFS=$as_save_IFS
3931  test -z "$as_dir" && as_dir=.
3932    for ac_exec_ext in '' $ac_executable_extensions; do
3933  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3934    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3935    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3936    break 2
3937  fi
3938done
3939  done
3940IFS=$as_save_IFS
3941
3942  ;;
3943esac
3944fi
3945BASH=$ac_cv_path_BASH
3946if test -n "$BASH"; then
3947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3948$as_echo "$BASH" >&6; }
3949else
3950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3951$as_echo "no" >&6; }
3952fi
3953
3954
3955  test -n "$BASH" && break
3956done
3957
3958
3959    if test "x$BASH" = x; then
3960        if test "xbash" = x; then
3961          PROG_NAME=bash
3962        else
3963          PROG_NAME=bash
3964        fi
3965        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3966$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3967        as_fn_error $? "Cannot continue" "$LINENO" 5
3968    fi
3969
3970
3971
3972    for ac_prog in cat
3973do
3974  # Extract the first word of "$ac_prog", so it can be a program name with args.
3975set dummy $ac_prog; ac_word=$2
3976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3977$as_echo_n "checking for $ac_word... " >&6; }
3978if ${ac_cv_path_CAT+:} false; then :
3979  $as_echo_n "(cached) " >&6
3980else
3981  case $CAT in
3982  [\\/]* | ?:[\\/]*)
3983  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3984  ;;
3985  *)
3986  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3987for as_dir in $PATH
3988do
3989  IFS=$as_save_IFS
3990  test -z "$as_dir" && as_dir=.
3991    for ac_exec_ext in '' $ac_executable_extensions; do
3992  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3993    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3994    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3995    break 2
3996  fi
3997done
3998  done
3999IFS=$as_save_IFS
4000
4001  ;;
4002esac
4003fi
4004CAT=$ac_cv_path_CAT
4005if test -n "$CAT"; then
4006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4007$as_echo "$CAT" >&6; }
4008else
4009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4010$as_echo "no" >&6; }
4011fi
4012
4013
4014  test -n "$CAT" && break
4015done
4016
4017
4018    if test "x$CAT" = x; then
4019        if test "xcat" = x; then
4020          PROG_NAME=cat
4021        else
4022          PROG_NAME=cat
4023        fi
4024        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4025$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4026        as_fn_error $? "Cannot continue" "$LINENO" 5
4027    fi
4028
4029
4030
4031    for ac_prog in chmod
4032do
4033  # Extract the first word of "$ac_prog", so it can be a program name with args.
4034set dummy $ac_prog; ac_word=$2
4035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4036$as_echo_n "checking for $ac_word... " >&6; }
4037if ${ac_cv_path_CHMOD+:} false; then :
4038  $as_echo_n "(cached) " >&6
4039else
4040  case $CHMOD in
4041  [\\/]* | ?:[\\/]*)
4042  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4043  ;;
4044  *)
4045  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4046for as_dir in $PATH
4047do
4048  IFS=$as_save_IFS
4049  test -z "$as_dir" && as_dir=.
4050    for ac_exec_ext in '' $ac_executable_extensions; do
4051  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4052    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4053    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4054    break 2
4055  fi
4056done
4057  done
4058IFS=$as_save_IFS
4059
4060  ;;
4061esac
4062fi
4063CHMOD=$ac_cv_path_CHMOD
4064if test -n "$CHMOD"; then
4065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4066$as_echo "$CHMOD" >&6; }
4067else
4068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4069$as_echo "no" >&6; }
4070fi
4071
4072
4073  test -n "$CHMOD" && break
4074done
4075
4076
4077    if test "x$CHMOD" = x; then
4078        if test "xchmod" = x; then
4079          PROG_NAME=chmod
4080        else
4081          PROG_NAME=chmod
4082        fi
4083        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4084$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4085        as_fn_error $? "Cannot continue" "$LINENO" 5
4086    fi
4087
4088
4089
4090    for ac_prog in cmp
4091do
4092  # Extract the first word of "$ac_prog", so it can be a program name with args.
4093set dummy $ac_prog; ac_word=$2
4094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4095$as_echo_n "checking for $ac_word... " >&6; }
4096if ${ac_cv_path_CMP+:} false; then :
4097  $as_echo_n "(cached) " >&6
4098else
4099  case $CMP in
4100  [\\/]* | ?:[\\/]*)
4101  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4102  ;;
4103  *)
4104  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4105for as_dir in $PATH
4106do
4107  IFS=$as_save_IFS
4108  test -z "$as_dir" && as_dir=.
4109    for ac_exec_ext in '' $ac_executable_extensions; do
4110  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4111    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4112    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4113    break 2
4114  fi
4115done
4116  done
4117IFS=$as_save_IFS
4118
4119  ;;
4120esac
4121fi
4122CMP=$ac_cv_path_CMP
4123if test -n "$CMP"; then
4124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4125$as_echo "$CMP" >&6; }
4126else
4127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4128$as_echo "no" >&6; }
4129fi
4130
4131
4132  test -n "$CMP" && break
4133done
4134
4135
4136    if test "x$CMP" = x; then
4137        if test "xcmp" = x; then
4138          PROG_NAME=cmp
4139        else
4140          PROG_NAME=cmp
4141        fi
4142        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4143$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4144        as_fn_error $? "Cannot continue" "$LINENO" 5
4145    fi
4146
4147
4148
4149    for ac_prog in comm
4150do
4151  # Extract the first word of "$ac_prog", so it can be a program name with args.
4152set dummy $ac_prog; ac_word=$2
4153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4154$as_echo_n "checking for $ac_word... " >&6; }
4155if ${ac_cv_path_COMM+:} false; then :
4156  $as_echo_n "(cached) " >&6
4157else
4158  case $COMM in
4159  [\\/]* | ?:[\\/]*)
4160  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4161  ;;
4162  *)
4163  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4164for as_dir in $PATH
4165do
4166  IFS=$as_save_IFS
4167  test -z "$as_dir" && as_dir=.
4168    for ac_exec_ext in '' $ac_executable_extensions; do
4169  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4170    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4171    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4172    break 2
4173  fi
4174done
4175  done
4176IFS=$as_save_IFS
4177
4178  ;;
4179esac
4180fi
4181COMM=$ac_cv_path_COMM
4182if test -n "$COMM"; then
4183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4184$as_echo "$COMM" >&6; }
4185else
4186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4187$as_echo "no" >&6; }
4188fi
4189
4190
4191  test -n "$COMM" && break
4192done
4193
4194
4195    if test "x$COMM" = x; then
4196        if test "xcomm" = x; then
4197          PROG_NAME=comm
4198        else
4199          PROG_NAME=comm
4200        fi
4201        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4202$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4203        as_fn_error $? "Cannot continue" "$LINENO" 5
4204    fi
4205
4206
4207
4208    for ac_prog in cp
4209do
4210  # Extract the first word of "$ac_prog", so it can be a program name with args.
4211set dummy $ac_prog; ac_word=$2
4212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4213$as_echo_n "checking for $ac_word... " >&6; }
4214if ${ac_cv_path_CP+:} false; then :
4215  $as_echo_n "(cached) " >&6
4216else
4217  case $CP in
4218  [\\/]* | ?:[\\/]*)
4219  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4220  ;;
4221  *)
4222  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4223for as_dir in $PATH
4224do
4225  IFS=$as_save_IFS
4226  test -z "$as_dir" && as_dir=.
4227    for ac_exec_ext in '' $ac_executable_extensions; do
4228  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4229    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4230    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4231    break 2
4232  fi
4233done
4234  done
4235IFS=$as_save_IFS
4236
4237  ;;
4238esac
4239fi
4240CP=$ac_cv_path_CP
4241if test -n "$CP"; then
4242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4243$as_echo "$CP" >&6; }
4244else
4245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4246$as_echo "no" >&6; }
4247fi
4248
4249
4250  test -n "$CP" && break
4251done
4252
4253
4254    if test "x$CP" = x; then
4255        if test "xcp" = x; then
4256          PROG_NAME=cp
4257        else
4258          PROG_NAME=cp
4259        fi
4260        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4261$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4262        as_fn_error $? "Cannot continue" "$LINENO" 5
4263    fi
4264
4265
4266
4267    for ac_prog in cpio
4268do
4269  # Extract the first word of "$ac_prog", so it can be a program name with args.
4270set dummy $ac_prog; ac_word=$2
4271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4272$as_echo_n "checking for $ac_word... " >&6; }
4273if ${ac_cv_path_CPIO+:} false; then :
4274  $as_echo_n "(cached) " >&6
4275else
4276  case $CPIO in
4277  [\\/]* | ?:[\\/]*)
4278  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4279  ;;
4280  *)
4281  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4282for as_dir in $PATH
4283do
4284  IFS=$as_save_IFS
4285  test -z "$as_dir" && as_dir=.
4286    for ac_exec_ext in '' $ac_executable_extensions; do
4287  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4288    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4289    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4290    break 2
4291  fi
4292done
4293  done
4294IFS=$as_save_IFS
4295
4296  ;;
4297esac
4298fi
4299CPIO=$ac_cv_path_CPIO
4300if test -n "$CPIO"; then
4301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4302$as_echo "$CPIO" >&6; }
4303else
4304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4305$as_echo "no" >&6; }
4306fi
4307
4308
4309  test -n "$CPIO" && break
4310done
4311
4312
4313    if test "x$CPIO" = x; then
4314        if test "xcpio" = x; then
4315          PROG_NAME=cpio
4316        else
4317          PROG_NAME=cpio
4318        fi
4319        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4320$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4321        as_fn_error $? "Cannot continue" "$LINENO" 5
4322    fi
4323
4324
4325
4326    for ac_prog in cut
4327do
4328  # Extract the first word of "$ac_prog", so it can be a program name with args.
4329set dummy $ac_prog; ac_word=$2
4330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4331$as_echo_n "checking for $ac_word... " >&6; }
4332if ${ac_cv_path_CUT+:} false; then :
4333  $as_echo_n "(cached) " >&6
4334else
4335  case $CUT in
4336  [\\/]* | ?:[\\/]*)
4337  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4338  ;;
4339  *)
4340  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4341for as_dir in $PATH
4342do
4343  IFS=$as_save_IFS
4344  test -z "$as_dir" && as_dir=.
4345    for ac_exec_ext in '' $ac_executable_extensions; do
4346  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4347    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4348    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4349    break 2
4350  fi
4351done
4352  done
4353IFS=$as_save_IFS
4354
4355  ;;
4356esac
4357fi
4358CUT=$ac_cv_path_CUT
4359if test -n "$CUT"; then
4360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4361$as_echo "$CUT" >&6; }
4362else
4363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4364$as_echo "no" >&6; }
4365fi
4366
4367
4368  test -n "$CUT" && break
4369done
4370
4371
4372    if test "x$CUT" = x; then
4373        if test "xcut" = x; then
4374          PROG_NAME=cut
4375        else
4376          PROG_NAME=cut
4377        fi
4378        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4379$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4380        as_fn_error $? "Cannot continue" "$LINENO" 5
4381    fi
4382
4383
4384
4385    for ac_prog in date
4386do
4387  # Extract the first word of "$ac_prog", so it can be a program name with args.
4388set dummy $ac_prog; ac_word=$2
4389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4390$as_echo_n "checking for $ac_word... " >&6; }
4391if ${ac_cv_path_DATE+:} false; then :
4392  $as_echo_n "(cached) " >&6
4393else
4394  case $DATE in
4395  [\\/]* | ?:[\\/]*)
4396  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4397  ;;
4398  *)
4399  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4400for as_dir in $PATH
4401do
4402  IFS=$as_save_IFS
4403  test -z "$as_dir" && as_dir=.
4404    for ac_exec_ext in '' $ac_executable_extensions; do
4405  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4406    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4407    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4408    break 2
4409  fi
4410done
4411  done
4412IFS=$as_save_IFS
4413
4414  ;;
4415esac
4416fi
4417DATE=$ac_cv_path_DATE
4418if test -n "$DATE"; then
4419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4420$as_echo "$DATE" >&6; }
4421else
4422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4423$as_echo "no" >&6; }
4424fi
4425
4426
4427  test -n "$DATE" && break
4428done
4429
4430
4431    if test "x$DATE" = x; then
4432        if test "xdate" = x; then
4433          PROG_NAME=date
4434        else
4435          PROG_NAME=date
4436        fi
4437        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4438$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4439        as_fn_error $? "Cannot continue" "$LINENO" 5
4440    fi
4441
4442
4443
4444    for ac_prog in gdiff diff
4445do
4446  # Extract the first word of "$ac_prog", so it can be a program name with args.
4447set dummy $ac_prog; ac_word=$2
4448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4449$as_echo_n "checking for $ac_word... " >&6; }
4450if ${ac_cv_path_DIFF+:} false; then :
4451  $as_echo_n "(cached) " >&6
4452else
4453  case $DIFF in
4454  [\\/]* | ?:[\\/]*)
4455  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4456  ;;
4457  *)
4458  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4459for as_dir in $PATH
4460do
4461  IFS=$as_save_IFS
4462  test -z "$as_dir" && as_dir=.
4463    for ac_exec_ext in '' $ac_executable_extensions; do
4464  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4465    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4467    break 2
4468  fi
4469done
4470  done
4471IFS=$as_save_IFS
4472
4473  ;;
4474esac
4475fi
4476DIFF=$ac_cv_path_DIFF
4477if test -n "$DIFF"; then
4478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4479$as_echo "$DIFF" >&6; }
4480else
4481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4482$as_echo "no" >&6; }
4483fi
4484
4485
4486  test -n "$DIFF" && break
4487done
4488
4489
4490    if test "x$DIFF" = x; then
4491        if test "xgdiff diff" = x; then
4492          PROG_NAME=diff
4493        else
4494          PROG_NAME=gdiff diff
4495        fi
4496        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4497$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4498        as_fn_error $? "Cannot continue" "$LINENO" 5
4499    fi
4500
4501
4502
4503    for ac_prog in dirname
4504do
4505  # Extract the first word of "$ac_prog", so it can be a program name with args.
4506set dummy $ac_prog; ac_word=$2
4507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4508$as_echo_n "checking for $ac_word... " >&6; }
4509if ${ac_cv_path_DIRNAME+:} false; then :
4510  $as_echo_n "(cached) " >&6
4511else
4512  case $DIRNAME in
4513  [\\/]* | ?:[\\/]*)
4514  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4515  ;;
4516  *)
4517  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4518for as_dir in $PATH
4519do
4520  IFS=$as_save_IFS
4521  test -z "$as_dir" && as_dir=.
4522    for ac_exec_ext in '' $ac_executable_extensions; do
4523  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4524    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4525    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4526    break 2
4527  fi
4528done
4529  done
4530IFS=$as_save_IFS
4531
4532  ;;
4533esac
4534fi
4535DIRNAME=$ac_cv_path_DIRNAME
4536if test -n "$DIRNAME"; then
4537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4538$as_echo "$DIRNAME" >&6; }
4539else
4540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4541$as_echo "no" >&6; }
4542fi
4543
4544
4545  test -n "$DIRNAME" && break
4546done
4547
4548
4549    if test "x$DIRNAME" = x; then
4550        if test "xdirname" = x; then
4551          PROG_NAME=dirname
4552        else
4553          PROG_NAME=dirname
4554        fi
4555        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4556$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4557        as_fn_error $? "Cannot continue" "$LINENO" 5
4558    fi
4559
4560
4561
4562    for ac_prog in echo
4563do
4564  # Extract the first word of "$ac_prog", so it can be a program name with args.
4565set dummy $ac_prog; ac_word=$2
4566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4567$as_echo_n "checking for $ac_word... " >&6; }
4568if ${ac_cv_path_ECHO+:} false; then :
4569  $as_echo_n "(cached) " >&6
4570else
4571  case $ECHO in
4572  [\\/]* | ?:[\\/]*)
4573  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4574  ;;
4575  *)
4576  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4577for as_dir in $PATH
4578do
4579  IFS=$as_save_IFS
4580  test -z "$as_dir" && as_dir=.
4581    for ac_exec_ext in '' $ac_executable_extensions; do
4582  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4583    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4584    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4585    break 2
4586  fi
4587done
4588  done
4589IFS=$as_save_IFS
4590
4591  ;;
4592esac
4593fi
4594ECHO=$ac_cv_path_ECHO
4595if test -n "$ECHO"; then
4596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4597$as_echo "$ECHO" >&6; }
4598else
4599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4600$as_echo "no" >&6; }
4601fi
4602
4603
4604  test -n "$ECHO" && break
4605done
4606
4607
4608    if test "x$ECHO" = x; then
4609        if test "xecho" = x; then
4610          PROG_NAME=echo
4611        else
4612          PROG_NAME=echo
4613        fi
4614        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4615$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4616        as_fn_error $? "Cannot continue" "$LINENO" 5
4617    fi
4618
4619
4620
4621    for ac_prog in expr
4622do
4623  # Extract the first word of "$ac_prog", so it can be a program name with args.
4624set dummy $ac_prog; ac_word=$2
4625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4626$as_echo_n "checking for $ac_word... " >&6; }
4627if ${ac_cv_path_EXPR+:} false; then :
4628  $as_echo_n "(cached) " >&6
4629else
4630  case $EXPR in
4631  [\\/]* | ?:[\\/]*)
4632  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4633  ;;
4634  *)
4635  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4636for as_dir in $PATH
4637do
4638  IFS=$as_save_IFS
4639  test -z "$as_dir" && as_dir=.
4640    for ac_exec_ext in '' $ac_executable_extensions; do
4641  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4642    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4643    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4644    break 2
4645  fi
4646done
4647  done
4648IFS=$as_save_IFS
4649
4650  ;;
4651esac
4652fi
4653EXPR=$ac_cv_path_EXPR
4654if test -n "$EXPR"; then
4655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4656$as_echo "$EXPR" >&6; }
4657else
4658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4659$as_echo "no" >&6; }
4660fi
4661
4662
4663  test -n "$EXPR" && break
4664done
4665
4666
4667    if test "x$EXPR" = x; then
4668        if test "xexpr" = x; then
4669          PROG_NAME=expr
4670        else
4671          PROG_NAME=expr
4672        fi
4673        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4674$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4675        as_fn_error $? "Cannot continue" "$LINENO" 5
4676    fi
4677
4678
4679
4680    for ac_prog in file
4681do
4682  # Extract the first word of "$ac_prog", so it can be a program name with args.
4683set dummy $ac_prog; ac_word=$2
4684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4685$as_echo_n "checking for $ac_word... " >&6; }
4686if ${ac_cv_path_FILE+:} false; then :
4687  $as_echo_n "(cached) " >&6
4688else
4689  case $FILE in
4690  [\\/]* | ?:[\\/]*)
4691  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4692  ;;
4693  *)
4694  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4695for as_dir in $PATH
4696do
4697  IFS=$as_save_IFS
4698  test -z "$as_dir" && as_dir=.
4699    for ac_exec_ext in '' $ac_executable_extensions; do
4700  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4701    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4702    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4703    break 2
4704  fi
4705done
4706  done
4707IFS=$as_save_IFS
4708
4709  ;;
4710esac
4711fi
4712FILE=$ac_cv_path_FILE
4713if test -n "$FILE"; then
4714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4715$as_echo "$FILE" >&6; }
4716else
4717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4718$as_echo "no" >&6; }
4719fi
4720
4721
4722  test -n "$FILE" && break
4723done
4724
4725
4726    if test "x$FILE" = x; then
4727        if test "xfile" = x; then
4728          PROG_NAME=file
4729        else
4730          PROG_NAME=file
4731        fi
4732        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4733$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4734        as_fn_error $? "Cannot continue" "$LINENO" 5
4735    fi
4736
4737
4738
4739    for ac_prog in find
4740do
4741  # Extract the first word of "$ac_prog", so it can be a program name with args.
4742set dummy $ac_prog; ac_word=$2
4743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4744$as_echo_n "checking for $ac_word... " >&6; }
4745if ${ac_cv_path_FIND+:} false; then :
4746  $as_echo_n "(cached) " >&6
4747else
4748  case $FIND in
4749  [\\/]* | ?:[\\/]*)
4750  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4751  ;;
4752  *)
4753  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4754for as_dir in $PATH
4755do
4756  IFS=$as_save_IFS
4757  test -z "$as_dir" && as_dir=.
4758    for ac_exec_ext in '' $ac_executable_extensions; do
4759  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4760    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4761    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4762    break 2
4763  fi
4764done
4765  done
4766IFS=$as_save_IFS
4767
4768  ;;
4769esac
4770fi
4771FIND=$ac_cv_path_FIND
4772if test -n "$FIND"; then
4773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4774$as_echo "$FIND" >&6; }
4775else
4776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4777$as_echo "no" >&6; }
4778fi
4779
4780
4781  test -n "$FIND" && break
4782done
4783
4784
4785    if test "x$FIND" = x; then
4786        if test "xfind" = x; then
4787          PROG_NAME=find
4788        else
4789          PROG_NAME=find
4790        fi
4791        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4792$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4793        as_fn_error $? "Cannot continue" "$LINENO" 5
4794    fi
4795
4796
4797
4798    for ac_prog in head
4799do
4800  # Extract the first word of "$ac_prog", so it can be a program name with args.
4801set dummy $ac_prog; ac_word=$2
4802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4803$as_echo_n "checking for $ac_word... " >&6; }
4804if ${ac_cv_path_HEAD+:} false; then :
4805  $as_echo_n "(cached) " >&6
4806else
4807  case $HEAD in
4808  [\\/]* | ?:[\\/]*)
4809  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4810  ;;
4811  *)
4812  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4813for as_dir in $PATH
4814do
4815  IFS=$as_save_IFS
4816  test -z "$as_dir" && as_dir=.
4817    for ac_exec_ext in '' $ac_executable_extensions; do
4818  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4819    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4820    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4821    break 2
4822  fi
4823done
4824  done
4825IFS=$as_save_IFS
4826
4827  ;;
4828esac
4829fi
4830HEAD=$ac_cv_path_HEAD
4831if test -n "$HEAD"; then
4832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4833$as_echo "$HEAD" >&6; }
4834else
4835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4836$as_echo "no" >&6; }
4837fi
4838
4839
4840  test -n "$HEAD" && break
4841done
4842
4843
4844    if test "x$HEAD" = x; then
4845        if test "xhead" = x; then
4846          PROG_NAME=head
4847        else
4848          PROG_NAME=head
4849        fi
4850        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4851$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4852        as_fn_error $? "Cannot continue" "$LINENO" 5
4853    fi
4854
4855
4856
4857    for ac_prog in ln
4858do
4859  # Extract the first word of "$ac_prog", so it can be a program name with args.
4860set dummy $ac_prog; ac_word=$2
4861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4862$as_echo_n "checking for $ac_word... " >&6; }
4863if ${ac_cv_path_LN+:} false; then :
4864  $as_echo_n "(cached) " >&6
4865else
4866  case $LN in
4867  [\\/]* | ?:[\\/]*)
4868  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4869  ;;
4870  *)
4871  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4872for as_dir in $PATH
4873do
4874  IFS=$as_save_IFS
4875  test -z "$as_dir" && as_dir=.
4876    for ac_exec_ext in '' $ac_executable_extensions; do
4877  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4878    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4879    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4880    break 2
4881  fi
4882done
4883  done
4884IFS=$as_save_IFS
4885
4886  ;;
4887esac
4888fi
4889LN=$ac_cv_path_LN
4890if test -n "$LN"; then
4891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4892$as_echo "$LN" >&6; }
4893else
4894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4895$as_echo "no" >&6; }
4896fi
4897
4898
4899  test -n "$LN" && break
4900done
4901
4902
4903    if test "x$LN" = x; then
4904        if test "xln" = x; then
4905          PROG_NAME=ln
4906        else
4907          PROG_NAME=ln
4908        fi
4909        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4910$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4911        as_fn_error $? "Cannot continue" "$LINENO" 5
4912    fi
4913
4914
4915
4916    for ac_prog in ls
4917do
4918  # Extract the first word of "$ac_prog", so it can be a program name with args.
4919set dummy $ac_prog; ac_word=$2
4920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4921$as_echo_n "checking for $ac_word... " >&6; }
4922if ${ac_cv_path_LS+:} false; then :
4923  $as_echo_n "(cached) " >&6
4924else
4925  case $LS in
4926  [\\/]* | ?:[\\/]*)
4927  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4928  ;;
4929  *)
4930  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4931for as_dir in $PATH
4932do
4933  IFS=$as_save_IFS
4934  test -z "$as_dir" && as_dir=.
4935    for ac_exec_ext in '' $ac_executable_extensions; do
4936  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4937    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4938    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4939    break 2
4940  fi
4941done
4942  done
4943IFS=$as_save_IFS
4944
4945  ;;
4946esac
4947fi
4948LS=$ac_cv_path_LS
4949if test -n "$LS"; then
4950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4951$as_echo "$LS" >&6; }
4952else
4953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4954$as_echo "no" >&6; }
4955fi
4956
4957
4958  test -n "$LS" && break
4959done
4960
4961
4962    if test "x$LS" = x; then
4963        if test "xls" = x; then
4964          PROG_NAME=ls
4965        else
4966          PROG_NAME=ls
4967        fi
4968        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4969$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4970        as_fn_error $? "Cannot continue" "$LINENO" 5
4971    fi
4972
4973
4974
4975    for ac_prog in mkdir
4976do
4977  # Extract the first word of "$ac_prog", so it can be a program name with args.
4978set dummy $ac_prog; ac_word=$2
4979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4980$as_echo_n "checking for $ac_word... " >&6; }
4981if ${ac_cv_path_MKDIR+:} false; then :
4982  $as_echo_n "(cached) " >&6
4983else
4984  case $MKDIR in
4985  [\\/]* | ?:[\\/]*)
4986  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4987  ;;
4988  *)
4989  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4990for as_dir in $PATH
4991do
4992  IFS=$as_save_IFS
4993  test -z "$as_dir" && as_dir=.
4994    for ac_exec_ext in '' $ac_executable_extensions; do
4995  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4996    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4997    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4998    break 2
4999  fi
5000done
5001  done
5002IFS=$as_save_IFS
5003
5004  ;;
5005esac
5006fi
5007MKDIR=$ac_cv_path_MKDIR
5008if test -n "$MKDIR"; then
5009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
5010$as_echo "$MKDIR" >&6; }
5011else
5012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5013$as_echo "no" >&6; }
5014fi
5015
5016
5017  test -n "$MKDIR" && break
5018done
5019
5020
5021    if test "x$MKDIR" = x; then
5022        if test "xmkdir" = x; then
5023          PROG_NAME=mkdir
5024        else
5025          PROG_NAME=mkdir
5026        fi
5027        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5028$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5029        as_fn_error $? "Cannot continue" "$LINENO" 5
5030    fi
5031
5032
5033
5034    for ac_prog in mktemp
5035do
5036  # Extract the first word of "$ac_prog", so it can be a program name with args.
5037set dummy $ac_prog; ac_word=$2
5038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5039$as_echo_n "checking for $ac_word... " >&6; }
5040if ${ac_cv_path_MKTEMP+:} false; then :
5041  $as_echo_n "(cached) " >&6
5042else
5043  case $MKTEMP in
5044  [\\/]* | ?:[\\/]*)
5045  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
5046  ;;
5047  *)
5048  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5049for as_dir in $PATH
5050do
5051  IFS=$as_save_IFS
5052  test -z "$as_dir" && as_dir=.
5053    for ac_exec_ext in '' $ac_executable_extensions; do
5054  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5055    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
5056    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5057    break 2
5058  fi
5059done
5060  done
5061IFS=$as_save_IFS
5062
5063  ;;
5064esac
5065fi
5066MKTEMP=$ac_cv_path_MKTEMP
5067if test -n "$MKTEMP"; then
5068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
5069$as_echo "$MKTEMP" >&6; }
5070else
5071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5072$as_echo "no" >&6; }
5073fi
5074
5075
5076  test -n "$MKTEMP" && break
5077done
5078
5079
5080    if test "x$MKTEMP" = x; then
5081        if test "xmktemp" = x; then
5082          PROG_NAME=mktemp
5083        else
5084          PROG_NAME=mktemp
5085        fi
5086        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5087$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5088        as_fn_error $? "Cannot continue" "$LINENO" 5
5089    fi
5090
5091
5092
5093    for ac_prog in mv
5094do
5095  # Extract the first word of "$ac_prog", so it can be a program name with args.
5096set dummy $ac_prog; ac_word=$2
5097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5098$as_echo_n "checking for $ac_word... " >&6; }
5099if ${ac_cv_path_MV+:} false; then :
5100  $as_echo_n "(cached) " >&6
5101else
5102  case $MV in
5103  [\\/]* | ?:[\\/]*)
5104  ac_cv_path_MV="$MV" # Let the user override the test with a path.
5105  ;;
5106  *)
5107  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5108for as_dir in $PATH
5109do
5110  IFS=$as_save_IFS
5111  test -z "$as_dir" && as_dir=.
5112    for ac_exec_ext in '' $ac_executable_extensions; do
5113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5114    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5116    break 2
5117  fi
5118done
5119  done
5120IFS=$as_save_IFS
5121
5122  ;;
5123esac
5124fi
5125MV=$ac_cv_path_MV
5126if test -n "$MV"; then
5127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5128$as_echo "$MV" >&6; }
5129else
5130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5131$as_echo "no" >&6; }
5132fi
5133
5134
5135  test -n "$MV" && break
5136done
5137
5138
5139    if test "x$MV" = x; then
5140        if test "xmv" = x; then
5141          PROG_NAME=mv
5142        else
5143          PROG_NAME=mv
5144        fi
5145        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5146$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5147        as_fn_error $? "Cannot continue" "$LINENO" 5
5148    fi
5149
5150
5151
5152    for ac_prog in printf
5153do
5154  # Extract the first word of "$ac_prog", so it can be a program name with args.
5155set dummy $ac_prog; ac_word=$2
5156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5157$as_echo_n "checking for $ac_word... " >&6; }
5158if ${ac_cv_path_PRINTF+:} false; then :
5159  $as_echo_n "(cached) " >&6
5160else
5161  case $PRINTF in
5162  [\\/]* | ?:[\\/]*)
5163  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5164  ;;
5165  *)
5166  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5167for as_dir in $PATH
5168do
5169  IFS=$as_save_IFS
5170  test -z "$as_dir" && as_dir=.
5171    for ac_exec_ext in '' $ac_executable_extensions; do
5172  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5173    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5174    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5175    break 2
5176  fi
5177done
5178  done
5179IFS=$as_save_IFS
5180
5181  ;;
5182esac
5183fi
5184PRINTF=$ac_cv_path_PRINTF
5185if test -n "$PRINTF"; then
5186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5187$as_echo "$PRINTF" >&6; }
5188else
5189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5190$as_echo "no" >&6; }
5191fi
5192
5193
5194  test -n "$PRINTF" && break
5195done
5196
5197
5198    if test "x$PRINTF" = x; then
5199        if test "xprintf" = x; then
5200          PROG_NAME=printf
5201        else
5202          PROG_NAME=printf
5203        fi
5204        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5205$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5206        as_fn_error $? "Cannot continue" "$LINENO" 5
5207    fi
5208
5209
5210
5211    for ac_prog in rm
5212do
5213  # Extract the first word of "$ac_prog", so it can be a program name with args.
5214set dummy $ac_prog; ac_word=$2
5215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5216$as_echo_n "checking for $ac_word... " >&6; }
5217if ${ac_cv_path_RM+:} false; then :
5218  $as_echo_n "(cached) " >&6
5219else
5220  case $RM in
5221  [\\/]* | ?:[\\/]*)
5222  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5223  ;;
5224  *)
5225  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5226for as_dir in $PATH
5227do
5228  IFS=$as_save_IFS
5229  test -z "$as_dir" && as_dir=.
5230    for ac_exec_ext in '' $ac_executable_extensions; do
5231  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5232    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5234    break 2
5235  fi
5236done
5237  done
5238IFS=$as_save_IFS
5239
5240  ;;
5241esac
5242fi
5243RM=$ac_cv_path_RM
5244if test -n "$RM"; then
5245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5246$as_echo "$RM" >&6; }
5247else
5248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5249$as_echo "no" >&6; }
5250fi
5251
5252
5253  test -n "$RM" && break
5254done
5255
5256
5257    if test "x$RM" = x; then
5258        if test "xrm" = x; then
5259          PROG_NAME=rm
5260        else
5261          PROG_NAME=rm
5262        fi
5263        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5264$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5265        as_fn_error $? "Cannot continue" "$LINENO" 5
5266    fi
5267
5268
5269
5270    for ac_prog in sh
5271do
5272  # Extract the first word of "$ac_prog", so it can be a program name with args.
5273set dummy $ac_prog; ac_word=$2
5274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5275$as_echo_n "checking for $ac_word... " >&6; }
5276if ${ac_cv_path_SH+:} false; then :
5277  $as_echo_n "(cached) " >&6
5278else
5279  case $SH in
5280  [\\/]* | ?:[\\/]*)
5281  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5282  ;;
5283  *)
5284  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5285for as_dir in $PATH
5286do
5287  IFS=$as_save_IFS
5288  test -z "$as_dir" && as_dir=.
5289    for ac_exec_ext in '' $ac_executable_extensions; do
5290  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5291    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5292    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5293    break 2
5294  fi
5295done
5296  done
5297IFS=$as_save_IFS
5298
5299  ;;
5300esac
5301fi
5302SH=$ac_cv_path_SH
5303if test -n "$SH"; then
5304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5305$as_echo "$SH" >&6; }
5306else
5307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5308$as_echo "no" >&6; }
5309fi
5310
5311
5312  test -n "$SH" && break
5313done
5314
5315
5316    if test "x$SH" = x; then
5317        if test "xsh" = x; then
5318          PROG_NAME=sh
5319        else
5320          PROG_NAME=sh
5321        fi
5322        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5323$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5324        as_fn_error $? "Cannot continue" "$LINENO" 5
5325    fi
5326
5327
5328
5329    for ac_prog in sort
5330do
5331  # Extract the first word of "$ac_prog", so it can be a program name with args.
5332set dummy $ac_prog; ac_word=$2
5333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5334$as_echo_n "checking for $ac_word... " >&6; }
5335if ${ac_cv_path_SORT+:} false; then :
5336  $as_echo_n "(cached) " >&6
5337else
5338  case $SORT in
5339  [\\/]* | ?:[\\/]*)
5340  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5341  ;;
5342  *)
5343  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5344for as_dir in $PATH
5345do
5346  IFS=$as_save_IFS
5347  test -z "$as_dir" && as_dir=.
5348    for ac_exec_ext in '' $ac_executable_extensions; do
5349  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5350    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5351    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5352    break 2
5353  fi
5354done
5355  done
5356IFS=$as_save_IFS
5357
5358  ;;
5359esac
5360fi
5361SORT=$ac_cv_path_SORT
5362if test -n "$SORT"; then
5363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5364$as_echo "$SORT" >&6; }
5365else
5366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5367$as_echo "no" >&6; }
5368fi
5369
5370
5371  test -n "$SORT" && break
5372done
5373
5374
5375    if test "x$SORT" = x; then
5376        if test "xsort" = x; then
5377          PROG_NAME=sort
5378        else
5379          PROG_NAME=sort
5380        fi
5381        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5382$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5383        as_fn_error $? "Cannot continue" "$LINENO" 5
5384    fi
5385
5386
5387
5388    for ac_prog in tail
5389do
5390  # Extract the first word of "$ac_prog", so it can be a program name with args.
5391set dummy $ac_prog; ac_word=$2
5392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5393$as_echo_n "checking for $ac_word... " >&6; }
5394if ${ac_cv_path_TAIL+:} false; then :
5395  $as_echo_n "(cached) " >&6
5396else
5397  case $TAIL in
5398  [\\/]* | ?:[\\/]*)
5399  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5400  ;;
5401  *)
5402  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5403for as_dir in $PATH
5404do
5405  IFS=$as_save_IFS
5406  test -z "$as_dir" && as_dir=.
5407    for ac_exec_ext in '' $ac_executable_extensions; do
5408  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5409    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5411    break 2
5412  fi
5413done
5414  done
5415IFS=$as_save_IFS
5416
5417  ;;
5418esac
5419fi
5420TAIL=$ac_cv_path_TAIL
5421if test -n "$TAIL"; then
5422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5423$as_echo "$TAIL" >&6; }
5424else
5425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5426$as_echo "no" >&6; }
5427fi
5428
5429
5430  test -n "$TAIL" && break
5431done
5432
5433
5434    if test "x$TAIL" = x; then
5435        if test "xtail" = x; then
5436          PROG_NAME=tail
5437        else
5438          PROG_NAME=tail
5439        fi
5440        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5441$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5442        as_fn_error $? "Cannot continue" "$LINENO" 5
5443    fi
5444
5445
5446
5447    for ac_prog in tar
5448do
5449  # Extract the first word of "$ac_prog", so it can be a program name with args.
5450set dummy $ac_prog; ac_word=$2
5451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5452$as_echo_n "checking for $ac_word... " >&6; }
5453if ${ac_cv_path_TAR+:} false; then :
5454  $as_echo_n "(cached) " >&6
5455else
5456  case $TAR in
5457  [\\/]* | ?:[\\/]*)
5458  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5459  ;;
5460  *)
5461  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5462for as_dir in $PATH
5463do
5464  IFS=$as_save_IFS
5465  test -z "$as_dir" && as_dir=.
5466    for ac_exec_ext in '' $ac_executable_extensions; do
5467  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5468    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5469    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5470    break 2
5471  fi
5472done
5473  done
5474IFS=$as_save_IFS
5475
5476  ;;
5477esac
5478fi
5479TAR=$ac_cv_path_TAR
5480if test -n "$TAR"; then
5481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5482$as_echo "$TAR" >&6; }
5483else
5484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5485$as_echo "no" >&6; }
5486fi
5487
5488
5489  test -n "$TAR" && break
5490done
5491
5492
5493    if test "x$TAR" = x; then
5494        if test "xtar" = x; then
5495          PROG_NAME=tar
5496        else
5497          PROG_NAME=tar
5498        fi
5499        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5500$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5501        as_fn_error $? "Cannot continue" "$LINENO" 5
5502    fi
5503
5504
5505
5506    for ac_prog in tee
5507do
5508  # Extract the first word of "$ac_prog", so it can be a program name with args.
5509set dummy $ac_prog; ac_word=$2
5510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5511$as_echo_n "checking for $ac_word... " >&6; }
5512if ${ac_cv_path_TEE+:} false; then :
5513  $as_echo_n "(cached) " >&6
5514else
5515  case $TEE in
5516  [\\/]* | ?:[\\/]*)
5517  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5518  ;;
5519  *)
5520  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5521for as_dir in $PATH
5522do
5523  IFS=$as_save_IFS
5524  test -z "$as_dir" && as_dir=.
5525    for ac_exec_ext in '' $ac_executable_extensions; do
5526  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5527    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5528    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5529    break 2
5530  fi
5531done
5532  done
5533IFS=$as_save_IFS
5534
5535  ;;
5536esac
5537fi
5538TEE=$ac_cv_path_TEE
5539if test -n "$TEE"; then
5540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5541$as_echo "$TEE" >&6; }
5542else
5543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5544$as_echo "no" >&6; }
5545fi
5546
5547
5548  test -n "$TEE" && break
5549done
5550
5551
5552    if test "x$TEE" = x; then
5553        if test "xtee" = x; then
5554          PROG_NAME=tee
5555        else
5556          PROG_NAME=tee
5557        fi
5558        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5559$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5560        as_fn_error $? "Cannot continue" "$LINENO" 5
5561    fi
5562
5563
5564
5565    for ac_prog in touch
5566do
5567  # Extract the first word of "$ac_prog", so it can be a program name with args.
5568set dummy $ac_prog; ac_word=$2
5569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5570$as_echo_n "checking for $ac_word... " >&6; }
5571if ${ac_cv_path_TOUCH+:} false; then :
5572  $as_echo_n "(cached) " >&6
5573else
5574  case $TOUCH in
5575  [\\/]* | ?:[\\/]*)
5576  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5577  ;;
5578  *)
5579  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5580for as_dir in $PATH
5581do
5582  IFS=$as_save_IFS
5583  test -z "$as_dir" && as_dir=.
5584    for ac_exec_ext in '' $ac_executable_extensions; do
5585  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5586    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5587    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5588    break 2
5589  fi
5590done
5591  done
5592IFS=$as_save_IFS
5593
5594  ;;
5595esac
5596fi
5597TOUCH=$ac_cv_path_TOUCH
5598if test -n "$TOUCH"; then
5599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5600$as_echo "$TOUCH" >&6; }
5601else
5602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5603$as_echo "no" >&6; }
5604fi
5605
5606
5607  test -n "$TOUCH" && break
5608done
5609
5610
5611    if test "x$TOUCH" = x; then
5612        if test "xtouch" = x; then
5613          PROG_NAME=touch
5614        else
5615          PROG_NAME=touch
5616        fi
5617        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5618$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5619        as_fn_error $? "Cannot continue" "$LINENO" 5
5620    fi
5621
5622
5623
5624    for ac_prog in tr
5625do
5626  # Extract the first word of "$ac_prog", so it can be a program name with args.
5627set dummy $ac_prog; ac_word=$2
5628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5629$as_echo_n "checking for $ac_word... " >&6; }
5630if ${ac_cv_path_TR+:} false; then :
5631  $as_echo_n "(cached) " >&6
5632else
5633  case $TR in
5634  [\\/]* | ?:[\\/]*)
5635  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5636  ;;
5637  *)
5638  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5639for as_dir in $PATH
5640do
5641  IFS=$as_save_IFS
5642  test -z "$as_dir" && as_dir=.
5643    for ac_exec_ext in '' $ac_executable_extensions; do
5644  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5645    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5646    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5647    break 2
5648  fi
5649done
5650  done
5651IFS=$as_save_IFS
5652
5653  ;;
5654esac
5655fi
5656TR=$ac_cv_path_TR
5657if test -n "$TR"; then
5658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5659$as_echo "$TR" >&6; }
5660else
5661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5662$as_echo "no" >&6; }
5663fi
5664
5665
5666  test -n "$TR" && break
5667done
5668
5669
5670    if test "x$TR" = x; then
5671        if test "xtr" = x; then
5672          PROG_NAME=tr
5673        else
5674          PROG_NAME=tr
5675        fi
5676        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5677$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5678        as_fn_error $? "Cannot continue" "$LINENO" 5
5679    fi
5680
5681
5682
5683    for ac_prog in uname
5684do
5685  # Extract the first word of "$ac_prog", so it can be a program name with args.
5686set dummy $ac_prog; ac_word=$2
5687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5688$as_echo_n "checking for $ac_word... " >&6; }
5689if ${ac_cv_path_UNAME+:} false; then :
5690  $as_echo_n "(cached) " >&6
5691else
5692  case $UNAME in
5693  [\\/]* | ?:[\\/]*)
5694  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5695  ;;
5696  *)
5697  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5698for as_dir in $PATH
5699do
5700  IFS=$as_save_IFS
5701  test -z "$as_dir" && as_dir=.
5702    for ac_exec_ext in '' $ac_executable_extensions; do
5703  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5704    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5705    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5706    break 2
5707  fi
5708done
5709  done
5710IFS=$as_save_IFS
5711
5712  ;;
5713esac
5714fi
5715UNAME=$ac_cv_path_UNAME
5716if test -n "$UNAME"; then
5717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5718$as_echo "$UNAME" >&6; }
5719else
5720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5721$as_echo "no" >&6; }
5722fi
5723
5724
5725  test -n "$UNAME" && break
5726done
5727
5728
5729    if test "x$UNAME" = x; then
5730        if test "xuname" = x; then
5731          PROG_NAME=uname
5732        else
5733          PROG_NAME=uname
5734        fi
5735        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5736$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5737        as_fn_error $? "Cannot continue" "$LINENO" 5
5738    fi
5739
5740
5741
5742    for ac_prog in uniq
5743do
5744  # Extract the first word of "$ac_prog", so it can be a program name with args.
5745set dummy $ac_prog; ac_word=$2
5746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5747$as_echo_n "checking for $ac_word... " >&6; }
5748if ${ac_cv_path_UNIQ+:} false; then :
5749  $as_echo_n "(cached) " >&6
5750else
5751  case $UNIQ in
5752  [\\/]* | ?:[\\/]*)
5753  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5754  ;;
5755  *)
5756  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5757for as_dir in $PATH
5758do
5759  IFS=$as_save_IFS
5760  test -z "$as_dir" && as_dir=.
5761    for ac_exec_ext in '' $ac_executable_extensions; do
5762  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5763    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5764    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5765    break 2
5766  fi
5767done
5768  done
5769IFS=$as_save_IFS
5770
5771  ;;
5772esac
5773fi
5774UNIQ=$ac_cv_path_UNIQ
5775if test -n "$UNIQ"; then
5776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5777$as_echo "$UNIQ" >&6; }
5778else
5779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5780$as_echo "no" >&6; }
5781fi
5782
5783
5784  test -n "$UNIQ" && break
5785done
5786
5787
5788    if test "x$UNIQ" = x; then
5789        if test "xuniq" = x; then
5790          PROG_NAME=uniq
5791        else
5792          PROG_NAME=uniq
5793        fi
5794        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5795$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5796        as_fn_error $? "Cannot continue" "$LINENO" 5
5797    fi
5798
5799
5800
5801    for ac_prog in wc
5802do
5803  # Extract the first word of "$ac_prog", so it can be a program name with args.
5804set dummy $ac_prog; ac_word=$2
5805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5806$as_echo_n "checking for $ac_word... " >&6; }
5807if ${ac_cv_path_WC+:} false; then :
5808  $as_echo_n "(cached) " >&6
5809else
5810  case $WC in
5811  [\\/]* | ?:[\\/]*)
5812  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5813  ;;
5814  *)
5815  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5816for as_dir in $PATH
5817do
5818  IFS=$as_save_IFS
5819  test -z "$as_dir" && as_dir=.
5820    for ac_exec_ext in '' $ac_executable_extensions; do
5821  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5822    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5823    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5824    break 2
5825  fi
5826done
5827  done
5828IFS=$as_save_IFS
5829
5830  ;;
5831esac
5832fi
5833WC=$ac_cv_path_WC
5834if test -n "$WC"; then
5835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5836$as_echo "$WC" >&6; }
5837else
5838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5839$as_echo "no" >&6; }
5840fi
5841
5842
5843  test -n "$WC" && break
5844done
5845
5846
5847    if test "x$WC" = x; then
5848        if test "xwc" = x; then
5849          PROG_NAME=wc
5850        else
5851          PROG_NAME=wc
5852        fi
5853        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5854$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5855        as_fn_error $? "Cannot continue" "$LINENO" 5
5856    fi
5857
5858
5859
5860    for ac_prog in which
5861do
5862  # Extract the first word of "$ac_prog", so it can be a program name with args.
5863set dummy $ac_prog; ac_word=$2
5864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5865$as_echo_n "checking for $ac_word... " >&6; }
5866if ${ac_cv_path_WHICH+:} false; then :
5867  $as_echo_n "(cached) " >&6
5868else
5869  case $WHICH in
5870  [\\/]* | ?:[\\/]*)
5871  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5872  ;;
5873  *)
5874  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5875for as_dir in $PATH
5876do
5877  IFS=$as_save_IFS
5878  test -z "$as_dir" && as_dir=.
5879    for ac_exec_ext in '' $ac_executable_extensions; do
5880  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5881    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5882    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5883    break 2
5884  fi
5885done
5886  done
5887IFS=$as_save_IFS
5888
5889  ;;
5890esac
5891fi
5892WHICH=$ac_cv_path_WHICH
5893if test -n "$WHICH"; then
5894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5895$as_echo "$WHICH" >&6; }
5896else
5897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5898$as_echo "no" >&6; }
5899fi
5900
5901
5902  test -n "$WHICH" && break
5903done
5904
5905
5906    if test "x$WHICH" = x; then
5907        if test "xwhich" = x; then
5908          PROG_NAME=which
5909        else
5910          PROG_NAME=which
5911        fi
5912        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5913$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5914        as_fn_error $? "Cannot continue" "$LINENO" 5
5915    fi
5916
5917
5918
5919    for ac_prog in xargs
5920do
5921  # Extract the first word of "$ac_prog", so it can be a program name with args.
5922set dummy $ac_prog; ac_word=$2
5923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5924$as_echo_n "checking for $ac_word... " >&6; }
5925if ${ac_cv_path_XARGS+:} false; then :
5926  $as_echo_n "(cached) " >&6
5927else
5928  case $XARGS in
5929  [\\/]* | ?:[\\/]*)
5930  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5931  ;;
5932  *)
5933  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5934for as_dir in $PATH
5935do
5936  IFS=$as_save_IFS
5937  test -z "$as_dir" && as_dir=.
5938    for ac_exec_ext in '' $ac_executable_extensions; do
5939  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5940    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5941    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5942    break 2
5943  fi
5944done
5945  done
5946IFS=$as_save_IFS
5947
5948  ;;
5949esac
5950fi
5951XARGS=$ac_cv_path_XARGS
5952if test -n "$XARGS"; then
5953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5954$as_echo "$XARGS" >&6; }
5955else
5956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5957$as_echo "no" >&6; }
5958fi
5959
5960
5961  test -n "$XARGS" && break
5962done
5963
5964
5965    if test "x$XARGS" = x; then
5966        if test "xxargs" = x; then
5967          PROG_NAME=xargs
5968        else
5969          PROG_NAME=xargs
5970        fi
5971        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5972$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5973        as_fn_error $? "Cannot continue" "$LINENO" 5
5974    fi
5975
5976
5977
5978# Then required tools that require some special treatment.
5979for ac_prog in gawk mawk nawk awk
5980do
5981  # Extract the first word of "$ac_prog", so it can be a program name with args.
5982set dummy $ac_prog; ac_word=$2
5983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5984$as_echo_n "checking for $ac_word... " >&6; }
5985if ${ac_cv_prog_AWK+:} false; then :
5986  $as_echo_n "(cached) " >&6
5987else
5988  if test -n "$AWK"; then
5989  ac_cv_prog_AWK="$AWK" # Let the user override the test.
5990else
5991as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5992for as_dir in $PATH
5993do
5994  IFS=$as_save_IFS
5995  test -z "$as_dir" && as_dir=.
5996    for ac_exec_ext in '' $ac_executable_extensions; do
5997  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5998    ac_cv_prog_AWK="$ac_prog"
5999    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6000    break 2
6001  fi
6002done
6003  done
6004IFS=$as_save_IFS
6005
6006fi
6007fi
6008AWK=$ac_cv_prog_AWK
6009if test -n "$AWK"; then
6010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6011$as_echo "$AWK" >&6; }
6012else
6013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6014$as_echo "no" >&6; }
6015fi
6016
6017
6018  test -n "$AWK" && break
6019done
6020
6021
6022    if test "x$AWK" = x; then
6023        if test "x" = x; then
6024          PROG_NAME=awk
6025        else
6026          PROG_NAME=
6027        fi
6028        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6029$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6030        as_fn_error $? "Cannot continue" "$LINENO" 5
6031    fi
6032
6033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6034$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6035if ${ac_cv_path_GREP+:} false; then :
6036  $as_echo_n "(cached) " >&6
6037else
6038  if test -z "$GREP"; then
6039  ac_path_GREP_found=false
6040  # Loop through the user's path and test for each of PROGNAME-LIST
6041  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6042for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6043do
6044  IFS=$as_save_IFS
6045  test -z "$as_dir" && as_dir=.
6046    for ac_prog in grep ggrep; do
6047    for ac_exec_ext in '' $ac_executable_extensions; do
6048      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6049      as_fn_executable_p "$ac_path_GREP" || continue
6050# Check for GNU ac_path_GREP and select it if it is found.
6051  # Check for GNU $ac_path_GREP
6052case `"$ac_path_GREP" --version 2>&1` in
6053*GNU*)
6054  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6055*)
6056  ac_count=0
6057  $as_echo_n 0123456789 >"conftest.in"
6058  while :
6059  do
6060    cat "conftest.in" "conftest.in" >"conftest.tmp"
6061    mv "conftest.tmp" "conftest.in"
6062    cp "conftest.in" "conftest.nl"
6063    $as_echo 'GREP' >> "conftest.nl"
6064    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6065    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6066    as_fn_arith $ac_count + 1 && ac_count=$as_val
6067    if test $ac_count -gt ${ac_path_GREP_max-0}; then
6068      # Best one so far, save it but keep looking for a better one
6069      ac_cv_path_GREP="$ac_path_GREP"
6070      ac_path_GREP_max=$ac_count
6071    fi
6072    # 10*(2^10) chars as input seems more than enough
6073    test $ac_count -gt 10 && break
6074  done
6075  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6076esac
6077
6078      $ac_path_GREP_found && break 3
6079    done
6080  done
6081  done
6082IFS=$as_save_IFS
6083  if test -z "$ac_cv_path_GREP"; then
6084    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6085  fi
6086else
6087  ac_cv_path_GREP=$GREP
6088fi
6089
6090fi
6091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6092$as_echo "$ac_cv_path_GREP" >&6; }
6093 GREP="$ac_cv_path_GREP"
6094
6095
6096
6097    if test "x$GREP" = x; then
6098        if test "x" = x; then
6099          PROG_NAME=grep
6100        else
6101          PROG_NAME=
6102        fi
6103        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6104$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6105        as_fn_error $? "Cannot continue" "$LINENO" 5
6106    fi
6107
6108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6109$as_echo_n "checking for egrep... " >&6; }
6110if ${ac_cv_path_EGREP+:} false; then :
6111  $as_echo_n "(cached) " >&6
6112else
6113  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6114   then ac_cv_path_EGREP="$GREP -E"
6115   else
6116     if test -z "$EGREP"; then
6117  ac_path_EGREP_found=false
6118  # Loop through the user's path and test for each of PROGNAME-LIST
6119  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6120for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6121do
6122  IFS=$as_save_IFS
6123  test -z "$as_dir" && as_dir=.
6124    for ac_prog in egrep; do
6125    for ac_exec_ext in '' $ac_executable_extensions; do
6126      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6127      as_fn_executable_p "$ac_path_EGREP" || continue
6128# Check for GNU ac_path_EGREP and select it if it is found.
6129  # Check for GNU $ac_path_EGREP
6130case `"$ac_path_EGREP" --version 2>&1` in
6131*GNU*)
6132  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6133*)
6134  ac_count=0
6135  $as_echo_n 0123456789 >"conftest.in"
6136  while :
6137  do
6138    cat "conftest.in" "conftest.in" >"conftest.tmp"
6139    mv "conftest.tmp" "conftest.in"
6140    cp "conftest.in" "conftest.nl"
6141    $as_echo 'EGREP' >> "conftest.nl"
6142    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6143    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6144    as_fn_arith $ac_count + 1 && ac_count=$as_val
6145    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6146      # Best one so far, save it but keep looking for a better one
6147      ac_cv_path_EGREP="$ac_path_EGREP"
6148      ac_path_EGREP_max=$ac_count
6149    fi
6150    # 10*(2^10) chars as input seems more than enough
6151    test $ac_count -gt 10 && break
6152  done
6153  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6154esac
6155
6156      $ac_path_EGREP_found && break 3
6157    done
6158  done
6159  done
6160IFS=$as_save_IFS
6161  if test -z "$ac_cv_path_EGREP"; then
6162    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6163  fi
6164else
6165  ac_cv_path_EGREP=$EGREP
6166fi
6167
6168   fi
6169fi
6170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6171$as_echo "$ac_cv_path_EGREP" >&6; }
6172 EGREP="$ac_cv_path_EGREP"
6173
6174
6175
6176    if test "x$EGREP" = x; then
6177        if test "x" = x; then
6178          PROG_NAME=egrep
6179        else
6180          PROG_NAME=
6181        fi
6182        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6183$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6184        as_fn_error $? "Cannot continue" "$LINENO" 5
6185    fi
6186
6187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6188$as_echo_n "checking for fgrep... " >&6; }
6189if ${ac_cv_path_FGREP+:} false; then :
6190  $as_echo_n "(cached) " >&6
6191else
6192  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6193   then ac_cv_path_FGREP="$GREP -F"
6194   else
6195     if test -z "$FGREP"; then
6196  ac_path_FGREP_found=false
6197  # Loop through the user's path and test for each of PROGNAME-LIST
6198  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6199for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6200do
6201  IFS=$as_save_IFS
6202  test -z "$as_dir" && as_dir=.
6203    for ac_prog in fgrep; do
6204    for ac_exec_ext in '' $ac_executable_extensions; do
6205      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6206      as_fn_executable_p "$ac_path_FGREP" || continue
6207# Check for GNU ac_path_FGREP and select it if it is found.
6208  # Check for GNU $ac_path_FGREP
6209case `"$ac_path_FGREP" --version 2>&1` in
6210*GNU*)
6211  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6212*)
6213  ac_count=0
6214  $as_echo_n 0123456789 >"conftest.in"
6215  while :
6216  do
6217    cat "conftest.in" "conftest.in" >"conftest.tmp"
6218    mv "conftest.tmp" "conftest.in"
6219    cp "conftest.in" "conftest.nl"
6220    $as_echo 'FGREP' >> "conftest.nl"
6221    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6222    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6223    as_fn_arith $ac_count + 1 && ac_count=$as_val
6224    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6225      # Best one so far, save it but keep looking for a better one
6226      ac_cv_path_FGREP="$ac_path_FGREP"
6227      ac_path_FGREP_max=$ac_count
6228    fi
6229    # 10*(2^10) chars as input seems more than enough
6230    test $ac_count -gt 10 && break
6231  done
6232  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6233esac
6234
6235      $ac_path_FGREP_found && break 3
6236    done
6237  done
6238  done
6239IFS=$as_save_IFS
6240  if test -z "$ac_cv_path_FGREP"; then
6241    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6242  fi
6243else
6244  ac_cv_path_FGREP=$FGREP
6245fi
6246
6247   fi
6248fi
6249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6250$as_echo "$ac_cv_path_FGREP" >&6; }
6251 FGREP="$ac_cv_path_FGREP"
6252
6253
6254
6255    if test "x$FGREP" = x; then
6256        if test "x" = x; then
6257          PROG_NAME=fgrep
6258        else
6259          PROG_NAME=
6260        fi
6261        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6262$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6263        as_fn_error $? "Cannot continue" "$LINENO" 5
6264    fi
6265
6266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6267$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6268if ${ac_cv_path_SED+:} false; then :
6269  $as_echo_n "(cached) " >&6
6270else
6271            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6272     for ac_i in 1 2 3 4 5 6 7; do
6273       ac_script="$ac_script$as_nl$ac_script"
6274     done
6275     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6276     { ac_script=; unset ac_script;}
6277     if test -z "$SED"; then
6278  ac_path_SED_found=false
6279  # Loop through the user's path and test for each of PROGNAME-LIST
6280  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6281for as_dir in $PATH
6282do
6283  IFS=$as_save_IFS
6284  test -z "$as_dir" && as_dir=.
6285    for ac_prog in sed gsed; do
6286    for ac_exec_ext in '' $ac_executable_extensions; do
6287      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6288      as_fn_executable_p "$ac_path_SED" || continue
6289# Check for GNU ac_path_SED and select it if it is found.
6290  # Check for GNU $ac_path_SED
6291case `"$ac_path_SED" --version 2>&1` in
6292*GNU*)
6293  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6294*)
6295  ac_count=0
6296  $as_echo_n 0123456789 >"conftest.in"
6297  while :
6298  do
6299    cat "conftest.in" "conftest.in" >"conftest.tmp"
6300    mv "conftest.tmp" "conftest.in"
6301    cp "conftest.in" "conftest.nl"
6302    $as_echo '' >> "conftest.nl"
6303    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6304    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6305    as_fn_arith $ac_count + 1 && ac_count=$as_val
6306    if test $ac_count -gt ${ac_path_SED_max-0}; then
6307      # Best one so far, save it but keep looking for a better one
6308      ac_cv_path_SED="$ac_path_SED"
6309      ac_path_SED_max=$ac_count
6310    fi
6311    # 10*(2^10) chars as input seems more than enough
6312    test $ac_count -gt 10 && break
6313  done
6314  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6315esac
6316
6317      $ac_path_SED_found && break 3
6318    done
6319  done
6320  done
6321IFS=$as_save_IFS
6322  if test -z "$ac_cv_path_SED"; then
6323    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6324  fi
6325else
6326  ac_cv_path_SED=$SED
6327fi
6328
6329fi
6330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6331$as_echo "$ac_cv_path_SED" >&6; }
6332 SED="$ac_cv_path_SED"
6333  rm -f conftest.sed
6334
6335
6336    if test "x$SED" = x; then
6337        if test "x" = x; then
6338          PROG_NAME=sed
6339        else
6340          PROG_NAME=
6341        fi
6342        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6343$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6344        as_fn_error $? "Cannot continue" "$LINENO" 5
6345    fi
6346
6347
6348for ac_prog in nawk gawk awk
6349do
6350  # Extract the first word of "$ac_prog", so it can be a program name with args.
6351set dummy $ac_prog; ac_word=$2
6352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6353$as_echo_n "checking for $ac_word... " >&6; }
6354if ${ac_cv_path_NAWK+:} false; then :
6355  $as_echo_n "(cached) " >&6
6356else
6357  case $NAWK in
6358  [\\/]* | ?:[\\/]*)
6359  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6360  ;;
6361  *)
6362  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6363for as_dir in $PATH
6364do
6365  IFS=$as_save_IFS
6366  test -z "$as_dir" && as_dir=.
6367    for ac_exec_ext in '' $ac_executable_extensions; do
6368  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6369    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6370    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6371    break 2
6372  fi
6373done
6374  done
6375IFS=$as_save_IFS
6376
6377  ;;
6378esac
6379fi
6380NAWK=$ac_cv_path_NAWK
6381if test -n "$NAWK"; then
6382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6383$as_echo "$NAWK" >&6; }
6384else
6385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6386$as_echo "no" >&6; }
6387fi
6388
6389
6390  test -n "$NAWK" && break
6391done
6392
6393
6394    if test "x$NAWK" = x; then
6395        if test "x" = x; then
6396          PROG_NAME=nawk
6397        else
6398          PROG_NAME=
6399        fi
6400        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6401$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6402        as_fn_error $? "Cannot continue" "$LINENO" 5
6403    fi
6404
6405
6406# Always force rm.
6407RM="$RM -f"
6408
6409# pwd behaves differently on various platforms and some don't support the -L flag.
6410# Always use the bash builtin pwd to get uniform behavior.
6411THEPWDCMD=pwd
6412
6413# These are not required on all platforms
6414# Extract the first word of "cygpath", so it can be a program name with args.
6415set dummy cygpath; ac_word=$2
6416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6417$as_echo_n "checking for $ac_word... " >&6; }
6418if ${ac_cv_path_CYGPATH+:} false; then :
6419  $as_echo_n "(cached) " >&6
6420else
6421  case $CYGPATH in
6422  [\\/]* | ?:[\\/]*)
6423  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6424  ;;
6425  *)
6426  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6427for as_dir in $PATH
6428do
6429  IFS=$as_save_IFS
6430  test -z "$as_dir" && as_dir=.
6431    for ac_exec_ext in '' $ac_executable_extensions; do
6432  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6433    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6434    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6435    break 2
6436  fi
6437done
6438  done
6439IFS=$as_save_IFS
6440
6441  ;;
6442esac
6443fi
6444CYGPATH=$ac_cv_path_CYGPATH
6445if test -n "$CYGPATH"; then
6446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6447$as_echo "$CYGPATH" >&6; }
6448else
6449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6450$as_echo "no" >&6; }
6451fi
6452
6453
6454# Extract the first word of "readlink", so it can be a program name with args.
6455set dummy readlink; ac_word=$2
6456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6457$as_echo_n "checking for $ac_word... " >&6; }
6458if ${ac_cv_path_READLINK+:} false; then :
6459  $as_echo_n "(cached) " >&6
6460else
6461  case $READLINK in
6462  [\\/]* | ?:[\\/]*)
6463  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6464  ;;
6465  *)
6466  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6467for as_dir in $PATH
6468do
6469  IFS=$as_save_IFS
6470  test -z "$as_dir" && as_dir=.
6471    for ac_exec_ext in '' $ac_executable_extensions; do
6472  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6473    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6474    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6475    break 2
6476  fi
6477done
6478  done
6479IFS=$as_save_IFS
6480
6481  ;;
6482esac
6483fi
6484READLINK=$ac_cv_path_READLINK
6485if test -n "$READLINK"; then
6486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6487$as_echo "$READLINK" >&6; }
6488else
6489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6490$as_echo "no" >&6; }
6491fi
6492
6493
6494# Extract the first word of "df", so it can be a program name with args.
6495set dummy df; ac_word=$2
6496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6497$as_echo_n "checking for $ac_word... " >&6; }
6498if ${ac_cv_path_DF+:} false; then :
6499  $as_echo_n "(cached) " >&6
6500else
6501  case $DF in
6502  [\\/]* | ?:[\\/]*)
6503  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6504  ;;
6505  *)
6506  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6507for as_dir in $PATH
6508do
6509  IFS=$as_save_IFS
6510  test -z "$as_dir" && as_dir=.
6511    for ac_exec_ext in '' $ac_executable_extensions; do
6512  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6513    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6514    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6515    break 2
6516  fi
6517done
6518  done
6519IFS=$as_save_IFS
6520
6521  ;;
6522esac
6523fi
6524DF=$ac_cv_path_DF
6525if test -n "$DF"; then
6526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6527$as_echo "$DF" >&6; }
6528else
6529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6530$as_echo "no" >&6; }
6531fi
6532
6533
6534# Extract the first word of "SetFile", so it can be a program name with args.
6535set dummy SetFile; ac_word=$2
6536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6537$as_echo_n "checking for $ac_word... " >&6; }
6538if ${ac_cv_path_SETFILE+:} false; then :
6539  $as_echo_n "(cached) " >&6
6540else
6541  case $SETFILE in
6542  [\\/]* | ?:[\\/]*)
6543  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6544  ;;
6545  *)
6546  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6547for as_dir in $PATH
6548do
6549  IFS=$as_save_IFS
6550  test -z "$as_dir" && as_dir=.
6551    for ac_exec_ext in '' $ac_executable_extensions; do
6552  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6553    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6555    break 2
6556  fi
6557done
6558  done
6559IFS=$as_save_IFS
6560
6561  ;;
6562esac
6563fi
6564SETFILE=$ac_cv_path_SETFILE
6565if test -n "$SETFILE"; then
6566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6567$as_echo "$SETFILE" >&6; }
6568else
6569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6570$as_echo "no" >&6; }
6571fi
6572
6573
6574
6575
6576# Now we can determine OpenJDK build and target platforms. This is required to
6577# have early on.
6578# Make sure we can run config.sub.
6579$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6580  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6581
6582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6583$as_echo_n "checking build system type... " >&6; }
6584if ${ac_cv_build+:} false; then :
6585  $as_echo_n "(cached) " >&6
6586else
6587  ac_build_alias=$build_alias
6588test "x$ac_build_alias" = x &&
6589  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6590test "x$ac_build_alias" = x &&
6591  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6592ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6593  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6594
6595fi
6596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6597$as_echo "$ac_cv_build" >&6; }
6598case $ac_cv_build in
6599*-*-*) ;;
6600*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6601esac
6602build=$ac_cv_build
6603ac_save_IFS=$IFS; IFS='-'
6604set x $ac_cv_build
6605shift
6606build_cpu=$1
6607build_vendor=$2
6608shift; shift
6609# Remember, the first character of IFS is used to create $*,
6610# except with old shells:
6611build_os=$*
6612IFS=$ac_save_IFS
6613case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6614
6615
6616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6617$as_echo_n "checking host system type... " >&6; }
6618if ${ac_cv_host+:} false; then :
6619  $as_echo_n "(cached) " >&6
6620else
6621  if test "x$host_alias" = x; then
6622  ac_cv_host=$ac_cv_build
6623else
6624  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6625    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6626fi
6627
6628fi
6629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6630$as_echo "$ac_cv_host" >&6; }
6631case $ac_cv_host in
6632*-*-*) ;;
6633*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6634esac
6635host=$ac_cv_host
6636ac_save_IFS=$IFS; IFS='-'
6637set x $ac_cv_host
6638shift
6639host_cpu=$1
6640host_vendor=$2
6641shift; shift
6642# Remember, the first character of IFS is used to create $*,
6643# except with old shells:
6644host_os=$*
6645IFS=$ac_save_IFS
6646case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6647
6648
6649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6650$as_echo_n "checking target system type... " >&6; }
6651if ${ac_cv_target+:} false; then :
6652  $as_echo_n "(cached) " >&6
6653else
6654  if test "x$target_alias" = x; then
6655  ac_cv_target=$ac_cv_host
6656else
6657  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6658    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6659fi
6660
6661fi
6662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6663$as_echo "$ac_cv_target" >&6; }
6664case $ac_cv_target in
6665*-*-*) ;;
6666*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6667esac
6668target=$ac_cv_target
6669ac_save_IFS=$IFS; IFS='-'
6670set x $ac_cv_target
6671shift
6672target_cpu=$1
6673target_vendor=$2
6674shift; shift
6675# Remember, the first character of IFS is used to create $*,
6676# except with old shells:
6677target_os=$*
6678IFS=$ac_save_IFS
6679case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6680
6681
6682# The aliases save the names the user supplied, while $host etc.
6683# will get canonicalized.
6684test -n "$target_alias" &&
6685  test "$program_prefix$program_suffix$program_transform_name" = \
6686    NONENONEs,x,x, &&
6687  program_prefix=${target_alias}-
6688
6689# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6690# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6691# product you're building. The target of this build is called "host". Since this is confusing to most people, we
6692# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6693# to use the configure naming style.
6694
6695
6696
6697
6698
6699    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6700    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6701    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6702    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6703    OPENJDK_TARGET_AUTOCONF_NAME="$host"
6704    OPENJDK_BUILD_AUTOCONF_NAME="$build"
6705
6706
6707
6708    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6709
6710  case "$build_os" in
6711    *linux*)
6712      VAR_OS=linux
6713      VAR_OS_API=posix
6714      VAR_OS_ENV=linux
6715      ;;
6716    *solaris*)
6717      VAR_OS=solaris
6718      VAR_OS_API=posix
6719      VAR_OS_ENV=solaris
6720      ;;
6721    *darwin*)
6722      VAR_OS=macosx
6723      VAR_OS_API=posix
6724      VAR_OS_ENV=macosx
6725      ;;
6726    *bsd*)
6727      VAR_OS=bsd
6728      VAR_OS_API=posix
6729      VAR_OS_ENV=bsd
6730      ;;
6731    *cygwin*)
6732      VAR_OS=windows
6733      VAR_OS_API=winapi
6734      VAR_OS_ENV=windows.cygwin
6735      ;;
6736    *mingw*)
6737      VAR_OS=windows
6738      VAR_OS_API=winapi
6739      VAR_OS_ENV=windows.msys
6740      ;;
6741    *)
6742      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6743      ;;
6744  esac
6745
6746
6747  # First argument is the cpu name from the trip/quad
6748  case "$build_cpu" in
6749    x86_64)
6750      VAR_CPU=x86_64
6751      VAR_CPU_ARCH=x86
6752      VAR_CPU_BITS=64
6753      VAR_CPU_ENDIAN=little
6754      ;;
6755    i?86)
6756      VAR_CPU=x86
6757      VAR_CPU_ARCH=x86
6758      VAR_CPU_BITS=32
6759      VAR_CPU_ENDIAN=little
6760      ;;
6761    arm*)
6762      VAR_CPU=arm
6763      VAR_CPU_ARCH=arm
6764      VAR_CPU_BITS=32
6765      VAR_CPU_ENDIAN=little
6766      ;;
6767    powerpc)
6768      VAR_CPU=ppc
6769      VAR_CPU_ARCH=ppc
6770      VAR_CPU_BITS=32
6771      VAR_CPU_ENDIAN=big
6772       ;;
6773    powerpc64)
6774      VAR_CPU=ppc64
6775      VAR_CPU_ARCH=ppc
6776      VAR_CPU_BITS=64
6777      VAR_CPU_ENDIAN=big
6778       ;;
6779    s390)
6780      VAR_CPU=s390
6781      VAR_CPU_ARCH=s390
6782      VAR_CPU_BITS=32
6783      VAR_CPU_ENDIAN=big
6784       ;;
6785    s390x)
6786      VAR_CPU=s390x
6787      VAR_CPU_ARCH=s390
6788      VAR_CPU_BITS=64
6789      VAR_CPU_ENDIAN=big
6790       ;;
6791    sparc)
6792      VAR_CPU=sparc
6793      VAR_CPU_ARCH=sparc
6794      VAR_CPU_BITS=32
6795      VAR_CPU_ENDIAN=big
6796       ;;
6797    sparcv9)
6798      VAR_CPU=sparcv9
6799      VAR_CPU_ARCH=sparc
6800      VAR_CPU_BITS=64
6801      VAR_CPU_ENDIAN=big
6802       ;;
6803    *)
6804      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6805      ;;
6806  esac
6807
6808    # ..and setup our own variables. (Do this explicitely to facilitate searching)
6809    OPENJDK_BUILD_OS="$VAR_OS"
6810    OPENJDK_BUILD_OS_API="$VAR_OS_API"
6811    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6812    OPENJDK_BUILD_CPU="$VAR_CPU"
6813    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6814    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6815    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6816
6817
6818
6819
6820
6821
6822
6823    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6824$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6825    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6826$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6827
6828    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6829
6830  case "$host_os" in
6831    *linux*)
6832      VAR_OS=linux
6833      VAR_OS_API=posix
6834      VAR_OS_ENV=linux
6835      ;;
6836    *solaris*)
6837      VAR_OS=solaris
6838      VAR_OS_API=posix
6839      VAR_OS_ENV=solaris
6840      ;;
6841    *darwin*)
6842      VAR_OS=macosx
6843      VAR_OS_API=posix
6844      VAR_OS_ENV=macosx
6845      ;;
6846    *bsd*)
6847      VAR_OS=bsd
6848      VAR_OS_API=posix
6849      VAR_OS_ENV=bsd
6850      ;;
6851    *cygwin*)
6852      VAR_OS=windows
6853      VAR_OS_API=winapi
6854      VAR_OS_ENV=windows.cygwin
6855      ;;
6856    *mingw*)
6857      VAR_OS=windows
6858      VAR_OS_API=winapi
6859      VAR_OS_ENV=windows.msys
6860      ;;
6861    *)
6862      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6863      ;;
6864  esac
6865
6866
6867  # First argument is the cpu name from the trip/quad
6868  case "$host_cpu" in
6869    x86_64)
6870      VAR_CPU=x86_64
6871      VAR_CPU_ARCH=x86
6872      VAR_CPU_BITS=64
6873      VAR_CPU_ENDIAN=little
6874      ;;
6875    i?86)
6876      VAR_CPU=x86
6877      VAR_CPU_ARCH=x86
6878      VAR_CPU_BITS=32
6879      VAR_CPU_ENDIAN=little
6880      ;;
6881    arm*)
6882      VAR_CPU=arm
6883      VAR_CPU_ARCH=arm
6884      VAR_CPU_BITS=32
6885      VAR_CPU_ENDIAN=little
6886      ;;
6887    powerpc)
6888      VAR_CPU=ppc
6889      VAR_CPU_ARCH=ppc
6890      VAR_CPU_BITS=32
6891      VAR_CPU_ENDIAN=big
6892       ;;
6893    powerpc64)
6894      VAR_CPU=ppc64
6895      VAR_CPU_ARCH=ppc
6896      VAR_CPU_BITS=64
6897      VAR_CPU_ENDIAN=big
6898       ;;
6899    s390)
6900      VAR_CPU=s390
6901      VAR_CPU_ARCH=s390
6902      VAR_CPU_BITS=32
6903      VAR_CPU_ENDIAN=big
6904       ;;
6905    s390x)
6906      VAR_CPU=s390x
6907      VAR_CPU_ARCH=s390
6908      VAR_CPU_BITS=64
6909      VAR_CPU_ENDIAN=big
6910       ;;
6911    sparc)
6912      VAR_CPU=sparc
6913      VAR_CPU_ARCH=sparc
6914      VAR_CPU_BITS=32
6915      VAR_CPU_ENDIAN=big
6916       ;;
6917    sparcv9)
6918      VAR_CPU=sparcv9
6919      VAR_CPU_ARCH=sparc
6920      VAR_CPU_BITS=64
6921      VAR_CPU_ENDIAN=big
6922       ;;
6923    *)
6924      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6925      ;;
6926  esac
6927
6928    # ... and setup our own variables. (Do this explicitely to facilitate searching)
6929    OPENJDK_TARGET_OS="$VAR_OS"
6930    OPENJDK_TARGET_OS_API="$VAR_OS_API"
6931    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6932    OPENJDK_TARGET_CPU="$VAR_CPU"
6933    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6934    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6935    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6936
6937
6938
6939
6940
6941
6942
6943    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6944$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6945    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6946$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6947
6948
6949
6950# Check whether --with-target-bits was given.
6951if test "${with_target_bits+set}" = set; then :
6952  withval=$with_target_bits;
6953fi
6954
6955
6956  # We have three types of compiles:
6957  # native  == normal compilation, target system == build system
6958  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6959  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6960  #
6961  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6962    # We're doing a proper cross-compilation
6963    COMPILE_TYPE="cross"
6964  else
6965    COMPILE_TYPE="native"
6966  fi
6967
6968  if test "x$with_target_bits" != x; then
6969    if test "x$COMPILE_TYPE" = "xcross"; then
6970      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6971    fi
6972
6973    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6974      # A reduced build is requested
6975      COMPILE_TYPE="reduced"
6976      OPENJDK_TARGET_CPU_BITS=32
6977      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6978        OPENJDK_TARGET_CPU=x86
6979      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6980        OPENJDK_TARGET_CPU=sparc
6981      else
6982        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6983      fi
6984    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6985      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
6986    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6987      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6988$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6989    else
6990      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6991    fi
6992  fi
6993
6994
6995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6996$as_echo_n "checking compilation type... " >&6; }
6997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6998$as_echo "$COMPILE_TYPE" >&6; }
6999
7000
7001    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
7002       REQUIRED_OS_NAME=SunOS
7003       REQUIRED_OS_VERSION=5.10
7004    fi
7005    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
7006       REQUIRED_OS_NAME=Linux
7007       REQUIRED_OS_VERSION=2.6
7008    fi
7009    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7010        REQUIRED_OS_NAME=Windows
7011        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
7012            REQUIRED_OS_VERSION=5.2
7013        else
7014            REQUIRED_OS_VERSION=5.1
7015        fi
7016    fi
7017    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7018        REQUIRED_OS_NAME=Darwin
7019        REQUIRED_OS_VERSION=11.2
7020    fi
7021
7022
7023
7024
7025
7026    # Also store the legacy naming of the cpu.
7027    # Ie i586 and amd64 instead of x86 and x86_64
7028    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
7029    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7030      OPENJDK_TARGET_CPU_LEGACY="i586"
7031    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7032      # On all platforms except MacOSX replace x86_64 with amd64.
7033      OPENJDK_TARGET_CPU_LEGACY="amd64"
7034    fi
7035
7036
7037    # And the second legacy naming of the cpu.
7038    # Ie i386 and amd64 instead of x86 and x86_64.
7039    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
7040    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7041      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
7042    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7043      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
7044    fi
7045
7046
7047    # This is the name of the cpu (but using i386 and amd64 instead of
7048    # x86 and x86_64, respectively), preceeded by a /, to be used when
7049    # locating libraries. On macosx, it's empty, though.
7050    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
7051    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
7052        OPENJDK_TARGET_CPU_LIBDIR=""
7053    fi
7054
7055
7056    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
7057    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
7058    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
7059    OPENJDK_TARGET_CPU_ISADIR=""
7060    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7061      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7062          OPENJDK_TARGET_CPU_ISADIR="/amd64"
7063      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7064          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7065      fi
7066    fi
7067
7068
7069    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7070    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7071    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7072      # On linux only, we replace x86 with i386.
7073      OPENJDK_TARGET_CPU_OSARCH="i386"
7074    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7075      # On all platforms except macosx, we replace x86_64 with amd64.
7076      OPENJDK_TARGET_CPU_OSARCH="amd64"
7077    fi
7078
7079
7080    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7081    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7082      OPENJDK_TARGET_CPU_JLI="i386"
7083    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7084      # On all platforms except macosx, we replace x86_64 with amd64.
7085      OPENJDK_TARGET_CPU_JLI="amd64"
7086    fi
7087    # Now setup the -D flags for building libjli.
7088    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7089    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7090      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7091        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7092      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7093        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7094      fi
7095    fi
7096
7097
7098    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7099    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7100        OPENJDK_TARGET_OS_API_DIR="solaris"
7101    fi
7102    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7103        OPENJDK_TARGET_OS_API_DIR="windows"
7104    fi
7105
7106
7107    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7108        A_LP64="LP64:="
7109        # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7110        # unpack200.exe
7111        if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7112            ADD_LP64="-D_LP64=1"
7113        fi
7114    fi
7115    LP64=$A_LP64
7116
7117
7118    if test "x$COMPILE_TYPE" = "xcross"; then
7119      # FIXME: ... or should this include reduced builds..?
7120      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7121    else
7122      DEFINE_CROSS_COMPILE_ARCH=""
7123    fi
7124
7125
7126    # ZERO_ARCHDEF is used to enable architecture-specific code
7127    case "${OPENJDK_TARGET_CPU}" in
7128      ppc*)    ZERO_ARCHDEF=PPC   ;;
7129      s390*)   ZERO_ARCHDEF=S390  ;;
7130      sparc*)  ZERO_ARCHDEF=SPARC ;;
7131      x86_64*) ZERO_ARCHDEF=AMD64 ;;
7132      x86)     ZERO_ARCHDEF=IA32  ;;
7133      *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
7134    esac
7135
7136
7137
7138
7139
7140# Continue setting up basic stuff. Most remaining code require fundamental tools.
7141
7142# Locate the directory of this script.
7143SCRIPT="$0"
7144AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
7145
7146# Where is the source? It is located two levels above the configure script.
7147CURDIR="$PWD"
7148cd "$AUTOCONF_DIR/../.."
7149SRC_ROOT="`$THEPWDCMD -L`"
7150
7151if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7152  PATH_SEP=";"
7153
7154  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
7155  if test $SRC_ROOT_LENGTH -gt 100; then
7156      as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7157  fi
7158
7159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7160    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7161$as_echo_n "checking cygwin release... " >&6; }
7162    CYGWIN_VERSION=`$UNAME -r`
7163    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7164$as_echo "$CYGWIN_VERSION" >&6; }
7165    WINDOWS_ENV_VENDOR='cygwin'
7166    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7167
7168    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7169    if test "x$CYGWIN_VERSION_OK" = x; then
7170      { $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
7171$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;}
7172      as_fn_error $? "Cannot continue" "$LINENO" 5
7173    fi
7174    if test "x$CYGPATH" = x; then
7175        as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7176    fi
7177    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7178$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7179    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7180    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7181    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7182    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7183    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7184$as_echo "$CYGWIN_ROOT_PATH" >&6; }
7185    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7186    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7187    if test "x$test_cygdrive_prefix" = x; then
7188        as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7189    fi
7190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7191    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7192$as_echo_n "checking msys release... " >&6; }
7193    MSYS_VERSION=`$UNAME -r`
7194    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7195$as_echo "$MSYS_VERSION" >&6; }
7196
7197    WINDOWS_ENV_VENDOR='msys'
7198    WINDOWS_ENV_VERSION="$MSYS_VERSION"
7199
7200    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7201$as_echo_n "checking msys root directory as unix-style path... " >&6; }
7202    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7203    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7204
7205  windows_path="$MSYS_ROOT_PATH"
7206  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7207    unix_path=`$CYGPATH -u "$windows_path"`
7208    MSYS_ROOT_PATH="$unix_path"
7209  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7210    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7211    MSYS_ROOT_PATH="$unix_path"
7212  fi
7213
7214    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7215$as_echo "$MSYS_ROOT_PATH" >&6; }
7216    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7217  else
7218    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7219  fi
7220
7221  # Test if windows or unix (cygwin/msys) find is first in path.
7222  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7223$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7224  FIND_BINARY_OUTPUT=`find --version 2>&1`
7225  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7226    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7227$as_echo "unix style" >&6; }
7228  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7229    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7230$as_echo "Windows" >&6; }
7231    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7232$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7233    { $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
7234$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7235    as_fn_error $? "Cannot continue" "$LINENO" 5
7236  else
7237    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7238$as_echo "unknown" >&6; }
7239    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7240$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7241  fi
7242
7243else
7244  PATH_SEP=":"
7245fi
7246
7247
7248
7249cd "$CURDIR"
7250
7251
7252  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7253
7254  # Input might be given as Windows format, start by converting to
7255  # unix format.
7256  path="$SRC_ROOT"
7257  new_path=`$CYGPATH -u "$path"`
7258
7259  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7260  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7261  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7262  # "foo.exe" is OK but "foo" is an error.
7263  #
7264  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7265  # It is also a way to make sure we got the proper file name for the real test later on.
7266  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7267  if test "x$test_shortpath" = x; then
7268    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7269$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7270    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7271  fi
7272
7273  # Call helper function which possibly converts this using DOS-style short mode.
7274  # If so, the updated path is stored in $new_path.
7275
7276  input_path="$new_path"
7277  # Check if we need to convert this using DOS-style short mode. If the path
7278  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7279  # take no chances and rewrite it.
7280  # Note: m4 eats our [], so we need to use [ and ] instead.
7281  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7282  if test "x$has_forbidden_chars" != x; then
7283    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7284    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7285    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7286    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7287      # Going to short mode and back again did indeed matter. Since short mode is
7288      # case insensitive, let's make it lowercase to improve readability.
7289      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7290      # Now convert it back to Unix-stile (cygpath)
7291      input_path=`$CYGPATH -u "$shortmode_path"`
7292      new_path="$input_path"
7293    fi
7294  fi
7295
7296  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7297  if test "x$test_cygdrive_prefix" = x; then
7298    # As a simple fix, exclude /usr/bin since it's not a real path.
7299    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7300      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7301      # a path prefixed by /cygdrive for fixpath to work.
7302      new_path="$CYGWIN_ROOT_PATH$input_path"
7303    fi
7304  fi
7305
7306
7307  if test "x$path" != "x$new_path"; then
7308    SRC_ROOT="$new_path"
7309    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7310$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7311  fi
7312
7313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7314
7315  path="$SRC_ROOT"
7316  has_colon=`$ECHO $path | $GREP ^.:`
7317  new_path="$path"
7318  if test "x$has_colon" = x; then
7319    # Not in mixed or Windows style, start by that.
7320    new_path=`cmd //c echo $path`
7321  fi
7322
7323
7324  input_path="$new_path"
7325  # Check if we need to convert this using DOS-style short mode. If the path
7326  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7327  # take no chances and rewrite it.
7328  # Note: m4 eats our [], so we need to use [ and ] instead.
7329  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7330  if test "x$has_forbidden_chars" != x; then
7331    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7332    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7333  fi
7334
7335
7336  windows_path="$new_path"
7337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7338    unix_path=`$CYGPATH -u "$windows_path"`
7339    new_path="$unix_path"
7340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7341    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7342    new_path="$unix_path"
7343  fi
7344
7345  if test "x$path" != "x$new_path"; then
7346    SRC_ROOT="$new_path"
7347    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7348$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7349  fi
7350
7351  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7352  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7353
7354  else
7355    # We're on a posix platform. Hooray! :)
7356    path="$SRC_ROOT"
7357    has_space=`$ECHO "$path" | $GREP " "`
7358    if test "x$has_space" != x; then
7359      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7360$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7361      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7362    fi
7363
7364    # Use eval to expand a potential ~
7365    eval path="$path"
7366    if test ! -f "$path" && test ! -d "$path"; then
7367      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7368    fi
7369
7370    SRC_ROOT="`cd "$path"; $THEPWDCMD -L`"
7371  fi
7372
7373
7374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7375
7376  # Input might be given as Windows format, start by converting to
7377  # unix format.
7378  path="$CURDIR"
7379  new_path=`$CYGPATH -u "$path"`
7380
7381  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7382  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7383  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7384  # "foo.exe" is OK but "foo" is an error.
7385  #
7386  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7387  # It is also a way to make sure we got the proper file name for the real test later on.
7388  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7389  if test "x$test_shortpath" = x; then
7390    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7391$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7392    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7393  fi
7394
7395  # Call helper function which possibly converts this using DOS-style short mode.
7396  # If so, the updated path is stored in $new_path.
7397
7398  input_path="$new_path"
7399  # Check if we need to convert this using DOS-style short mode. If the path
7400  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7401  # take no chances and rewrite it.
7402  # Note: m4 eats our [], so we need to use [ and ] instead.
7403  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7404  if test "x$has_forbidden_chars" != x; then
7405    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7406    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7407    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7408    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7409      # Going to short mode and back again did indeed matter. Since short mode is
7410      # case insensitive, let's make it lowercase to improve readability.
7411      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7412      # Now convert it back to Unix-stile (cygpath)
7413      input_path=`$CYGPATH -u "$shortmode_path"`
7414      new_path="$input_path"
7415    fi
7416  fi
7417
7418  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7419  if test "x$test_cygdrive_prefix" = x; then
7420    # As a simple fix, exclude /usr/bin since it's not a real path.
7421    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7422      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7423      # a path prefixed by /cygdrive for fixpath to work.
7424      new_path="$CYGWIN_ROOT_PATH$input_path"
7425    fi
7426  fi
7427
7428
7429  if test "x$path" != "x$new_path"; then
7430    CURDIR="$new_path"
7431    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7432$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7433  fi
7434
7435  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7436
7437  path="$CURDIR"
7438  has_colon=`$ECHO $path | $GREP ^.:`
7439  new_path="$path"
7440  if test "x$has_colon" = x; then
7441    # Not in mixed or Windows style, start by that.
7442    new_path=`cmd //c echo $path`
7443  fi
7444
7445
7446  input_path="$new_path"
7447  # Check if we need to convert this using DOS-style short mode. If the path
7448  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7449  # take no chances and rewrite it.
7450  # Note: m4 eats our [], so we need to use [ and ] instead.
7451  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7452  if test "x$has_forbidden_chars" != x; then
7453    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7454    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7455  fi
7456
7457
7458  windows_path="$new_path"
7459  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7460    unix_path=`$CYGPATH -u "$windows_path"`
7461    new_path="$unix_path"
7462  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7463    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7464    new_path="$unix_path"
7465  fi
7466
7467  if test "x$path" != "x$new_path"; then
7468    CURDIR="$new_path"
7469    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7470$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7471  fi
7472
7473  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7474  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7475
7476  else
7477    # We're on a posix platform. Hooray! :)
7478    path="$CURDIR"
7479    has_space=`$ECHO "$path" | $GREP " "`
7480    if test "x$has_space" != x; then
7481      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7482$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7483      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7484    fi
7485
7486    # Use eval to expand a potential ~
7487    eval path="$path"
7488    if test ! -f "$path" && test ! -d "$path"; then
7489      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7490    fi
7491
7492    CURDIR="`cd "$path"; $THEPWDCMD -L`"
7493  fi
7494
7495
7496if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7497    # Add extra search paths on solaris for utilities like ar and as etc...
7498    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7499fi
7500
7501# You can force the sys-root if the sys-root encoded into the cross compiler tools
7502# is not correct.
7503
7504# Check whether --with-sys-root was given.
7505if test "${with_sys_root+set}" = set; then :
7506  withval=$with_sys_root;
7507fi
7508
7509
7510if test "x$with_sys_root" != x; then
7511  SYS_ROOT=$with_sys_root
7512else
7513  SYS_ROOT=/
7514fi
7515
7516
7517
7518# Check whether --with-tools-dir was given.
7519if test "${with_tools_dir+set}" = set; then :
7520  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7521
7522fi
7523
7524
7525
7526# Check whether --with-devkit was given.
7527if test "${with_devkit+set}" = set; then :
7528  withval=$with_devkit;
7529    if test "x$with_sys_root" != x; then
7530      as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7531    fi
7532
7533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7534
7535  # Input might be given as Windows format, start by converting to
7536  # unix format.
7537  path="$with_devkit"
7538  new_path=`$CYGPATH -u "$path"`
7539
7540  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7541  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7542  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7543  # "foo.exe" is OK but "foo" is an error.
7544  #
7545  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7546  # It is also a way to make sure we got the proper file name for the real test later on.
7547  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7548  if test "x$test_shortpath" = x; then
7549    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7550$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7551    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
7552  fi
7553
7554  # Call helper function which possibly converts this using DOS-style short mode.
7555  # If so, the updated path is stored in $new_path.
7556
7557  input_path="$new_path"
7558  # Check if we need to convert this using DOS-style short mode. If the path
7559  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7560  # take no chances and rewrite it.
7561  # Note: m4 eats our [], so we need to use [ and ] instead.
7562  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7563  if test "x$has_forbidden_chars" != x; then
7564    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7565    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7566    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7567    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7568      # Going to short mode and back again did indeed matter. Since short mode is
7569      # case insensitive, let's make it lowercase to improve readability.
7570      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7571      # Now convert it back to Unix-stile (cygpath)
7572      input_path=`$CYGPATH -u "$shortmode_path"`
7573      new_path="$input_path"
7574    fi
7575  fi
7576
7577  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7578  if test "x$test_cygdrive_prefix" = x; then
7579    # As a simple fix, exclude /usr/bin since it's not a real path.
7580    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7581      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7582      # a path prefixed by /cygdrive for fixpath to work.
7583      new_path="$CYGWIN_ROOT_PATH$input_path"
7584    fi
7585  fi
7586
7587
7588  if test "x$path" != "x$new_path"; then
7589    with_devkit="$new_path"
7590    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7591$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7592  fi
7593
7594  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7595
7596  path="$with_devkit"
7597  has_colon=`$ECHO $path | $GREP ^.:`
7598  new_path="$path"
7599  if test "x$has_colon" = x; then
7600    # Not in mixed or Windows style, start by that.
7601    new_path=`cmd //c echo $path`
7602  fi
7603
7604
7605  input_path="$new_path"
7606  # Check if we need to convert this using DOS-style short mode. If the path
7607  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7608  # take no chances and rewrite it.
7609  # Note: m4 eats our [], so we need to use [ and ] instead.
7610  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7611  if test "x$has_forbidden_chars" != x; then
7612    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7613    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7614  fi
7615
7616
7617  windows_path="$new_path"
7618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7619    unix_path=`$CYGPATH -u "$windows_path"`
7620    new_path="$unix_path"
7621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7622    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7623    new_path="$unix_path"
7624  fi
7625
7626  if test "x$path" != "x$new_path"; then
7627    with_devkit="$new_path"
7628    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7629$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7630  fi
7631
7632  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7633  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7634
7635  else
7636    # We're on a posix platform. Hooray! :)
7637    path="$with_devkit"
7638    has_space=`$ECHO "$path" | $GREP " "`
7639    if test "x$has_space" != x; then
7640      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7641$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7642      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7643    fi
7644
7645    # Use eval to expand a potential ~
7646    eval path="$path"
7647    if test ! -f "$path" && test ! -d "$path"; then
7648      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
7649    fi
7650
7651    with_devkit="`cd "$path"; $THEPWDCMD -L`"
7652  fi
7653
7654
7655  if test "x$TOOLS_DIR" = x; then
7656    TOOLS_DIR="$with_devkit/bin"
7657  else
7658    TOOLS_DIR="$TOOLS_DIR:$with_devkit/bin"
7659  fi
7660
7661    if test -d "$with_devkit/$host_alias/libc"; then
7662      SYS_ROOT=$with_devkit/$host_alias/libc
7663    elif test -d "$with_devkit/$host/sys-root"; then
7664      SYS_ROOT=$with_devkit/$host/sys-root
7665    fi
7666
7667fi
7668
7669
7670
7671# Setup default logging of stdout and stderr to build.log in the output root.
7672BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7673BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7674BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7675
7676
7677
7678
7679
7680# Check if it's a pure open build or if custom sources are to be used.
7681
7682  # Check whether --enable-openjdk-only was given.
7683if test "${enable_openjdk_only+set}" = set; then :
7684  enableval=$enable_openjdk_only;
7685else
7686  enable_openjdk_only="no"
7687fi
7688
7689
7690  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7691$as_echo_n "checking for presence of closed sources... " >&6; }
7692  if test -d "$SRC_ROOT/jdk/src/closed"; then
7693    CLOSED_SOURCE_PRESENT=yes
7694  else
7695    CLOSED_SOURCE_PRESENT=no
7696  fi
7697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7698$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7699
7700  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7701$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7702  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7704$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7705
7706  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7707    OPENJDK=true
7708    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7709      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7710$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7711    fi
7712  else
7713    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7714      OPENJDK=true
7715    else
7716      OPENJDK=false
7717    fi
7718  fi
7719
7720  if test "x$OPENJDK" = "xtrue"; then
7721    SET_OPENJDK="OPENJDK=true"
7722  fi
7723
7724
7725
7726
7727# These are needed to be able to create a configuration name (and thus the output directory)
7728
7729###############################################################################
7730#
7731# Check which variant of the JDK that we want to build.
7732# Currently we have:
7733#    normal:   standard edition
7734# but the custom make system may add other variants
7735#
7736# Effectively the JDK variant gives a name to a specific set of
7737# modules to compile into the JDK. In the future, these modules
7738# might even be Jigsaw modules.
7739#
7740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7741$as_echo_n "checking which variant of the JDK to build... " >&6; }
7742
7743# Check whether --with-jdk-variant was given.
7744if test "${with_jdk_variant+set}" = set; then :
7745  withval=$with_jdk_variant;
7746fi
7747
7748
7749if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7750    JDK_VARIANT="normal"
7751else
7752    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7753fi
7754
7755
7756
7757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7758$as_echo "$JDK_VARIANT" >&6; }
7759
7760
7761
7762###############################################################################
7763#
7764# Check which variants of the JVM that we want to build.
7765# Currently we have:
7766#    server: normal interpreter and a tiered C1/C2 compiler
7767#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7768#    minimal1: reduced form of client with optional VM services and features stripped out
7769#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7770#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7771#    zero: no machine code interpreter, no compiler
7772#    zeroshark: zero interpreter and shark/llvm compiler backend
7773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7774$as_echo_n "checking which variants of the JVM to build... " >&6; }
7775
7776# Check whether --with-jvm-variants was given.
7777if test "${with_jvm_variants+set}" = set; then :
7778  withval=$with_jvm_variants;
7779fi
7780
7781
7782if test "x$with_jvm_variants" = x; then
7783     with_jvm_variants="server"
7784fi
7785
7786JVM_VARIANTS=",$with_jvm_variants,"
7787TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7788
7789if test "x$TEST_VARIANTS" != "x,"; then
7790   as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7791fi
7792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7793$as_echo "$with_jvm_variants" >&6; }
7794
7795JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7796JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7797JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7798JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7799JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7800JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7801
7802if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7803    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7804        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7805    fi
7806fi
7807if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7808    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7809        as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7810    fi
7811fi
7812if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7813    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7814        as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7815    fi
7816fi
7817
7818# Replace the commas with AND for use in the build directory name.
7819ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7820COUNT_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/'`
7821if test "x$COUNT_VARIANTS" != "x,1"; then
7822    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7823else
7824    BUILDING_MULTIPLE_JVM_VARIANTS=no
7825fi
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835INCLUDE_SA=true
7836if test "x$JVM_VARIANT_ZERO" = xtrue ; then
7837    INCLUDE_SA=false
7838fi
7839if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
7840    INCLUDE_SA=false
7841fi
7842
7843
7844if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7845   MACOSX_UNIVERSAL="true"
7846fi
7847
7848
7849
7850
7851
7852###############################################################################
7853#
7854# Set the debug level
7855#    release: no debug information, all optimizations, no asserts.
7856#    fastdebug: debug information (-g), all optimizations, all asserts
7857#    slowdebug: debug information (-g), no optimizations, all asserts
7858#
7859DEBUG_LEVEL="release"
7860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7861$as_echo_n "checking which debug level to use... " >&6; }
7862# Check whether --enable-debug was given.
7863if test "${enable_debug+set}" = set; then :
7864  enableval=$enable_debug;
7865        ENABLE_DEBUG="${enableval}"
7866        DEBUG_LEVEL="fastdebug"
7867
7868else
7869  ENABLE_DEBUG="no"
7870fi
7871
7872
7873
7874# Check whether --with-debug-level was given.
7875if test "${with_debug_level+set}" = set; then :
7876  withval=$with_debug_level;
7877        DEBUG_LEVEL="${withval}"
7878        if test "x$ENABLE_DEBUG" = xyes; then
7879			as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7880        fi
7881
7882fi
7883
7884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7885$as_echo "$DEBUG_LEVEL" >&6; }
7886
7887if test "x$DEBUG_LEVEL" != xrelease && \
7888   test "x$DEBUG_LEVEL" != xfastdebug && \
7889   test "x$DEBUG_LEVEL" != xslowdebug; then
7890   as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7891fi
7892
7893
7894###############################################################################
7895#
7896# Setup legacy vars/targets and new vars to deal with different debug levels.
7897#
7898
7899case $DEBUG_LEVEL in
7900      release )
7901          VARIANT="OPT"
7902          FASTDEBUG="false"
7903          DEBUG_CLASSFILES="false"
7904          BUILD_VARIANT_RELEASE=""
7905          HOTSPOT_DEBUG_LEVEL="product"
7906          HOTSPOT_EXPORT="product"
7907           ;;
7908      fastdebug )
7909          VARIANT="DBG"
7910          FASTDEBUG="true"
7911          DEBUG_CLASSFILES="true"
7912          BUILD_VARIANT_RELEASE="-fastdebug"
7913          HOTSPOT_DEBUG_LEVEL="fastdebug"
7914          HOTSPOT_EXPORT="fastdebug"
7915           ;;
7916      slowdebug )
7917          VARIANT="DBG"
7918          FASTDEBUG="false"
7919          DEBUG_CLASSFILES="true"
7920          BUILD_VARIANT_RELEASE="-debug"
7921          HOTSPOT_DEBUG_LEVEL="jvmg"
7922          HOTSPOT_EXPORT="debug"
7923           ;;
7924esac
7925
7926#####
7927# Generate the legacy makefile targets for hotspot.
7928# The hotspot api for selecting the build artifacts, really, needs to be improved.
7929# JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7930# determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7931# But until then ...
7932HOTSPOT_TARGET=""
7933
7934if test "x$JVM_VARIANT_SERVER" = xtrue; then
7935    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7936fi
7937
7938if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7939    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7940fi
7941
7942if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7943    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7944fi
7945
7946if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7947    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7948fi
7949
7950if test "x$JVM_VARIANT_ZERO" = xtrue; then
7951    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7952fi
7953
7954if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7955    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7956fi
7957
7958HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7959
7960# On Macosx universal binaries are produced, but they only contain
7961# 64 bit intel. This invalidates control of which jvms are built
7962# from configure, but only server is valid anyway. Fix this
7963# when hotspot makefiles are rewritten.
7964if test "x$MACOSX_UNIVERSAL" = xtrue; then
7965    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7966fi
7967
7968#####
7969
7970
7971
7972
7973
7974
7975
7976
7977# With basic setup done, call the custom early hook.
7978
7979
7980# To properly create a configuration name, we need to have the OpenJDK target
7981# and options (variants and debug level) parsed.
7982
7983
7984
7985# Check whether --with-conf-name was given.
7986if test "${with_conf_name+set}" = set; then :
7987  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7988fi
7989
7990
7991# Test from where we are running configure, in or outside of src root.
7992if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
7993        || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
7994        || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7995    # We are running configure from the src root.
7996    # Create a default ./build/target-variant-debuglevel output root.
7997    if test "x${CONF_NAME}" = x; then
7998        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7999    fi
8000    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
8001    $MKDIR -p "$OUTPUT_ROOT"
8002    if test ! -d "$OUTPUT_ROOT"; then
8003        as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
8004    fi
8005else
8006    # We are running configure from outside of the src dir.
8007    # Then use the current directory as output dir!
8008    # If configuration is situated in normal build directory, just use the build
8009    # directory name as configuration name, otherwise use the complete path.
8010    if test "x${CONF_NAME}" = x; then
8011        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
8012    fi
8013    OUTPUT_ROOT="$CURDIR"
8014
8015    # WARNING: This might be a bad thing to do. You need to be sure you want to
8016    # have a configuration in this directory. Do some sanity checks!
8017
8018    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
8019      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
8020      # other files
8021      files_present=`$LS $OUTPUT_ROOT`
8022      # Configure has already touched config.log and confdefs.h in the current dir when this check
8023      # is performed.
8024      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
8025                                             | $TR -d '\n'`
8026      if test "x$filtered_files" != x; then
8027        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
8028$as_echo "$as_me: Current directory is $CURDIR." >&6;}
8029        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
8030$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
8031        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
8032$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
8033        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
8034$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
8035        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
8036$as_echo "$as_me: seriously mess up just about everything." >&6;}
8037        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
8038$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
8039        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
8040$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
8041        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
8042      fi
8043    fi
8044fi
8045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
8046$as_echo_n "checking what configuration name to use... " >&6; }
8047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
8048$as_echo "$CONF_NAME" >&6; }
8049
8050
8051  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8052
8053  # Input might be given as Windows format, start by converting to
8054  # unix format.
8055  path="$OUTPUT_ROOT"
8056  new_path=`$CYGPATH -u "$path"`
8057
8058  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8059  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8060  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8061  # "foo.exe" is OK but "foo" is an error.
8062  #
8063  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8064  # It is also a way to make sure we got the proper file name for the real test later on.
8065  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8066  if test "x$test_shortpath" = x; then
8067    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8068$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8069    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
8070  fi
8071
8072  # Call helper function which possibly converts this using DOS-style short mode.
8073  # If so, the updated path is stored in $new_path.
8074
8075  input_path="$new_path"
8076  # Check if we need to convert this using DOS-style short mode. If the path
8077  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8078  # take no chances and rewrite it.
8079  # Note: m4 eats our [], so we need to use [ and ] instead.
8080  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8081  if test "x$has_forbidden_chars" != x; then
8082    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8083    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8084    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8085    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8086      # Going to short mode and back again did indeed matter. Since short mode is
8087      # case insensitive, let's make it lowercase to improve readability.
8088      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8089      # Now convert it back to Unix-stile (cygpath)
8090      input_path=`$CYGPATH -u "$shortmode_path"`
8091      new_path="$input_path"
8092    fi
8093  fi
8094
8095  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8096  if test "x$test_cygdrive_prefix" = x; then
8097    # As a simple fix, exclude /usr/bin since it's not a real path.
8098    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
8099      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8100      # a path prefixed by /cygdrive for fixpath to work.
8101      new_path="$CYGWIN_ROOT_PATH$input_path"
8102    fi
8103  fi
8104
8105
8106  if test "x$path" != "x$new_path"; then
8107    OUTPUT_ROOT="$new_path"
8108    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8109$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8110  fi
8111
8112  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8113
8114  path="$OUTPUT_ROOT"
8115  has_colon=`$ECHO $path | $GREP ^.:`
8116  new_path="$path"
8117  if test "x$has_colon" = x; then
8118    # Not in mixed or Windows style, start by that.
8119    new_path=`cmd //c echo $path`
8120  fi
8121
8122
8123  input_path="$new_path"
8124  # Check if we need to convert this using DOS-style short mode. If the path
8125  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8126  # take no chances and rewrite it.
8127  # Note: m4 eats our [], so we need to use [ and ] instead.
8128  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8129  if test "x$has_forbidden_chars" != x; then
8130    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8131    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8132  fi
8133
8134
8135  windows_path="$new_path"
8136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8137    unix_path=`$CYGPATH -u "$windows_path"`
8138    new_path="$unix_path"
8139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8140    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8141    new_path="$unix_path"
8142  fi
8143
8144  if test "x$path" != "x$new_path"; then
8145    OUTPUT_ROOT="$new_path"
8146    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8147$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8148  fi
8149
8150  # Save the first 10 bytes of this path to the storage, so fixpath can work.
8151  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8152
8153  else
8154    # We're on a posix platform. Hooray! :)
8155    path="$OUTPUT_ROOT"
8156    has_space=`$ECHO "$path" | $GREP " "`
8157    if test "x$has_space" != x; then
8158      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8159$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8160      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8161    fi
8162
8163    # Use eval to expand a potential ~
8164    eval path="$path"
8165    if test ! -f "$path" && test ! -d "$path"; then
8166      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8167    fi
8168
8169    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
8170  fi
8171
8172
8173SPEC=$OUTPUT_ROOT/spec.gmk
8174
8175CONF_NAME=$CONF_NAME
8176
8177OUTPUT_ROOT=$OUTPUT_ROOT
8178
8179
8180# Most of the probed defines are put into config.h
8181ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8182
8183# The spec.gmk file contains all variables for the make system.
8184ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8185
8186# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8187ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8188
8189# The bootcycle-spec.gmk file contains support for boot cycle builds.
8190ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8191
8192# The compare.sh is used to compare the build output to other builds.
8193ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8194
8195# Spec.sh is currently used by compare-objects.sh
8196ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8197
8198# The generated Makefile knows where the spec.gmk is and where the source is.
8199# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8200# which will look for generated configurations
8201ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8202
8203
8204# Save the arguments given to us
8205echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8206
8207
8208# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8209
8210    for ac_prog in apt-get yum port pkgutil pkgadd
8211do
8212  # Extract the first word of "$ac_prog", so it can be a program name with args.
8213set dummy $ac_prog; ac_word=$2
8214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8215$as_echo_n "checking for $ac_word... " >&6; }
8216if ${ac_cv_prog_PKGHANDLER+:} false; then :
8217  $as_echo_n "(cached) " >&6
8218else
8219  if test -n "$PKGHANDLER"; then
8220  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8221else
8222as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8223for as_dir in $PATH
8224do
8225  IFS=$as_save_IFS
8226  test -z "$as_dir" && as_dir=.
8227    for ac_exec_ext in '' $ac_executable_extensions; do
8228  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8229    ac_cv_prog_PKGHANDLER="$ac_prog"
8230    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8231    break 2
8232  fi
8233done
8234  done
8235IFS=$as_save_IFS
8236
8237fi
8238fi
8239PKGHANDLER=$ac_cv_prog_PKGHANDLER
8240if test -n "$PKGHANDLER"; then
8241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8242$as_echo "$PKGHANDLER" >&6; }
8243else
8244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8245$as_echo "no" >&6; }
8246fi
8247
8248
8249  test -n "$PKGHANDLER" && break
8250done
8251
8252
8253
8254# Setup tools that requires more complex handling, or that is not needed by the configure script.
8255
8256
8257  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8258  if test "x$MAKE" != x; then
8259    # User has supplied a make, test it.
8260    if test ! -f "$MAKE"; then
8261      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8262    fi
8263
8264  MAKE_CANDIDATE=""$MAKE""
8265  DESCRIPTION="user supplied MAKE=$MAKE"
8266  if test "x$MAKE_CANDIDATE" != x; then
8267    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8268$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8269    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8270    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8271    if test "x$IS_GNU_MAKE" = x; then
8272      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8273$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8274    else
8275      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8276      if test "x$IS_MODERN_MAKE" = x; then
8277        { $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
8278$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;}
8279      else
8280        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8281          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8282            MAKE_EXPECTED_ENV='cygwin'
8283          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8284            MAKE_EXPECTED_ENV='msys'
8285          else
8286            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8287          fi
8288          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8289          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8290        else
8291          # Not relevant for non-Windows
8292          IS_MAKE_CORRECT_ENV=true
8293        fi
8294        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8295          { $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
8296$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;}
8297        else
8298          FOUND_MAKE=$MAKE_CANDIDATE
8299
8300  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8301
8302  # First separate the path from the arguments. This will split at the first
8303  # space.
8304  complete="$FOUND_MAKE"
8305  path="${complete%% *}"
8306  tmp="$complete EOL"
8307  arguments="${tmp#* }"
8308
8309  # Input might be given as Windows format, start by converting to
8310  # unix format.
8311  new_path=`$CYGPATH -u "$path"`
8312
8313  # Now try to locate executable using which
8314  new_path=`$WHICH "$new_path" 2> /dev/null`
8315  # bat and cmd files are not always considered executable in cygwin causing which
8316  # to not find them
8317  if test "x$new_path" = x \
8318           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8319           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8320    new_path=`$CYGPATH -u "$path"`
8321  fi
8322  if test "x$new_path" = x; then
8323    # Oops. Which didn't find the executable.
8324    # The splitting of arguments from the executable at a space might have been incorrect,
8325    # since paths with space are more likely in Windows. Give it another try with the whole
8326    # argument.
8327    path="$complete"
8328    arguments="EOL"
8329    new_path=`$CYGPATH -u "$path"`
8330    new_path=`$WHICH "$new_path" 2> /dev/null`
8331    # bat and cmd files are not always considered executable in cygwin causing which
8332    # to not find them
8333    if test "x$new_path" = x \
8334             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8335             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8336      new_path=`$CYGPATH -u "$path"`
8337    fi
8338    if test "x$new_path" = x; then
8339      # It's still not found. Now this is an unrecoverable error.
8340      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8341$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8342      has_space=`$ECHO "$complete" | $GREP " "`
8343      if test "x$has_space" != x; then
8344        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8345$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8346      fi
8347      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8348    fi
8349  fi
8350
8351  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8352  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8353  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8354  # "foo.exe" is OK but "foo" is an error.
8355  #
8356  # This test is therefore slightly more accurate than "test -f" to check for file presence.
8357  # It is also a way to make sure we got the proper file name for the real test later on.
8358  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8359  if test "x$test_shortpath" = x; then
8360    # Short path failed, file does not exist as specified.
8361    # Try adding .exe or .cmd
8362    if test -f "${new_path}.exe"; then
8363       input_to_shortpath="${new_path}.exe"
8364    elif test -f "${new_path}.cmd"; then
8365       input_to_shortpath="${new_path}.cmd"
8366    else
8367      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8368$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8369      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8370$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8371      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8372    fi
8373  else
8374    input_to_shortpath="$new_path"
8375  fi
8376
8377  # Call helper function which possibly converts this using DOS-style short mode.
8378  # If so, the updated path is stored in $new_path.
8379  new_path="$input_to_shortpath"
8380
8381  input_path="$input_to_shortpath"
8382  # Check if we need to convert this using DOS-style short mode. If the path
8383  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8384  # take no chances and rewrite it.
8385  # Note: m4 eats our [], so we need to use [ and ] instead.
8386  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8387  if test "x$has_forbidden_chars" != x; then
8388    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8389    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8390    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8391    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8392      # Going to short mode and back again did indeed matter. Since short mode is
8393      # case insensitive, let's make it lowercase to improve readability.
8394      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8395      # Now convert it back to Unix-stile (cygpath)
8396      input_path=`$CYGPATH -u "$shortmode_path"`
8397      new_path="$input_path"
8398    fi
8399  fi
8400
8401  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8402  if test "x$test_cygdrive_prefix" = x; then
8403    # As a simple fix, exclude /usr/bin since it's not a real path.
8404    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8405      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8406      # a path prefixed by /cygdrive for fixpath to work.
8407      new_path="$CYGWIN_ROOT_PATH$input_path"
8408    fi
8409  fi
8410
8411  # remove trailing .exe if any
8412  new_path="${new_path/%.exe/}"
8413
8414  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8415
8416  # First separate the path from the arguments. This will split at the first
8417  # space.
8418  complete="$FOUND_MAKE"
8419  path="${complete%% *}"
8420  tmp="$complete EOL"
8421  arguments="${tmp#* }"
8422
8423  # Input might be given as Windows format, start by converting to
8424  # unix format.
8425  new_path="$path"
8426
8427  windows_path="$new_path"
8428  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8429    unix_path=`$CYGPATH -u "$windows_path"`
8430    new_path="$unix_path"
8431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8432    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8433    new_path="$unix_path"
8434  fi
8435
8436
8437  # Now try to locate executable using which
8438  new_path=`$WHICH "$new_path" 2> /dev/null`
8439
8440  if test "x$new_path" = x; then
8441    # Oops. Which didn't find the executable.
8442    # The splitting of arguments from the executable at a space might have been incorrect,
8443    # since paths with space are more likely in Windows. Give it another try with the whole
8444    # argument.
8445    path="$complete"
8446    arguments="EOL"
8447    new_path="$path"
8448
8449  windows_path="$new_path"
8450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8451    unix_path=`$CYGPATH -u "$windows_path"`
8452    new_path="$unix_path"
8453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8454    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8455    new_path="$unix_path"
8456  fi
8457
8458
8459    new_path=`$WHICH "$new_path" 2> /dev/null`
8460
8461    if test "x$new_path" = x; then
8462      # It's still not found. Now this is an unrecoverable error.
8463      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8464$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8465      has_space=`$ECHO "$complete" | $GREP " "`
8466      if test "x$has_space" != x; then
8467        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8468$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8469      fi
8470      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8471    fi
8472  fi
8473
8474  # Now new_path has a complete unix path to the binary
8475  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8476    # Keep paths in /bin as-is, but remove trailing .exe if any
8477    new_path="${new_path/%.exe/}"
8478    # Do not save /bin paths to all_fixpath_prefixes!
8479  else
8480    # Not in mixed or Windows style, start by that.
8481    new_path=`cmd //c echo $new_path`
8482
8483  input_path="$new_path"
8484  # Check if we need to convert this using DOS-style short mode. If the path
8485  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8486  # take no chances and rewrite it.
8487  # Note: m4 eats our [], so we need to use [ and ] instead.
8488  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8489  if test "x$has_forbidden_chars" != x; then
8490    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8491    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8492  fi
8493
8494    # Output is in $new_path
8495
8496  windows_path="$new_path"
8497  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8498    unix_path=`$CYGPATH -u "$windows_path"`
8499    new_path="$unix_path"
8500  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8501    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8502    new_path="$unix_path"
8503  fi
8504
8505    # remove trailing .exe if any
8506    new_path="${new_path/%.exe/}"
8507
8508    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8509    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8510  fi
8511
8512  else
8513    # We're on a posix platform. Hooray! :)
8514    # First separate the path from the arguments. This will split at the first
8515    # space.
8516    complete="$FOUND_MAKE"
8517    path="${complete%% *}"
8518    tmp="$complete EOL"
8519    arguments="${tmp#* }"
8520
8521    # Cannot rely on the command "which" here since it doesn't always work.
8522    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8523    if test -z "$is_absolute_path"; then
8524      # Path to executable is not absolute. Find it.
8525      IFS_save="$IFS"
8526      IFS=:
8527      for p in $PATH; do
8528        if test -f "$p/$path" && test -x "$p/$path"; then
8529          new_path="$p/$path"
8530          break
8531        fi
8532      done
8533      IFS="$IFS_save"
8534    else
8535      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8536$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8537      new_path="$path"
8538    fi
8539
8540    if test "x$new_path" = x; then
8541        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8542$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8543        has_space=`$ECHO "$complete" | $GREP " "`
8544        if test "x$has_space" != x; then
8545          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8546$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8547        fi
8548        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8549      fi
8550  fi
8551
8552      # Now join together the path and the arguments once again
8553      if test "x$arguments" != xEOL; then
8554        new_complete="$new_path ${arguments% *}"
8555      else
8556        new_complete="$new_path"
8557      fi
8558
8559  if test "x$complete" != "x$new_complete"; then
8560      FOUND_MAKE="$new_complete"
8561      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8562$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8563    fi
8564
8565        fi
8566      fi
8567    fi
8568  fi
8569
8570    if test "x$FOUND_MAKE" = x; then
8571      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8572    fi
8573  else
8574    # Try our hardest to locate a correct version of GNU make
8575    for ac_prog in gmake
8576do
8577  # Extract the first word of "$ac_prog", so it can be a program name with args.
8578set dummy $ac_prog; ac_word=$2
8579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8580$as_echo_n "checking for $ac_word... " >&6; }
8581if ${ac_cv_path_CHECK_GMAKE+:} false; then :
8582  $as_echo_n "(cached) " >&6
8583else
8584  case $CHECK_GMAKE in
8585  [\\/]* | ?:[\\/]*)
8586  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8587  ;;
8588  *)
8589  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8590for as_dir in $PATH
8591do
8592  IFS=$as_save_IFS
8593  test -z "$as_dir" && as_dir=.
8594    for ac_exec_ext in '' $ac_executable_extensions; do
8595  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8596    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8597    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8598    break 2
8599  fi
8600done
8601  done
8602IFS=$as_save_IFS
8603
8604  ;;
8605esac
8606fi
8607CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8608if test -n "$CHECK_GMAKE"; then
8609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8610$as_echo "$CHECK_GMAKE" >&6; }
8611else
8612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8613$as_echo "no" >&6; }
8614fi
8615
8616
8617  test -n "$CHECK_GMAKE" && break
8618done
8619
8620
8621  MAKE_CANDIDATE=""$CHECK_GMAKE""
8622  DESCRIPTION="gmake in PATH"
8623  if test "x$MAKE_CANDIDATE" != x; then
8624    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8625$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8626    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8627    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8628    if test "x$IS_GNU_MAKE" = x; then
8629      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8630$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8631    else
8632      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8633      if test "x$IS_MODERN_MAKE" = x; then
8634        { $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
8635$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;}
8636      else
8637        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8638          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8639            MAKE_EXPECTED_ENV='cygwin'
8640          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8641            MAKE_EXPECTED_ENV='msys'
8642          else
8643            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8644          fi
8645          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8646          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8647        else
8648          # Not relevant for non-Windows
8649          IS_MAKE_CORRECT_ENV=true
8650        fi
8651        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8652          { $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
8653$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;}
8654        else
8655          FOUND_MAKE=$MAKE_CANDIDATE
8656
8657  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8658
8659  # First separate the path from the arguments. This will split at the first
8660  # space.
8661  complete="$FOUND_MAKE"
8662  path="${complete%% *}"
8663  tmp="$complete EOL"
8664  arguments="${tmp#* }"
8665
8666  # Input might be given as Windows format, start by converting to
8667  # unix format.
8668  new_path=`$CYGPATH -u "$path"`
8669
8670  # Now try to locate executable using which
8671  new_path=`$WHICH "$new_path" 2> /dev/null`
8672  # bat and cmd files are not always considered executable in cygwin causing which
8673  # to not find them
8674  if test "x$new_path" = x \
8675           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8676           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8677    new_path=`$CYGPATH -u "$path"`
8678  fi
8679  if test "x$new_path" = x; then
8680    # Oops. Which didn't find the executable.
8681    # The splitting of arguments from the executable at a space might have been incorrect,
8682    # since paths with space are more likely in Windows. Give it another try with the whole
8683    # argument.
8684    path="$complete"
8685    arguments="EOL"
8686    new_path=`$CYGPATH -u "$path"`
8687    new_path=`$WHICH "$new_path" 2> /dev/null`
8688    # bat and cmd files are not always considered executable in cygwin causing which
8689    # to not find them
8690    if test "x$new_path" = x \
8691             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8692             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8693      new_path=`$CYGPATH -u "$path"`
8694    fi
8695    if test "x$new_path" = x; then
8696      # It's still not found. Now this is an unrecoverable error.
8697      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8698$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8699      has_space=`$ECHO "$complete" | $GREP " "`
8700      if test "x$has_space" != x; then
8701        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8702$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8703      fi
8704      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8705    fi
8706  fi
8707
8708  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8709  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8710  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8711  # "foo.exe" is OK but "foo" is an error.
8712  #
8713  # This test is therefore slightly more accurate than "test -f" to check for file presence.
8714  # It is also a way to make sure we got the proper file name for the real test later on.
8715  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8716  if test "x$test_shortpath" = x; then
8717    # Short path failed, file does not exist as specified.
8718    # Try adding .exe or .cmd
8719    if test -f "${new_path}.exe"; then
8720       input_to_shortpath="${new_path}.exe"
8721    elif test -f "${new_path}.cmd"; then
8722       input_to_shortpath="${new_path}.cmd"
8723    else
8724      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8725$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8726      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8727$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8728      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8729    fi
8730  else
8731    input_to_shortpath="$new_path"
8732  fi
8733
8734  # Call helper function which possibly converts this using DOS-style short mode.
8735  # If so, the updated path is stored in $new_path.
8736  new_path="$input_to_shortpath"
8737
8738  input_path="$input_to_shortpath"
8739  # Check if we need to convert this using DOS-style short mode. If the path
8740  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8741  # take no chances and rewrite it.
8742  # Note: m4 eats our [], so we need to use [ and ] instead.
8743  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8744  if test "x$has_forbidden_chars" != x; then
8745    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8746    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8747    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8748    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8749      # Going to short mode and back again did indeed matter. Since short mode is
8750      # case insensitive, let's make it lowercase to improve readability.
8751      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8752      # Now convert it back to Unix-stile (cygpath)
8753      input_path=`$CYGPATH -u "$shortmode_path"`
8754      new_path="$input_path"
8755    fi
8756  fi
8757
8758  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8759  if test "x$test_cygdrive_prefix" = x; then
8760    # As a simple fix, exclude /usr/bin since it's not a real path.
8761    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8762      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8763      # a path prefixed by /cygdrive for fixpath to work.
8764      new_path="$CYGWIN_ROOT_PATH$input_path"
8765    fi
8766  fi
8767
8768  # remove trailing .exe if any
8769  new_path="${new_path/%.exe/}"
8770
8771  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8772
8773  # First separate the path from the arguments. This will split at the first
8774  # space.
8775  complete="$FOUND_MAKE"
8776  path="${complete%% *}"
8777  tmp="$complete EOL"
8778  arguments="${tmp#* }"
8779
8780  # Input might be given as Windows format, start by converting to
8781  # unix format.
8782  new_path="$path"
8783
8784  windows_path="$new_path"
8785  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8786    unix_path=`$CYGPATH -u "$windows_path"`
8787    new_path="$unix_path"
8788  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8789    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8790    new_path="$unix_path"
8791  fi
8792
8793
8794  # Now try to locate executable using which
8795  new_path=`$WHICH "$new_path" 2> /dev/null`
8796
8797  if test "x$new_path" = x; then
8798    # Oops. Which didn't find the executable.
8799    # The splitting of arguments from the executable at a space might have been incorrect,
8800    # since paths with space are more likely in Windows. Give it another try with the whole
8801    # argument.
8802    path="$complete"
8803    arguments="EOL"
8804    new_path="$path"
8805
8806  windows_path="$new_path"
8807  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8808    unix_path=`$CYGPATH -u "$windows_path"`
8809    new_path="$unix_path"
8810  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8811    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8812    new_path="$unix_path"
8813  fi
8814
8815
8816    new_path=`$WHICH "$new_path" 2> /dev/null`
8817
8818    if test "x$new_path" = x; then
8819      # It's still not found. Now this is an unrecoverable error.
8820      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8821$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8822      has_space=`$ECHO "$complete" | $GREP " "`
8823      if test "x$has_space" != x; then
8824        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8825$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8826      fi
8827      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8828    fi
8829  fi
8830
8831  # Now new_path has a complete unix path to the binary
8832  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8833    # Keep paths in /bin as-is, but remove trailing .exe if any
8834    new_path="${new_path/%.exe/}"
8835    # Do not save /bin paths to all_fixpath_prefixes!
8836  else
8837    # Not in mixed or Windows style, start by that.
8838    new_path=`cmd //c echo $new_path`
8839
8840  input_path="$new_path"
8841  # Check if we need to convert this using DOS-style short mode. If the path
8842  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8843  # take no chances and rewrite it.
8844  # Note: m4 eats our [], so we need to use [ and ] instead.
8845  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8846  if test "x$has_forbidden_chars" != x; then
8847    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8848    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8849  fi
8850
8851    # Output is in $new_path
8852
8853  windows_path="$new_path"
8854  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8855    unix_path=`$CYGPATH -u "$windows_path"`
8856    new_path="$unix_path"
8857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8858    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8859    new_path="$unix_path"
8860  fi
8861
8862    # remove trailing .exe if any
8863    new_path="${new_path/%.exe/}"
8864
8865    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8866    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8867  fi
8868
8869  else
8870    # We're on a posix platform. Hooray! :)
8871    # First separate the path from the arguments. This will split at the first
8872    # space.
8873    complete="$FOUND_MAKE"
8874    path="${complete%% *}"
8875    tmp="$complete EOL"
8876    arguments="${tmp#* }"
8877
8878    # Cannot rely on the command "which" here since it doesn't always work.
8879    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8880    if test -z "$is_absolute_path"; then
8881      # Path to executable is not absolute. Find it.
8882      IFS_save="$IFS"
8883      IFS=:
8884      for p in $PATH; do
8885        if test -f "$p/$path" && test -x "$p/$path"; then
8886          new_path="$p/$path"
8887          break
8888        fi
8889      done
8890      IFS="$IFS_save"
8891    else
8892      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8893$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8894      new_path="$path"
8895    fi
8896
8897    if test "x$new_path" = x; then
8898        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8899$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8900        has_space=`$ECHO "$complete" | $GREP " "`
8901        if test "x$has_space" != x; then
8902          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8903$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8904        fi
8905        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8906      fi
8907  fi
8908
8909      # Now join together the path and the arguments once again
8910      if test "x$arguments" != xEOL; then
8911        new_complete="$new_path ${arguments% *}"
8912      else
8913        new_complete="$new_path"
8914      fi
8915
8916  if test "x$complete" != "x$new_complete"; then
8917      FOUND_MAKE="$new_complete"
8918      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8919$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8920    fi
8921
8922        fi
8923      fi
8924    fi
8925  fi
8926
8927
8928    if test "x$FOUND_MAKE" = x; then
8929      for ac_prog in make
8930do
8931  # Extract the first word of "$ac_prog", so it can be a program name with args.
8932set dummy $ac_prog; ac_word=$2
8933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8934$as_echo_n "checking for $ac_word... " >&6; }
8935if ${ac_cv_path_CHECK_MAKE+:} false; then :
8936  $as_echo_n "(cached) " >&6
8937else
8938  case $CHECK_MAKE in
8939  [\\/]* | ?:[\\/]*)
8940  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8941  ;;
8942  *)
8943  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8944for as_dir in $PATH
8945do
8946  IFS=$as_save_IFS
8947  test -z "$as_dir" && as_dir=.
8948    for ac_exec_ext in '' $ac_executable_extensions; do
8949  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8950    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8951    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8952    break 2
8953  fi
8954done
8955  done
8956IFS=$as_save_IFS
8957
8958  ;;
8959esac
8960fi
8961CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8962if test -n "$CHECK_MAKE"; then
8963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8964$as_echo "$CHECK_MAKE" >&6; }
8965else
8966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8967$as_echo "no" >&6; }
8968fi
8969
8970
8971  test -n "$CHECK_MAKE" && break
8972done
8973
8974
8975  MAKE_CANDIDATE=""$CHECK_MAKE""
8976  DESCRIPTION="make in PATH"
8977  if test "x$MAKE_CANDIDATE" != x; then
8978    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8979$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8980    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8981    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8982    if test "x$IS_GNU_MAKE" = x; then
8983      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8984$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8985    else
8986      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8987      if test "x$IS_MODERN_MAKE" = x; then
8988        { $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
8989$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;}
8990      else
8991        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8992          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8993            MAKE_EXPECTED_ENV='cygwin'
8994          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8995            MAKE_EXPECTED_ENV='msys'
8996          else
8997            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8998          fi
8999          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9000          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9001        else
9002          # Not relevant for non-Windows
9003          IS_MAKE_CORRECT_ENV=true
9004        fi
9005        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9006          { $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
9007$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;}
9008        else
9009          FOUND_MAKE=$MAKE_CANDIDATE
9010
9011  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9012
9013  # First separate the path from the arguments. This will split at the first
9014  # space.
9015  complete="$FOUND_MAKE"
9016  path="${complete%% *}"
9017  tmp="$complete EOL"
9018  arguments="${tmp#* }"
9019
9020  # Input might be given as Windows format, start by converting to
9021  # unix format.
9022  new_path=`$CYGPATH -u "$path"`
9023
9024  # Now try to locate executable using which
9025  new_path=`$WHICH "$new_path" 2> /dev/null`
9026  # bat and cmd files are not always considered executable in cygwin causing which
9027  # to not find them
9028  if test "x$new_path" = x \
9029           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9030           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9031    new_path=`$CYGPATH -u "$path"`
9032  fi
9033  if test "x$new_path" = x; then
9034    # Oops. Which didn't find the executable.
9035    # The splitting of arguments from the executable at a space might have been incorrect,
9036    # since paths with space are more likely in Windows. Give it another try with the whole
9037    # argument.
9038    path="$complete"
9039    arguments="EOL"
9040    new_path=`$CYGPATH -u "$path"`
9041    new_path=`$WHICH "$new_path" 2> /dev/null`
9042    # bat and cmd files are not always considered executable in cygwin causing which
9043    # to not find them
9044    if test "x$new_path" = x \
9045             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9046             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9047      new_path=`$CYGPATH -u "$path"`
9048    fi
9049    if test "x$new_path" = x; then
9050      # It's still not found. Now this is an unrecoverable error.
9051      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9052$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9053      has_space=`$ECHO "$complete" | $GREP " "`
9054      if test "x$has_space" != x; then
9055        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9056$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9057      fi
9058      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9059    fi
9060  fi
9061
9062  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9063  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9064  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9065  # "foo.exe" is OK but "foo" is an error.
9066  #
9067  # This test is therefore slightly more accurate than "test -f" to check for file presence.
9068  # It is also a way to make sure we got the proper file name for the real test later on.
9069  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9070  if test "x$test_shortpath" = x; then
9071    # Short path failed, file does not exist as specified.
9072    # Try adding .exe or .cmd
9073    if test -f "${new_path}.exe"; then
9074       input_to_shortpath="${new_path}.exe"
9075    elif test -f "${new_path}.cmd"; then
9076       input_to_shortpath="${new_path}.cmd"
9077    else
9078      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9079$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9080      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9081$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9082      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9083    fi
9084  else
9085    input_to_shortpath="$new_path"
9086  fi
9087
9088  # Call helper function which possibly converts this using DOS-style short mode.
9089  # If so, the updated path is stored in $new_path.
9090  new_path="$input_to_shortpath"
9091
9092  input_path="$input_to_shortpath"
9093  # Check if we need to convert this using DOS-style short mode. If the path
9094  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9095  # take no chances and rewrite it.
9096  # Note: m4 eats our [], so we need to use [ and ] instead.
9097  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9098  if test "x$has_forbidden_chars" != x; then
9099    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9100    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9101    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9102    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9103      # Going to short mode and back again did indeed matter. Since short mode is
9104      # case insensitive, let's make it lowercase to improve readability.
9105      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9106      # Now convert it back to Unix-stile (cygpath)
9107      input_path=`$CYGPATH -u "$shortmode_path"`
9108      new_path="$input_path"
9109    fi
9110  fi
9111
9112  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9113  if test "x$test_cygdrive_prefix" = x; then
9114    # As a simple fix, exclude /usr/bin since it's not a real path.
9115    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9116      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9117      # a path prefixed by /cygdrive for fixpath to work.
9118      new_path="$CYGWIN_ROOT_PATH$input_path"
9119    fi
9120  fi
9121
9122  # remove trailing .exe if any
9123  new_path="${new_path/%.exe/}"
9124
9125  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9126
9127  # First separate the path from the arguments. This will split at the first
9128  # space.
9129  complete="$FOUND_MAKE"
9130  path="${complete%% *}"
9131  tmp="$complete EOL"
9132  arguments="${tmp#* }"
9133
9134  # Input might be given as Windows format, start by converting to
9135  # unix format.
9136  new_path="$path"
9137
9138  windows_path="$new_path"
9139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9140    unix_path=`$CYGPATH -u "$windows_path"`
9141    new_path="$unix_path"
9142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9143    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9144    new_path="$unix_path"
9145  fi
9146
9147
9148  # Now try to locate executable using which
9149  new_path=`$WHICH "$new_path" 2> /dev/null`
9150
9151  if test "x$new_path" = x; then
9152    # Oops. Which didn't find the executable.
9153    # The splitting of arguments from the executable at a space might have been incorrect,
9154    # since paths with space are more likely in Windows. Give it another try with the whole
9155    # argument.
9156    path="$complete"
9157    arguments="EOL"
9158    new_path="$path"
9159
9160  windows_path="$new_path"
9161  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9162    unix_path=`$CYGPATH -u "$windows_path"`
9163    new_path="$unix_path"
9164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9165    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9166    new_path="$unix_path"
9167  fi
9168
9169
9170    new_path=`$WHICH "$new_path" 2> /dev/null`
9171
9172    if test "x$new_path" = x; then
9173      # It's still not found. Now this is an unrecoverable error.
9174      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9175$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9176      has_space=`$ECHO "$complete" | $GREP " "`
9177      if test "x$has_space" != x; then
9178        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9179$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9180      fi
9181      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9182    fi
9183  fi
9184
9185  # Now new_path has a complete unix path to the binary
9186  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9187    # Keep paths in /bin as-is, but remove trailing .exe if any
9188    new_path="${new_path/%.exe/}"
9189    # Do not save /bin paths to all_fixpath_prefixes!
9190  else
9191    # Not in mixed or Windows style, start by that.
9192    new_path=`cmd //c echo $new_path`
9193
9194  input_path="$new_path"
9195  # Check if we need to convert this using DOS-style short mode. If the path
9196  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9197  # take no chances and rewrite it.
9198  # Note: m4 eats our [], so we need to use [ and ] instead.
9199  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9200  if test "x$has_forbidden_chars" != x; then
9201    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9202    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9203  fi
9204
9205    # Output is in $new_path
9206
9207  windows_path="$new_path"
9208  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9209    unix_path=`$CYGPATH -u "$windows_path"`
9210    new_path="$unix_path"
9211  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9212    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9213    new_path="$unix_path"
9214  fi
9215
9216    # remove trailing .exe if any
9217    new_path="${new_path/%.exe/}"
9218
9219    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9220    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9221  fi
9222
9223  else
9224    # We're on a posix platform. Hooray! :)
9225    # First separate the path from the arguments. This will split at the first
9226    # space.
9227    complete="$FOUND_MAKE"
9228    path="${complete%% *}"
9229    tmp="$complete EOL"
9230    arguments="${tmp#* }"
9231
9232    # Cannot rely on the command "which" here since it doesn't always work.
9233    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9234    if test -z "$is_absolute_path"; then
9235      # Path to executable is not absolute. Find it.
9236      IFS_save="$IFS"
9237      IFS=:
9238      for p in $PATH; do
9239        if test -f "$p/$path" && test -x "$p/$path"; then
9240          new_path="$p/$path"
9241          break
9242        fi
9243      done
9244      IFS="$IFS_save"
9245    else
9246      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9247$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9248      new_path="$path"
9249    fi
9250
9251    if test "x$new_path" = x; then
9252        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9253$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9254        has_space=`$ECHO "$complete" | $GREP " "`
9255        if test "x$has_space" != x; then
9256          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9257$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9258        fi
9259        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9260      fi
9261  fi
9262
9263      # Now join together the path and the arguments once again
9264      if test "x$arguments" != xEOL; then
9265        new_complete="$new_path ${arguments% *}"
9266      else
9267        new_complete="$new_path"
9268      fi
9269
9270  if test "x$complete" != "x$new_complete"; then
9271      FOUND_MAKE="$new_complete"
9272      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9273$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9274    fi
9275
9276        fi
9277      fi
9278    fi
9279  fi
9280
9281    fi
9282
9283    if test "x$FOUND_MAKE" = x; then
9284      if test "x$TOOLS_DIR" != x; then
9285        # We have a tools-dir, check that as well before giving up.
9286        OLD_PATH=$PATH
9287        PATH=$TOOLS_DIR:$PATH
9288        for ac_prog in gmake
9289do
9290  # Extract the first word of "$ac_prog", so it can be a program name with args.
9291set dummy $ac_prog; ac_word=$2
9292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9293$as_echo_n "checking for $ac_word... " >&6; }
9294if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
9295  $as_echo_n "(cached) " >&6
9296else
9297  case $CHECK_TOOLSDIR_GMAKE in
9298  [\\/]* | ?:[\\/]*)
9299  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9300  ;;
9301  *)
9302  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9303for as_dir in $PATH
9304do
9305  IFS=$as_save_IFS
9306  test -z "$as_dir" && as_dir=.
9307    for ac_exec_ext in '' $ac_executable_extensions; do
9308  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9309    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9310    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9311    break 2
9312  fi
9313done
9314  done
9315IFS=$as_save_IFS
9316
9317  ;;
9318esac
9319fi
9320CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9321if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9323$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9324else
9325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9326$as_echo "no" >&6; }
9327fi
9328
9329
9330  test -n "$CHECK_TOOLSDIR_GMAKE" && break
9331done
9332
9333
9334  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9335  DESCRIPTION="gmake in tools-dir"
9336  if test "x$MAKE_CANDIDATE" != x; then
9337    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9338$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9339    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9340    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9341    if test "x$IS_GNU_MAKE" = x; then
9342      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9343$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9344    else
9345      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9346      if test "x$IS_MODERN_MAKE" = x; then
9347        { $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
9348$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;}
9349      else
9350        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9351          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9352            MAKE_EXPECTED_ENV='cygwin'
9353          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9354            MAKE_EXPECTED_ENV='msys'
9355          else
9356            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9357          fi
9358          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9359          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9360        else
9361          # Not relevant for non-Windows
9362          IS_MAKE_CORRECT_ENV=true
9363        fi
9364        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9365          { $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
9366$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;}
9367        else
9368          FOUND_MAKE=$MAKE_CANDIDATE
9369
9370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9371
9372  # First separate the path from the arguments. This will split at the first
9373  # space.
9374  complete="$FOUND_MAKE"
9375  path="${complete%% *}"
9376  tmp="$complete EOL"
9377  arguments="${tmp#* }"
9378
9379  # Input might be given as Windows format, start by converting to
9380  # unix format.
9381  new_path=`$CYGPATH -u "$path"`
9382
9383  # Now try to locate executable using which
9384  new_path=`$WHICH "$new_path" 2> /dev/null`
9385  # bat and cmd files are not always considered executable in cygwin causing which
9386  # to not find them
9387  if test "x$new_path" = x \
9388           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9389           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9390    new_path=`$CYGPATH -u "$path"`
9391  fi
9392  if test "x$new_path" = x; then
9393    # Oops. Which didn't find the executable.
9394    # The splitting of arguments from the executable at a space might have been incorrect,
9395    # since paths with space are more likely in Windows. Give it another try with the whole
9396    # argument.
9397    path="$complete"
9398    arguments="EOL"
9399    new_path=`$CYGPATH -u "$path"`
9400    new_path=`$WHICH "$new_path" 2> /dev/null`
9401    # bat and cmd files are not always considered executable in cygwin causing which
9402    # to not find them
9403    if test "x$new_path" = x \
9404             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9405             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9406      new_path=`$CYGPATH -u "$path"`
9407    fi
9408    if test "x$new_path" = x; then
9409      # It's still not found. Now this is an unrecoverable error.
9410      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9411$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9412      has_space=`$ECHO "$complete" | $GREP " "`
9413      if test "x$has_space" != x; then
9414        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9415$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9416      fi
9417      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9418    fi
9419  fi
9420
9421  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9422  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9423  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9424  # "foo.exe" is OK but "foo" is an error.
9425  #
9426  # This test is therefore slightly more accurate than "test -f" to check for file presence.
9427  # It is also a way to make sure we got the proper file name for the real test later on.
9428  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9429  if test "x$test_shortpath" = x; then
9430    # Short path failed, file does not exist as specified.
9431    # Try adding .exe or .cmd
9432    if test -f "${new_path}.exe"; then
9433       input_to_shortpath="${new_path}.exe"
9434    elif test -f "${new_path}.cmd"; then
9435       input_to_shortpath="${new_path}.cmd"
9436    else
9437      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9438$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9439      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9440$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9441      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9442    fi
9443  else
9444    input_to_shortpath="$new_path"
9445  fi
9446
9447  # Call helper function which possibly converts this using DOS-style short mode.
9448  # If so, the updated path is stored in $new_path.
9449  new_path="$input_to_shortpath"
9450
9451  input_path="$input_to_shortpath"
9452  # Check if we need to convert this using DOS-style short mode. If the path
9453  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9454  # take no chances and rewrite it.
9455  # Note: m4 eats our [], so we need to use [ and ] instead.
9456  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9457  if test "x$has_forbidden_chars" != x; then
9458    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9459    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9460    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9461    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9462      # Going to short mode and back again did indeed matter. Since short mode is
9463      # case insensitive, let's make it lowercase to improve readability.
9464      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9465      # Now convert it back to Unix-stile (cygpath)
9466      input_path=`$CYGPATH -u "$shortmode_path"`
9467      new_path="$input_path"
9468    fi
9469  fi
9470
9471  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9472  if test "x$test_cygdrive_prefix" = x; then
9473    # As a simple fix, exclude /usr/bin since it's not a real path.
9474    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9475      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9476      # a path prefixed by /cygdrive for fixpath to work.
9477      new_path="$CYGWIN_ROOT_PATH$input_path"
9478    fi
9479  fi
9480
9481  # remove trailing .exe if any
9482  new_path="${new_path/%.exe/}"
9483
9484  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9485
9486  # First separate the path from the arguments. This will split at the first
9487  # space.
9488  complete="$FOUND_MAKE"
9489  path="${complete%% *}"
9490  tmp="$complete EOL"
9491  arguments="${tmp#* }"
9492
9493  # Input might be given as Windows format, start by converting to
9494  # unix format.
9495  new_path="$path"
9496
9497  windows_path="$new_path"
9498  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9499    unix_path=`$CYGPATH -u "$windows_path"`
9500    new_path="$unix_path"
9501  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9502    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9503    new_path="$unix_path"
9504  fi
9505
9506
9507  # Now try to locate executable using which
9508  new_path=`$WHICH "$new_path" 2> /dev/null`
9509
9510  if test "x$new_path" = x; then
9511    # Oops. Which didn't find the executable.
9512    # The splitting of arguments from the executable at a space might have been incorrect,
9513    # since paths with space are more likely in Windows. Give it another try with the whole
9514    # argument.
9515    path="$complete"
9516    arguments="EOL"
9517    new_path="$path"
9518
9519  windows_path="$new_path"
9520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9521    unix_path=`$CYGPATH -u "$windows_path"`
9522    new_path="$unix_path"
9523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9524    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9525    new_path="$unix_path"
9526  fi
9527
9528
9529    new_path=`$WHICH "$new_path" 2> /dev/null`
9530
9531    if test "x$new_path" = x; then
9532      # It's still not found. Now this is an unrecoverable error.
9533      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9534$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9535      has_space=`$ECHO "$complete" | $GREP " "`
9536      if test "x$has_space" != x; then
9537        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9538$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9539      fi
9540      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9541    fi
9542  fi
9543
9544  # Now new_path has a complete unix path to the binary
9545  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9546    # Keep paths in /bin as-is, but remove trailing .exe if any
9547    new_path="${new_path/%.exe/}"
9548    # Do not save /bin paths to all_fixpath_prefixes!
9549  else
9550    # Not in mixed or Windows style, start by that.
9551    new_path=`cmd //c echo $new_path`
9552
9553  input_path="$new_path"
9554  # Check if we need to convert this using DOS-style short mode. If the path
9555  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9556  # take no chances and rewrite it.
9557  # Note: m4 eats our [], so we need to use [ and ] instead.
9558  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9559  if test "x$has_forbidden_chars" != x; then
9560    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9561    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9562  fi
9563
9564    # Output is in $new_path
9565
9566  windows_path="$new_path"
9567  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9568    unix_path=`$CYGPATH -u "$windows_path"`
9569    new_path="$unix_path"
9570  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9571    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9572    new_path="$unix_path"
9573  fi
9574
9575    # remove trailing .exe if any
9576    new_path="${new_path/%.exe/}"
9577
9578    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9579    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9580  fi
9581
9582  else
9583    # We're on a posix platform. Hooray! :)
9584    # First separate the path from the arguments. This will split at the first
9585    # space.
9586    complete="$FOUND_MAKE"
9587    path="${complete%% *}"
9588    tmp="$complete EOL"
9589    arguments="${tmp#* }"
9590
9591    # Cannot rely on the command "which" here since it doesn't always work.
9592    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9593    if test -z "$is_absolute_path"; then
9594      # Path to executable is not absolute. Find it.
9595      IFS_save="$IFS"
9596      IFS=:
9597      for p in $PATH; do
9598        if test -f "$p/$path" && test -x "$p/$path"; then
9599          new_path="$p/$path"
9600          break
9601        fi
9602      done
9603      IFS="$IFS_save"
9604    else
9605      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9606$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9607      new_path="$path"
9608    fi
9609
9610    if test "x$new_path" = x; then
9611        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9612$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9613        has_space=`$ECHO "$complete" | $GREP " "`
9614        if test "x$has_space" != x; then
9615          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9616$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9617        fi
9618        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9619      fi
9620  fi
9621
9622      # Now join together the path and the arguments once again
9623      if test "x$arguments" != xEOL; then
9624        new_complete="$new_path ${arguments% *}"
9625      else
9626        new_complete="$new_path"
9627      fi
9628
9629  if test "x$complete" != "x$new_complete"; then
9630      FOUND_MAKE="$new_complete"
9631      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9632$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9633    fi
9634
9635        fi
9636      fi
9637    fi
9638  fi
9639
9640        if test "x$FOUND_MAKE" = x; then
9641          for ac_prog in make
9642do
9643  # Extract the first word of "$ac_prog", so it can be a program name with args.
9644set dummy $ac_prog; ac_word=$2
9645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9646$as_echo_n "checking for $ac_word... " >&6; }
9647if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
9648  $as_echo_n "(cached) " >&6
9649else
9650  case $CHECK_TOOLSDIR_MAKE in
9651  [\\/]* | ?:[\\/]*)
9652  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9653  ;;
9654  *)
9655  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9656for as_dir in $PATH
9657do
9658  IFS=$as_save_IFS
9659  test -z "$as_dir" && as_dir=.
9660    for ac_exec_ext in '' $ac_executable_extensions; do
9661  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9662    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9663    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9664    break 2
9665  fi
9666done
9667  done
9668IFS=$as_save_IFS
9669
9670  ;;
9671esac
9672fi
9673CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9674if test -n "$CHECK_TOOLSDIR_MAKE"; then
9675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9676$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9677else
9678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9679$as_echo "no" >&6; }
9680fi
9681
9682
9683  test -n "$CHECK_TOOLSDIR_MAKE" && break
9684done
9685
9686
9687  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9688  DESCRIPTION="make in tools-dir"
9689  if test "x$MAKE_CANDIDATE" != x; then
9690    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9691$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9692    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9693    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9694    if test "x$IS_GNU_MAKE" = x; then
9695      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9696$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9697    else
9698      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9699      if test "x$IS_MODERN_MAKE" = x; then
9700        { $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
9701$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;}
9702      else
9703        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9704          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9705            MAKE_EXPECTED_ENV='cygwin'
9706          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9707            MAKE_EXPECTED_ENV='msys'
9708          else
9709            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9710          fi
9711          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9712          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9713        else
9714          # Not relevant for non-Windows
9715          IS_MAKE_CORRECT_ENV=true
9716        fi
9717        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9718          { $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
9719$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;}
9720        else
9721          FOUND_MAKE=$MAKE_CANDIDATE
9722
9723  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9724
9725  # First separate the path from the arguments. This will split at the first
9726  # space.
9727  complete="$FOUND_MAKE"
9728  path="${complete%% *}"
9729  tmp="$complete EOL"
9730  arguments="${tmp#* }"
9731
9732  # Input might be given as Windows format, start by converting to
9733  # unix format.
9734  new_path=`$CYGPATH -u "$path"`
9735
9736  # Now try to locate executable using which
9737  new_path=`$WHICH "$new_path" 2> /dev/null`
9738  # bat and cmd files are not always considered executable in cygwin causing which
9739  # to not find them
9740  if test "x$new_path" = x \
9741           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9742           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9743    new_path=`$CYGPATH -u "$path"`
9744  fi
9745  if test "x$new_path" = x; then
9746    # Oops. Which didn't find the executable.
9747    # The splitting of arguments from the executable at a space might have been incorrect,
9748    # since paths with space are more likely in Windows. Give it another try with the whole
9749    # argument.
9750    path="$complete"
9751    arguments="EOL"
9752    new_path=`$CYGPATH -u "$path"`
9753    new_path=`$WHICH "$new_path" 2> /dev/null`
9754    # bat and cmd files are not always considered executable in cygwin causing which
9755    # to not find them
9756    if test "x$new_path" = x \
9757             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9758             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9759      new_path=`$CYGPATH -u "$path"`
9760    fi
9761    if test "x$new_path" = x; then
9762      # It's still not found. Now this is an unrecoverable error.
9763      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9764$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9765      has_space=`$ECHO "$complete" | $GREP " "`
9766      if test "x$has_space" != x; then
9767        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9768$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9769      fi
9770      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9771    fi
9772  fi
9773
9774  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9775  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9776  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9777  # "foo.exe" is OK but "foo" is an error.
9778  #
9779  # This test is therefore slightly more accurate than "test -f" to check for file presence.
9780  # It is also a way to make sure we got the proper file name for the real test later on.
9781  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9782  if test "x$test_shortpath" = x; then
9783    # Short path failed, file does not exist as specified.
9784    # Try adding .exe or .cmd
9785    if test -f "${new_path}.exe"; then
9786       input_to_shortpath="${new_path}.exe"
9787    elif test -f "${new_path}.cmd"; then
9788       input_to_shortpath="${new_path}.cmd"
9789    else
9790      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9791$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9792      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9793$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9794      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9795    fi
9796  else
9797    input_to_shortpath="$new_path"
9798  fi
9799
9800  # Call helper function which possibly converts this using DOS-style short mode.
9801  # If so, the updated path is stored in $new_path.
9802  new_path="$input_to_shortpath"
9803
9804  input_path="$input_to_shortpath"
9805  # Check if we need to convert this using DOS-style short mode. If the path
9806  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9807  # take no chances and rewrite it.
9808  # Note: m4 eats our [], so we need to use [ and ] instead.
9809  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9810  if test "x$has_forbidden_chars" != x; then
9811    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9812    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9813    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9814    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9815      # Going to short mode and back again did indeed matter. Since short mode is
9816      # case insensitive, let's make it lowercase to improve readability.
9817      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9818      # Now convert it back to Unix-stile (cygpath)
9819      input_path=`$CYGPATH -u "$shortmode_path"`
9820      new_path="$input_path"
9821    fi
9822  fi
9823
9824  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9825  if test "x$test_cygdrive_prefix" = x; then
9826    # As a simple fix, exclude /usr/bin since it's not a real path.
9827    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9828      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9829      # a path prefixed by /cygdrive for fixpath to work.
9830      new_path="$CYGWIN_ROOT_PATH$input_path"
9831    fi
9832  fi
9833
9834  # remove trailing .exe if any
9835  new_path="${new_path/%.exe/}"
9836
9837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9838
9839  # First separate the path from the arguments. This will split at the first
9840  # space.
9841  complete="$FOUND_MAKE"
9842  path="${complete%% *}"
9843  tmp="$complete EOL"
9844  arguments="${tmp#* }"
9845
9846  # Input might be given as Windows format, start by converting to
9847  # unix format.
9848  new_path="$path"
9849
9850  windows_path="$new_path"
9851  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9852    unix_path=`$CYGPATH -u "$windows_path"`
9853    new_path="$unix_path"
9854  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9855    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9856    new_path="$unix_path"
9857  fi
9858
9859
9860  # Now try to locate executable using which
9861  new_path=`$WHICH "$new_path" 2> /dev/null`
9862
9863  if test "x$new_path" = x; then
9864    # Oops. Which didn't find the executable.
9865    # The splitting of arguments from the executable at a space might have been incorrect,
9866    # since paths with space are more likely in Windows. Give it another try with the whole
9867    # argument.
9868    path="$complete"
9869    arguments="EOL"
9870    new_path="$path"
9871
9872  windows_path="$new_path"
9873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9874    unix_path=`$CYGPATH -u "$windows_path"`
9875    new_path="$unix_path"
9876  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9877    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9878    new_path="$unix_path"
9879  fi
9880
9881
9882    new_path=`$WHICH "$new_path" 2> /dev/null`
9883
9884    if test "x$new_path" = x; then
9885      # It's still not found. Now this is an unrecoverable error.
9886      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9887$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9888      has_space=`$ECHO "$complete" | $GREP " "`
9889      if test "x$has_space" != x; then
9890        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9891$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9892      fi
9893      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9894    fi
9895  fi
9896
9897  # Now new_path has a complete unix path to the binary
9898  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9899    # Keep paths in /bin as-is, but remove trailing .exe if any
9900    new_path="${new_path/%.exe/}"
9901    # Do not save /bin paths to all_fixpath_prefixes!
9902  else
9903    # Not in mixed or Windows style, start by that.
9904    new_path=`cmd //c echo $new_path`
9905
9906  input_path="$new_path"
9907  # Check if we need to convert this using DOS-style short mode. If the path
9908  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9909  # take no chances and rewrite it.
9910  # Note: m4 eats our [], so we need to use [ and ] instead.
9911  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9912  if test "x$has_forbidden_chars" != x; then
9913    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9914    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9915  fi
9916
9917    # Output is in $new_path
9918
9919  windows_path="$new_path"
9920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9921    unix_path=`$CYGPATH -u "$windows_path"`
9922    new_path="$unix_path"
9923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9924    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9925    new_path="$unix_path"
9926  fi
9927
9928    # remove trailing .exe if any
9929    new_path="${new_path/%.exe/}"
9930
9931    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9932    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9933  fi
9934
9935  else
9936    # We're on a posix platform. Hooray! :)
9937    # First separate the path from the arguments. This will split at the first
9938    # space.
9939    complete="$FOUND_MAKE"
9940    path="${complete%% *}"
9941    tmp="$complete EOL"
9942    arguments="${tmp#* }"
9943
9944    # Cannot rely on the command "which" here since it doesn't always work.
9945    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9946    if test -z "$is_absolute_path"; then
9947      # Path to executable is not absolute. Find it.
9948      IFS_save="$IFS"
9949      IFS=:
9950      for p in $PATH; do
9951        if test -f "$p/$path" && test -x "$p/$path"; then
9952          new_path="$p/$path"
9953          break
9954        fi
9955      done
9956      IFS="$IFS_save"
9957    else
9958      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9959$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9960      new_path="$path"
9961    fi
9962
9963    if test "x$new_path" = x; then
9964        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9965$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9966        has_space=`$ECHO "$complete" | $GREP " "`
9967        if test "x$has_space" != x; then
9968          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9969$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9970        fi
9971        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9972      fi
9973  fi
9974
9975      # Now join together the path and the arguments once again
9976      if test "x$arguments" != xEOL; then
9977        new_complete="$new_path ${arguments% *}"
9978      else
9979        new_complete="$new_path"
9980      fi
9981
9982  if test "x$complete" != "x$new_complete"; then
9983      FOUND_MAKE="$new_complete"
9984      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9985$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9986    fi
9987
9988        fi
9989      fi
9990    fi
9991  fi
9992
9993        fi
9994        PATH=$OLD_PATH
9995      fi
9996    fi
9997
9998    if test "x$FOUND_MAKE" = x; then
9999      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
10000    fi
10001  fi
10002
10003  MAKE=$FOUND_MAKE
10004
10005  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
10006$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
10007
10008
10009
10010    # Test if find supports -delete
10011    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
10012$as_echo_n "checking if find supports -delete... " >&6; }
10013    FIND_DELETE="-delete"
10014
10015    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
10016
10017    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
10018
10019    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
10020    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
10021        # No, it does not.
10022        rm $DELETEDIR/TestIfFindSupportsDelete
10023        FIND_DELETE="-exec rm \{\} \+"
10024        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10025$as_echo "no" >&6; }
10026    else
10027        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10028$as_echo "yes" >&6; }
10029    fi
10030    rmdir $DELETEDIR
10031
10032
10033
10034# These tools might not be installed by default,
10035# need hint on how to install them.
10036
10037    for ac_prog in unzip
10038do
10039  # Extract the first word of "$ac_prog", so it can be a program name with args.
10040set dummy $ac_prog; ac_word=$2
10041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10042$as_echo_n "checking for $ac_word... " >&6; }
10043if ${ac_cv_path_UNZIP+:} false; then :
10044  $as_echo_n "(cached) " >&6
10045else
10046  case $UNZIP in
10047  [\\/]* | ?:[\\/]*)
10048  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
10049  ;;
10050  *)
10051  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10052for as_dir in $PATH
10053do
10054  IFS=$as_save_IFS
10055  test -z "$as_dir" && as_dir=.
10056    for ac_exec_ext in '' $ac_executable_extensions; do
10057  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10058    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
10059    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10060    break 2
10061  fi
10062done
10063  done
10064IFS=$as_save_IFS
10065
10066  ;;
10067esac
10068fi
10069UNZIP=$ac_cv_path_UNZIP
10070if test -n "$UNZIP"; then
10071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
10072$as_echo "$UNZIP" >&6; }
10073else
10074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10075$as_echo "no" >&6; }
10076fi
10077
10078
10079  test -n "$UNZIP" && break
10080done
10081
10082
10083    if test "x$UNZIP" = x; then
10084        if test "xunzip" = x; then
10085          PROG_NAME=unzip
10086        else
10087          PROG_NAME=unzip
10088        fi
10089        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10090$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10091        as_fn_error $? "Cannot continue" "$LINENO" 5
10092    fi
10093
10094
10095
10096    for ac_prog in zip
10097do
10098  # Extract the first word of "$ac_prog", so it can be a program name with args.
10099set dummy $ac_prog; ac_word=$2
10100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10101$as_echo_n "checking for $ac_word... " >&6; }
10102if ${ac_cv_path_ZIP+:} false; then :
10103  $as_echo_n "(cached) " >&6
10104else
10105  case $ZIP in
10106  [\\/]* | ?:[\\/]*)
10107  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
10108  ;;
10109  *)
10110  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10111for as_dir in $PATH
10112do
10113  IFS=$as_save_IFS
10114  test -z "$as_dir" && as_dir=.
10115    for ac_exec_ext in '' $ac_executable_extensions; do
10116  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10117    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
10118    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10119    break 2
10120  fi
10121done
10122  done
10123IFS=$as_save_IFS
10124
10125  ;;
10126esac
10127fi
10128ZIP=$ac_cv_path_ZIP
10129if test -n "$ZIP"; then
10130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
10131$as_echo "$ZIP" >&6; }
10132else
10133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10134$as_echo "no" >&6; }
10135fi
10136
10137
10138  test -n "$ZIP" && break
10139done
10140
10141
10142    if test "x$ZIP" = x; then
10143        if test "xzip" = x; then
10144          PROG_NAME=zip
10145        else
10146          PROG_NAME=zip
10147        fi
10148        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10149$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10150        as_fn_error $? "Cannot continue" "$LINENO" 5
10151    fi
10152
10153
10154
10155# Non-required basic tools
10156
10157# Extract the first word of "ldd", so it can be a program name with args.
10158set dummy ldd; ac_word=$2
10159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10160$as_echo_n "checking for $ac_word... " >&6; }
10161if ${ac_cv_path_LDD+:} false; then :
10162  $as_echo_n "(cached) " >&6
10163else
10164  case $LDD in
10165  [\\/]* | ?:[\\/]*)
10166  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10167  ;;
10168  *)
10169  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10170for as_dir in $PATH
10171do
10172  IFS=$as_save_IFS
10173  test -z "$as_dir" && as_dir=.
10174    for ac_exec_ext in '' $ac_executable_extensions; do
10175  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10176    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10177    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10178    break 2
10179  fi
10180done
10181  done
10182IFS=$as_save_IFS
10183
10184  ;;
10185esac
10186fi
10187LDD=$ac_cv_path_LDD
10188if test -n "$LDD"; then
10189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10190$as_echo "$LDD" >&6; }
10191else
10192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10193$as_echo "no" >&6; }
10194fi
10195
10196
10197if test "x$LDD" = "x"; then
10198    # List shared lib dependencies is used for
10199    # debug output and checking for forbidden dependencies.
10200    # We can build without it.
10201    LDD="true"
10202fi
10203# Extract the first word of "otool", so it can be a program name with args.
10204set dummy otool; ac_word=$2
10205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10206$as_echo_n "checking for $ac_word... " >&6; }
10207if ${ac_cv_path_OTOOL+:} false; then :
10208  $as_echo_n "(cached) " >&6
10209else
10210  case $OTOOL in
10211  [\\/]* | ?:[\\/]*)
10212  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10213  ;;
10214  *)
10215  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10216for as_dir in $PATH
10217do
10218  IFS=$as_save_IFS
10219  test -z "$as_dir" && as_dir=.
10220    for ac_exec_ext in '' $ac_executable_extensions; do
10221  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10222    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10223    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10224    break 2
10225  fi
10226done
10227  done
10228IFS=$as_save_IFS
10229
10230  ;;
10231esac
10232fi
10233OTOOL=$ac_cv_path_OTOOL
10234if test -n "$OTOOL"; then
10235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10236$as_echo "$OTOOL" >&6; }
10237else
10238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10239$as_echo "no" >&6; }
10240fi
10241
10242
10243if test "x$OTOOL" = "x"; then
10244   OTOOL="true"
10245fi
10246for ac_prog in readelf greadelf
10247do
10248  # Extract the first word of "$ac_prog", so it can be a program name with args.
10249set dummy $ac_prog; ac_word=$2
10250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10251$as_echo_n "checking for $ac_word... " >&6; }
10252if ${ac_cv_path_READELF+:} false; then :
10253  $as_echo_n "(cached) " >&6
10254else
10255  case $READELF in
10256  [\\/]* | ?:[\\/]*)
10257  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10258  ;;
10259  *)
10260  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10261for as_dir in $PATH
10262do
10263  IFS=$as_save_IFS
10264  test -z "$as_dir" && as_dir=.
10265    for ac_exec_ext in '' $ac_executable_extensions; do
10266  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10267    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10268    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10269    break 2
10270  fi
10271done
10272  done
10273IFS=$as_save_IFS
10274
10275  ;;
10276esac
10277fi
10278READELF=$ac_cv_path_READELF
10279if test -n "$READELF"; then
10280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10281$as_echo "$READELF" >&6; }
10282else
10283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10284$as_echo "no" >&6; }
10285fi
10286
10287
10288  test -n "$READELF" && break
10289done
10290
10291# Extract the first word of "hg", so it can be a program name with args.
10292set dummy hg; ac_word=$2
10293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10294$as_echo_n "checking for $ac_word... " >&6; }
10295if ${ac_cv_path_HG+:} false; then :
10296  $as_echo_n "(cached) " >&6
10297else
10298  case $HG in
10299  [\\/]* | ?:[\\/]*)
10300  ac_cv_path_HG="$HG" # Let the user override the test with a path.
10301  ;;
10302  *)
10303  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10304for as_dir in $PATH
10305do
10306  IFS=$as_save_IFS
10307  test -z "$as_dir" && as_dir=.
10308    for ac_exec_ext in '' $ac_executable_extensions; do
10309  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10310    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10311    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10312    break 2
10313  fi
10314done
10315  done
10316IFS=$as_save_IFS
10317
10318  ;;
10319esac
10320fi
10321HG=$ac_cv_path_HG
10322if test -n "$HG"; then
10323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10324$as_echo "$HG" >&6; }
10325else
10326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10327$as_echo "no" >&6; }
10328fi
10329
10330
10331# Extract the first word of "stat", so it can be a program name with args.
10332set dummy stat; ac_word=$2
10333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10334$as_echo_n "checking for $ac_word... " >&6; }
10335if ${ac_cv_path_STAT+:} false; then :
10336  $as_echo_n "(cached) " >&6
10337else
10338  case $STAT in
10339  [\\/]* | ?:[\\/]*)
10340  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10341  ;;
10342  *)
10343  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10344for as_dir in $PATH
10345do
10346  IFS=$as_save_IFS
10347  test -z "$as_dir" && as_dir=.
10348    for ac_exec_ext in '' $ac_executable_extensions; do
10349  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10350    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10351    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10352    break 2
10353  fi
10354done
10355  done
10356IFS=$as_save_IFS
10357
10358  ;;
10359esac
10360fi
10361STAT=$ac_cv_path_STAT
10362if test -n "$STAT"; then
10363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10364$as_echo "$STAT" >&6; }
10365else
10366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10367$as_echo "no" >&6; }
10368fi
10369
10370
10371# Extract the first word of "time", so it can be a program name with args.
10372set dummy time; ac_word=$2
10373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10374$as_echo_n "checking for $ac_word... " >&6; }
10375if ${ac_cv_path_TIME+:} false; then :
10376  $as_echo_n "(cached) " >&6
10377else
10378  case $TIME in
10379  [\\/]* | ?:[\\/]*)
10380  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10381  ;;
10382  *)
10383  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10384for as_dir in $PATH
10385do
10386  IFS=$as_save_IFS
10387  test -z "$as_dir" && as_dir=.
10388    for ac_exec_ext in '' $ac_executable_extensions; do
10389  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10390    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10391    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10392    break 2
10393  fi
10394done
10395  done
10396IFS=$as_save_IFS
10397
10398  ;;
10399esac
10400fi
10401TIME=$ac_cv_path_TIME
10402if test -n "$TIME"; then
10403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10404$as_echo "$TIME" >&6; }
10405else
10406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10407$as_echo "no" >&6; }
10408fi
10409
10410
10411# Check if it's GNU time
10412IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
10413if test "x$IS_GNU_TIME" != x; then
10414  IS_GNU_TIME=yes
10415else
10416  IS_GNU_TIME=no
10417fi
10418
10419
10420if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10421
10422    for ac_prog in comm
10423do
10424  # Extract the first word of "$ac_prog", so it can be a program name with args.
10425set dummy $ac_prog; ac_word=$2
10426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10427$as_echo_n "checking for $ac_word... " >&6; }
10428if ${ac_cv_path_COMM+:} false; then :
10429  $as_echo_n "(cached) " >&6
10430else
10431  case $COMM in
10432  [\\/]* | ?:[\\/]*)
10433  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10434  ;;
10435  *)
10436  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10437for as_dir in $PATH
10438do
10439  IFS=$as_save_IFS
10440  test -z "$as_dir" && as_dir=.
10441    for ac_exec_ext in '' $ac_executable_extensions; do
10442  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10443    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10444    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10445    break 2
10446  fi
10447done
10448  done
10449IFS=$as_save_IFS
10450
10451  ;;
10452esac
10453fi
10454COMM=$ac_cv_path_COMM
10455if test -n "$COMM"; then
10456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10457$as_echo "$COMM" >&6; }
10458else
10459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10460$as_echo "no" >&6; }
10461fi
10462
10463
10464  test -n "$COMM" && break
10465done
10466
10467
10468    if test "x$COMM" = x; then
10469        if test "xcomm" = x; then
10470          PROG_NAME=comm
10471        else
10472          PROG_NAME=comm
10473        fi
10474        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10475$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10476        as_fn_error $? "Cannot continue" "$LINENO" 5
10477    fi
10478
10479
10480fi
10481
10482if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
10483
10484    for ac_prog in xattr
10485do
10486  # Extract the first word of "$ac_prog", so it can be a program name with args.
10487set dummy $ac_prog; ac_word=$2
10488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10489$as_echo_n "checking for $ac_word... " >&6; }
10490if ${ac_cv_path_XATTR+:} false; then :
10491  $as_echo_n "(cached) " >&6
10492else
10493  case $XATTR in
10494  [\\/]* | ?:[\\/]*)
10495  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
10496  ;;
10497  *)
10498  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10499for as_dir in $PATH
10500do
10501  IFS=$as_save_IFS
10502  test -z "$as_dir" && as_dir=.
10503    for ac_exec_ext in '' $ac_executable_extensions; do
10504  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10505    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
10506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10507    break 2
10508  fi
10509done
10510  done
10511IFS=$as_save_IFS
10512
10513  ;;
10514esac
10515fi
10516XATTR=$ac_cv_path_XATTR
10517if test -n "$XATTR"; then
10518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
10519$as_echo "$XATTR" >&6; }
10520else
10521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10522$as_echo "no" >&6; }
10523fi
10524
10525
10526  test -n "$XATTR" && break
10527done
10528
10529
10530    if test "x$XATTR" = x; then
10531        if test "xxattr" = x; then
10532          PROG_NAME=xattr
10533        else
10534          PROG_NAME=xattr
10535        fi
10536        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10537$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10538        as_fn_error $? "Cannot continue" "$LINENO" 5
10539    fi
10540
10541
10542  # Extract the first word of "codesign", so it can be a program name with args.
10543set dummy codesign; ac_word=$2
10544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10545$as_echo_n "checking for $ac_word... " >&6; }
10546if ${ac_cv_path_CODESIGN+:} false; then :
10547  $as_echo_n "(cached) " >&6
10548else
10549  case $CODESIGN in
10550  [\\/]* | ?:[\\/]*)
10551  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
10552  ;;
10553  *)
10554  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10555for as_dir in $PATH
10556do
10557  IFS=$as_save_IFS
10558  test -z "$as_dir" && as_dir=.
10559    for ac_exec_ext in '' $ac_executable_extensions; do
10560  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10561    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
10562    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10563    break 2
10564  fi
10565done
10566  done
10567IFS=$as_save_IFS
10568
10569  ;;
10570esac
10571fi
10572CODESIGN=$ac_cv_path_CODESIGN
10573if test -n "$CODESIGN"; then
10574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
10575$as_echo "$CODESIGN" >&6; }
10576else
10577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10578$as_echo "no" >&6; }
10579fi
10580
10581
10582  if test "x$CODESIGN" != "x"; then
10583    # Verify that the openjdk_codesign certificate is present
10584    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
10585$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
10586    rm -f codesign-testfile
10587    touch codesign-testfile
10588    codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
10589    rm -f codesign-testfile
10590    if test "x$CODESIGN" = x; then
10591      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10592$as_echo "no" >&6; }
10593    else
10594      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10595$as_echo "yes" >&6; }
10596    fi
10597  fi
10598
10599
10600    for ac_prog in dsymutil
10601do
10602  # Extract the first word of "$ac_prog", so it can be a program name with args.
10603set dummy $ac_prog; ac_word=$2
10604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10605$as_echo_n "checking for $ac_word... " >&6; }
10606if ${ac_cv_path_DSYMUTIL+:} false; then :
10607  $as_echo_n "(cached) " >&6
10608else
10609  case $DSYMUTIL in
10610  [\\/]* | ?:[\\/]*)
10611  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
10612  ;;
10613  *)
10614  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10615for as_dir in $PATH
10616do
10617  IFS=$as_save_IFS
10618  test -z "$as_dir" && as_dir=.
10619    for ac_exec_ext in '' $ac_executable_extensions; do
10620  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10621    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
10622    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10623    break 2
10624  fi
10625done
10626  done
10627IFS=$as_save_IFS
10628
10629  ;;
10630esac
10631fi
10632DSYMUTIL=$ac_cv_path_DSYMUTIL
10633if test -n "$DSYMUTIL"; then
10634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
10635$as_echo "$DSYMUTIL" >&6; }
10636else
10637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10638$as_echo "no" >&6; }
10639fi
10640
10641
10642  test -n "$DSYMUTIL" && break
10643done
10644
10645
10646    if test "x$DSYMUTIL" = x; then
10647        if test "xdsymutil" = x; then
10648          PROG_NAME=dsymutil
10649        else
10650          PROG_NAME=dsymutil
10651        fi
10652        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10653$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10654        as_fn_error $? "Cannot continue" "$LINENO" 5
10655    fi
10656fi
10657
10658
10659# Check if pkg-config is available.
10660
10661
10662if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10663	if test -n "$ac_tool_prefix"; then
10664  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10665set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10667$as_echo_n "checking for $ac_word... " >&6; }
10668if ${ac_cv_path_PKG_CONFIG+:} false; then :
10669  $as_echo_n "(cached) " >&6
10670else
10671  case $PKG_CONFIG in
10672  [\\/]* | ?:[\\/]*)
10673  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10674  ;;
10675  *)
10676  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10677for as_dir in $PATH
10678do
10679  IFS=$as_save_IFS
10680  test -z "$as_dir" && as_dir=.
10681    for ac_exec_ext in '' $ac_executable_extensions; do
10682  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10683    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10684    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10685    break 2
10686  fi
10687done
10688  done
10689IFS=$as_save_IFS
10690
10691  ;;
10692esac
10693fi
10694PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10695if test -n "$PKG_CONFIG"; then
10696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10697$as_echo "$PKG_CONFIG" >&6; }
10698else
10699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10700$as_echo "no" >&6; }
10701fi
10702
10703
10704fi
10705if test -z "$ac_cv_path_PKG_CONFIG"; then
10706  ac_pt_PKG_CONFIG=$PKG_CONFIG
10707  # Extract the first word of "pkg-config", so it can be a program name with args.
10708set dummy pkg-config; ac_word=$2
10709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10710$as_echo_n "checking for $ac_word... " >&6; }
10711if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10712  $as_echo_n "(cached) " >&6
10713else
10714  case $ac_pt_PKG_CONFIG in
10715  [\\/]* | ?:[\\/]*)
10716  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10717  ;;
10718  *)
10719  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10720for as_dir in $PATH
10721do
10722  IFS=$as_save_IFS
10723  test -z "$as_dir" && as_dir=.
10724    for ac_exec_ext in '' $ac_executable_extensions; do
10725  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10726    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10727    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10728    break 2
10729  fi
10730done
10731  done
10732IFS=$as_save_IFS
10733
10734  ;;
10735esac
10736fi
10737ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10738if test -n "$ac_pt_PKG_CONFIG"; then
10739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10740$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10741else
10742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10743$as_echo "no" >&6; }
10744fi
10745
10746  if test "x$ac_pt_PKG_CONFIG" = x; then
10747    PKG_CONFIG=""
10748  else
10749    case $cross_compiling:$ac_tool_warned in
10750yes:)
10751{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10752$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10753ac_tool_warned=yes ;;
10754esac
10755    PKG_CONFIG=$ac_pt_PKG_CONFIG
10756  fi
10757else
10758  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10759fi
10760
10761fi
10762if test -n "$PKG_CONFIG"; then
10763	_pkg_min_version=0.9.0
10764	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10765$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10766	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10767		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10768$as_echo "yes" >&6; }
10769	else
10770		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10771$as_echo "no" >&6; }
10772		PKG_CONFIG=""
10773	fi
10774
10775fi
10776
10777# After basic tools have been setup, we can check build os specific details.
10778
10779###############################################################################
10780
10781# Note that this is the build platform OS version!
10782
10783OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10784OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10785OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10786OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10787
10788
10789
10790
10791
10792# Setup builddeps, for automatic downloading of tools we need.
10793# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10794# boot-jdk setup, but we need to have basic tools setup first.
10795
10796
10797# Check whether --with-builddeps-conf was given.
10798if test "${with_builddeps_conf+set}" = set; then :
10799  withval=$with_builddeps_conf;
10800fi
10801
10802
10803
10804# Check whether --with-builddeps-server was given.
10805if test "${with_builddeps_server+set}" = set; then :
10806  withval=$with_builddeps_server;
10807fi
10808
10809
10810
10811# Check whether --with-builddeps-dir was given.
10812if test "${with_builddeps_dir+set}" = set; then :
10813  withval=$with_builddeps_dir;
10814else
10815  with_builddeps_dir=/localhome/builddeps
10816fi
10817
10818
10819
10820# Check whether --with-builddeps-group was given.
10821if test "${with_builddeps_group+set}" = set; then :
10822  withval=$with_builddeps_group;
10823fi
10824
10825
10826
10827
10828    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10829        if test "x$with_builddeps_conf" != x; then
10830            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10831$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10832            builddepsfile=$with_builddeps_conf
10833            if test -s $builddepsfile; then
10834                . $builddepsfile
10835                { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10836$as_echo "loaded!" >&6; }
10837            else
10838               as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10839           fi
10840        else
10841            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10842$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10843            builddepsfile=`mktemp`
10844            touch $builddepsfile
10845            # Put all found confs into a single file.
10846            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10847            # Source the file to acquire the variables
10848            if test -s $builddepsfile; then
10849                . $builddepsfile
10850                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10851$as_echo "found at least one!" >&6; }
10852            else
10853               as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10854           fi
10855        fi
10856        # Create build and target names that use _ instead of "-" and ".".
10857        # This is necessary to use them in variable names.
10858        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10859        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10860        # Extract rewrite information for build and target
10861        eval rewritten_build=\${REWRITE_${build_var}}
10862        if test "x$rewritten_build" = x; then
10863            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10864            echo Build stays the same $rewritten_build
10865        else
10866            echo Rewriting build for builddeps into $rewritten_build
10867        fi
10868        eval rewritten_target=\${REWRITE_${target_var}}
10869        if test "x$rewritten_target" = x; then
10870            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10871            echo Target stays the same $rewritten_target
10872        else
10873            echo Rewriting target for builddeps into $rewritten_target
10874        fi
10875        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10876        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10877    fi
10878    for ac_prog in 7z unzip
10879do
10880  # Extract the first word of "$ac_prog", so it can be a program name with args.
10881set dummy $ac_prog; ac_word=$2
10882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10883$as_echo_n "checking for $ac_word... " >&6; }
10884if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
10885  $as_echo_n "(cached) " >&6
10886else
10887  if test -n "$BDEPS_UNZIP"; then
10888  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10889else
10890as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10891for as_dir in $PATH
10892do
10893  IFS=$as_save_IFS
10894  test -z "$as_dir" && as_dir=.
10895    for ac_exec_ext in '' $ac_executable_extensions; do
10896  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10897    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10898    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10899    break 2
10900  fi
10901done
10902  done
10903IFS=$as_save_IFS
10904
10905fi
10906fi
10907BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10908if test -n "$BDEPS_UNZIP"; then
10909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10910$as_echo "$BDEPS_UNZIP" >&6; }
10911else
10912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10913$as_echo "no" >&6; }
10914fi
10915
10916
10917  test -n "$BDEPS_UNZIP" && break
10918done
10919
10920    if test "x$BDEPS_UNZIP" = x7z; then
10921        BDEPS_UNZIP="7z x"
10922    fi
10923
10924    for ac_prog in wget lftp ftp
10925do
10926  # Extract the first word of "$ac_prog", so it can be a program name with args.
10927set dummy $ac_prog; ac_word=$2
10928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10929$as_echo_n "checking for $ac_word... " >&6; }
10930if ${ac_cv_prog_BDEPS_FTP+:} false; then :
10931  $as_echo_n "(cached) " >&6
10932else
10933  if test -n "$BDEPS_FTP"; then
10934  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10935else
10936as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10937for as_dir in $PATH
10938do
10939  IFS=$as_save_IFS
10940  test -z "$as_dir" && as_dir=.
10941    for ac_exec_ext in '' $ac_executable_extensions; do
10942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10943    ac_cv_prog_BDEPS_FTP="$ac_prog"
10944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10945    break 2
10946  fi
10947done
10948  done
10949IFS=$as_save_IFS
10950
10951fi
10952fi
10953BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10954if test -n "$BDEPS_FTP"; then
10955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10956$as_echo "$BDEPS_FTP" >&6; }
10957else
10958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10959$as_echo "no" >&6; }
10960fi
10961
10962
10963  test -n "$BDEPS_FTP" && break
10964done
10965
10966
10967
10968###############################################################################
10969#
10970# Determine OpenJDK variants, options and version numbers.
10971#
10972###############################################################################
10973
10974# We need build & target for this.
10975
10976
10977###############################################################################
10978#
10979# Should we build a JDK/JVM with headful support (ie a graphical ui)?
10980# We always build headless support.
10981#
10982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10983$as_echo_n "checking headful support... " >&6; }
10984# Check whether --enable-headful was given.
10985if test "${enable_headful+set}" = set; then :
10986  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10987else
10988  SUPPORT_HEADFUL=yes
10989fi
10990
10991
10992SUPPORT_HEADLESS=yes
10993BUILD_HEADLESS="BUILD_HEADLESS:=true"
10994
10995if test "x$SUPPORT_HEADFUL" = xyes; then
10996    # We are building both headful and headless.
10997    headful_msg="include support for both headful and headless"
10998fi
10999
11000if test "x$SUPPORT_HEADFUL" = xno; then
11001    # Thus we are building headless only.
11002    BUILD_HEADLESS="BUILD_HEADLESS:=true"
11003    headful_msg="headless only"
11004fi
11005
11006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
11007$as_echo "$headful_msg" >&6; }
11008
11009
11010
11011
11012
11013# Control wether Hotspot runs Queens test after build.
11014# Check whether --enable-hotspot-test-in-build was given.
11015if test "${enable_hotspot_test_in_build+set}" = set; then :
11016  enableval=$enable_hotspot_test_in_build;
11017else
11018  enable_hotspot_test_in_build=no
11019fi
11020
11021if test "x$enable_hotspot_test_in_build" = "xyes"; then
11022    TEST_IN_BUILD=true
11023else
11024    TEST_IN_BUILD=false
11025fi
11026
11027
11028###############################################################################
11029#
11030# Choose cacerts source file
11031#
11032
11033# Check whether --with-cacerts-file was given.
11034if test "${with_cacerts_file+set}" = set; then :
11035  withval=$with_cacerts_file;
11036fi
11037
11038if test "x$with_cacerts_file" != x; then
11039    CACERTS_FILE=$with_cacerts_file
11040else
11041    CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
11042fi
11043
11044
11045###############################################################################
11046#
11047# Enable or disable unlimited crypto
11048#
11049# Check whether --enable-unlimited-crypto was given.
11050if test "${enable_unlimited_crypto+set}" = set; then :
11051  enableval=$enable_unlimited_crypto;
11052else
11053  enable_unlimited_crypto=no
11054fi
11055
11056if test "x$enable_unlimited_crypto" = "xyes"; then
11057    UNLIMITED_CRYPTO=true
11058else
11059    UNLIMITED_CRYPTO=false
11060fi
11061
11062
11063###############################################################################
11064#
11065# Enable or disable the elliptic curve crypto implementation
11066#
11067
11068
11069###############################################################################
11070#
11071# Compress jars
11072#
11073COMPRESS_JARS=false
11074
11075
11076
11077
11078# Source the version numbers
11079. $AUTOCONF_DIR/version-numbers
11080
11081# Get the settings from parameters
11082
11083# Check whether --with-milestone was given.
11084if test "${with_milestone+set}" = set; then :
11085  withval=$with_milestone;
11086fi
11087
11088if test "x$with_milestone" = xyes; then
11089  as_fn_error $? "Milestone must have a value" "$LINENO" 5
11090elif test "x$with_milestone" != x; then
11091    MILESTONE="$with_milestone"
11092fi
11093if test "x$MILESTONE" = x; then
11094  MILESTONE=internal
11095fi
11096
11097
11098# Check whether --with-update-version was given.
11099if test "${with_update_version+set}" = set; then :
11100  withval=$with_update_version;
11101fi
11102
11103if test "x$with_update_version" = xyes; then
11104  as_fn_error $? "Update version must have a value" "$LINENO" 5
11105elif test "x$with_update_version" != x; then
11106  JDK_UPDATE_VERSION="$with_update_version"
11107fi
11108
11109
11110# Check whether --with-user-release-suffix was given.
11111if test "${with_user_release_suffix+set}" = set; then :
11112  withval=$with_user_release_suffix;
11113fi
11114
11115if test "x$with_user_release_suffix" = xyes; then
11116  as_fn_error $? "Release suffix must have a value" "$LINENO" 5
11117elif test "x$with_user_release_suffix" != x; then
11118  USER_RELEASE_SUFFIX="$with_user_release_suffix"
11119fi
11120
11121
11122# Check whether --with-build-number was given.
11123if test "${with_build_number+set}" = set; then :
11124  withval=$with_build_number;
11125fi
11126
11127if test "x$with_build_number" = xyes; then
11128  as_fn_error $? "Build number must have a value" "$LINENO" 5
11129elif test "x$with_build_number" != x; then
11130  JDK_BUILD_NUMBER="$with_build_number"
11131fi
11132# Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
11133if test "x$JDK_BUILD_NUMBER" = x; then
11134  JDK_BUILD_NUMBER=b00
11135  if test "x$USER_RELEASE_SUFFIX" = x; then
11136    BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
11137    # Avoid [:alnum:] since it depends on the locale.
11138    CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
11139    USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11140  fi
11141fi
11142
11143# Now set the JDK version, milestone, build number etc.
11144
11145
11146
11147
11148
11149
11150
11151
11152
11153
11154
11155
11156
11157
11158
11159COPYRIGHT_YEAR=`date +'%Y'`
11160
11161
11162if test "x$JDK_UPDATE_VERSION" != x; then
11163  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
11164else
11165  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
11166fi
11167
11168
11169COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
11170
11171
11172
11173###############################################################################
11174#
11175# Setup BootJDK, used to bootstrap the build.
11176#
11177###############################################################################
11178
11179
11180BOOT_JDK_FOUND=no
11181
11182# Check whether --with-boot-jdk was given.
11183if test "${with_boot_jdk+set}" = set; then :
11184  withval=$with_boot_jdk;
11185fi
11186
11187
11188# We look for the Boot JDK through various means, going from more certain to
11189# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
11190# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
11191# must check if this is indeed valid; otherwise we'll continue looking.
11192
11193# Test: Is bootjdk explicitely set by command line arguments?
11194
11195  if test "x$BOOT_JDK_FOUND" = xno; then
11196    # Now execute the test
11197
11198if test "x$with_boot_jdk" != x; then
11199    BOOT_JDK=$with_boot_jdk
11200    BOOT_JDK_FOUND=maybe
11201    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
11202$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
11203fi
11204
11205
11206    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11207    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11208      # Do we have a bin/java?
11209      if test ! -x "$BOOT_JDK/bin/java"; then
11210        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11211$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11212        BOOT_JDK_FOUND=no
11213      else
11214        # Do we have a bin/javac?
11215        if test ! -x "$BOOT_JDK/bin/javac"; then
11216          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11217$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11218          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11219$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11220          BOOT_JDK_FOUND=no
11221        else
11222          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11223          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11224            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11225$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11226            BOOT_JDK_FOUND=no
11227          else
11228            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11229            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11230
11231            # Extra M4 quote needed to protect [] in grep expression.
11232            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11233            if test "x$FOUND_VERSION_78" = x; then
11234              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11235$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11236              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11237$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11238              BOOT_JDK_FOUND=no
11239            else
11240              # We're done! :-)
11241              BOOT_JDK_FOUND=yes
11242
11243  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11244
11245  # Input might be given as Windows format, start by converting to
11246  # unix format.
11247  path="$BOOT_JDK"
11248  new_path=`$CYGPATH -u "$path"`
11249
11250  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11251  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11252  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11253  # "foo.exe" is OK but "foo" is an error.
11254  #
11255  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11256  # It is also a way to make sure we got the proper file name for the real test later on.
11257  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11258  if test "x$test_shortpath" = x; then
11259    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11260$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11261    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11262  fi
11263
11264  # Call helper function which possibly converts this using DOS-style short mode.
11265  # If so, the updated path is stored in $new_path.
11266
11267  input_path="$new_path"
11268  # Check if we need to convert this using DOS-style short mode. If the path
11269  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11270  # take no chances and rewrite it.
11271  # Note: m4 eats our [], so we need to use [ and ] instead.
11272  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11273  if test "x$has_forbidden_chars" != x; then
11274    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11275    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11276    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11277    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11278      # Going to short mode and back again did indeed matter. Since short mode is
11279      # case insensitive, let's make it lowercase to improve readability.
11280      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11281      # Now convert it back to Unix-stile (cygpath)
11282      input_path=`$CYGPATH -u "$shortmode_path"`
11283      new_path="$input_path"
11284    fi
11285  fi
11286
11287  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11288  if test "x$test_cygdrive_prefix" = x; then
11289    # As a simple fix, exclude /usr/bin since it's not a real path.
11290    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11291      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11292      # a path prefixed by /cygdrive for fixpath to work.
11293      new_path="$CYGWIN_ROOT_PATH$input_path"
11294    fi
11295  fi
11296
11297
11298  if test "x$path" != "x$new_path"; then
11299    BOOT_JDK="$new_path"
11300    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11301$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11302  fi
11303
11304  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11305
11306  path="$BOOT_JDK"
11307  has_colon=`$ECHO $path | $GREP ^.:`
11308  new_path="$path"
11309  if test "x$has_colon" = x; then
11310    # Not in mixed or Windows style, start by that.
11311    new_path=`cmd //c echo $path`
11312  fi
11313
11314
11315  input_path="$new_path"
11316  # Check if we need to convert this using DOS-style short mode. If the path
11317  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11318  # take no chances and rewrite it.
11319  # Note: m4 eats our [], so we need to use [ and ] instead.
11320  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11321  if test "x$has_forbidden_chars" != x; then
11322    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11323    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11324  fi
11325
11326
11327  windows_path="$new_path"
11328  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11329    unix_path=`$CYGPATH -u "$windows_path"`
11330    new_path="$unix_path"
11331  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11332    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11333    new_path="$unix_path"
11334  fi
11335
11336  if test "x$path" != "x$new_path"; then
11337    BOOT_JDK="$new_path"
11338    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11339$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11340  fi
11341
11342  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11343  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11344
11345  else
11346    # We're on a posix platform. Hooray! :)
11347    path="$BOOT_JDK"
11348    has_space=`$ECHO "$path" | $GREP " "`
11349    if test "x$has_space" != x; then
11350      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11351$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11352      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11353    fi
11354
11355    # Use eval to expand a potential ~
11356    eval path="$path"
11357    if test ! -f "$path" && test ! -d "$path"; then
11358      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11359    fi
11360
11361    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11362  fi
11363
11364              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11365$as_echo_n "checking for Boot JDK... " >&6; }
11366              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11367$as_echo "$BOOT_JDK" >&6; }
11368              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11369$as_echo_n "checking Boot JDK version... " >&6; }
11370              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11371              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11372$as_echo "$BOOT_JDK_VERSION" >&6; }
11373            fi # end check jdk version
11374          fi # end check rt.jar
11375        fi # end check javac
11376      fi # end check java
11377    fi # end check boot jdk found
11378  fi
11379
11380if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11381  # Having specified an argument which is incorrect will produce an instant failure;
11382  # we should not go on looking
11383  as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11384fi
11385
11386# Test: Is bootjdk available from builddeps?
11387
11388  if test "x$BOOT_JDK_FOUND" = xno; then
11389    # Now execute the test
11390
11391
11392
11393    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11394        # Source the builddeps file again, to make sure it uses the latest variables!
11395        . $builddepsfile
11396        # Look for a target and build machine specific resource!
11397        eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11398        if test "x$resource" = x; then
11399            # Ok, lets instead look for a target specific resource
11400            eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11401        fi
11402        if test "x$resource" = x; then
11403            # Ok, lets instead look for a build specific resource
11404            eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11405        fi
11406        if test "x$resource" = x; then
11407            # Ok, lets instead look for a generic resource
11408            # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11409            resource=${builddep_bootjdk}
11410        fi
11411        if test "x$resource" != x; then
11412            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11413$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11414	    # If the resource in the builddeps.conf file is an existing directory,
11415	    # for example /java/linux/cups
11416	    if test -d ${resource}; then
11417	       depdir=${resource}
11418	    else
11419
11420# bootjdk is for example mymodule
11421# $resource is for example libs/general/libmymod_1_2_3.zip
11422# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11423# $with_builddeps_dir is for example /localhome/builddeps
11424# depdir is the name of the variable into which we store the depdir, eg MYMOD
11425# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11426# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11427    filename=`basename $resource`
11428    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11429    filebase=${filename%%.*}
11430    extension=${filename#*.}
11431    installdir=$with_builddeps_dir/$filebase
11432    if test ! -f $installdir/$filename.unpacked; then
11433        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11434$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11435        if test ! -d $installdir; then
11436            mkdir -p $installdir
11437        fi
11438        if test ! -d $installdir; then
11439            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11440        fi
11441        tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11442        touch $tmpfile
11443        if test ! -f $tmpfile; then
11444            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11445        fi
11446
11447    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11448    # $tmpfile is the local file name for the downloaded file.
11449    VALID_TOOL=no
11450    if test "x$BDEPS_FTP" = xwget; then
11451       VALID_TOOL=yes
11452       wget -O $tmpfile $with_builddeps_server/$resource
11453    fi
11454    if test "x$BDEPS_FTP" = xlftp; then
11455       VALID_TOOL=yes
11456       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11457    fi
11458    if test "x$BDEPS_FTP" = xftp; then
11459        VALID_TOOL=yes
11460        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11461        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11462        FTPUSERPWD=${FTPSERVER%%@*}
11463        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11464            FTPUSER=${userpwd%%:*}
11465            FTPPWD=${userpwd#*@}
11466            FTPSERVER=${FTPSERVER#*@}
11467        else
11468            FTPUSER=ftp
11469            FTPPWD=ftp
11470        fi
11471        # the "pass" command does not work on some
11472        # ftp clients (read ftp.exe) but if it works,
11473        # passive mode is better!
11474        (\
11475            echo "user $FTPUSER $FTPPWD"        ;\
11476            echo "pass"                         ;\
11477            echo "bin"                          ;\
11478            echo "get $FTPPATH $tmpfile"              ;\
11479        ) | ftp -in $FTPSERVER
11480    fi
11481    if test "x$VALID_TOOL" != xyes; then
11482       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11483    fi
11484
11485        mv $tmpfile $installdir/$filename
11486        if test ! -s $installdir/$filename; then
11487            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11488        fi
11489        case "$extension" in
11490            zip)  echo "Unzipping $installdir/$filename..."
11491               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11492            ;;
11493            tar.gz) echo "Untaring $installdir/$filename..."
11494               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11495            ;;
11496            tgz) echo "Untaring $installdir/$filename..."
11497               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11498            ;;
11499            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11500            ;;
11501        esac
11502    fi
11503    if test -f $installdir/$filename.unpacked; then
11504        depdir=$installdir
11505    fi
11506
11507	    fi
11508            # Source the builddeps file again, because in the previous command, the depdir
11509            # was updated to point at the current build dependency install directory.
11510            . $builddepsfile
11511            # Now extract variables from the builddeps.conf files.
11512            theroot=${builddep_bootjdk_ROOT}
11513            thecflags=${builddep_bootjdk_CFLAGS}
11514            thelibs=${builddep_bootjdk_LIBS}
11515            if test "x$depdir" = x; then
11516                as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11517            fi
11518            BOOT_JDK=$depdir
11519            if test "x$theroot" != x; then
11520               BOOT_JDK="$theroot"
11521            fi
11522            if test "x$thecflags" != x; then
11523               BOOT_JDK_CFLAGS="$thecflags"
11524            fi
11525            if test "x$thelibs" != x; then
11526               BOOT_JDK_LIBS="$thelibs"
11527            fi
11528            BOOT_JDK_FOUND=maybe
11529            else BOOT_JDK_FOUND=no
11530
11531        fi
11532        else BOOT_JDK_FOUND=no
11533
11534    fi
11535
11536
11537
11538    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11539    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11540      # Do we have a bin/java?
11541      if test ! -x "$BOOT_JDK/bin/java"; then
11542        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11543$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11544        BOOT_JDK_FOUND=no
11545      else
11546        # Do we have a bin/javac?
11547        if test ! -x "$BOOT_JDK/bin/javac"; then
11548          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11549$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11550          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11551$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11552          BOOT_JDK_FOUND=no
11553        else
11554          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11555          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11556            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11557$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11558            BOOT_JDK_FOUND=no
11559          else
11560            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11561            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11562
11563            # Extra M4 quote needed to protect [] in grep expression.
11564            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11565            if test "x$FOUND_VERSION_78" = x; then
11566              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11567$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11568              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11569$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11570              BOOT_JDK_FOUND=no
11571            else
11572              # We're done! :-)
11573              BOOT_JDK_FOUND=yes
11574
11575  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11576
11577  # Input might be given as Windows format, start by converting to
11578  # unix format.
11579  path="$BOOT_JDK"
11580  new_path=`$CYGPATH -u "$path"`
11581
11582  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11583  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11584  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11585  # "foo.exe" is OK but "foo" is an error.
11586  #
11587  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11588  # It is also a way to make sure we got the proper file name for the real test later on.
11589  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11590  if test "x$test_shortpath" = x; then
11591    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11592$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11593    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11594  fi
11595
11596  # Call helper function which possibly converts this using DOS-style short mode.
11597  # If so, the updated path is stored in $new_path.
11598
11599  input_path="$new_path"
11600  # Check if we need to convert this using DOS-style short mode. If the path
11601  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11602  # take no chances and rewrite it.
11603  # Note: m4 eats our [], so we need to use [ and ] instead.
11604  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11605  if test "x$has_forbidden_chars" != x; then
11606    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11607    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11608    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11609    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11610      # Going to short mode and back again did indeed matter. Since short mode is
11611      # case insensitive, let's make it lowercase to improve readability.
11612      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11613      # Now convert it back to Unix-stile (cygpath)
11614      input_path=`$CYGPATH -u "$shortmode_path"`
11615      new_path="$input_path"
11616    fi
11617  fi
11618
11619  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11620  if test "x$test_cygdrive_prefix" = x; then
11621    # As a simple fix, exclude /usr/bin since it's not a real path.
11622    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11623      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11624      # a path prefixed by /cygdrive for fixpath to work.
11625      new_path="$CYGWIN_ROOT_PATH$input_path"
11626    fi
11627  fi
11628
11629
11630  if test "x$path" != "x$new_path"; then
11631    BOOT_JDK="$new_path"
11632    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11633$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11634  fi
11635
11636  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11637
11638  path="$BOOT_JDK"
11639  has_colon=`$ECHO $path | $GREP ^.:`
11640  new_path="$path"
11641  if test "x$has_colon" = x; then
11642    # Not in mixed or Windows style, start by that.
11643    new_path=`cmd //c echo $path`
11644  fi
11645
11646
11647  input_path="$new_path"
11648  # Check if we need to convert this using DOS-style short mode. If the path
11649  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11650  # take no chances and rewrite it.
11651  # Note: m4 eats our [], so we need to use [ and ] instead.
11652  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11653  if test "x$has_forbidden_chars" != x; then
11654    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11655    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11656  fi
11657
11658
11659  windows_path="$new_path"
11660  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11661    unix_path=`$CYGPATH -u "$windows_path"`
11662    new_path="$unix_path"
11663  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11664    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11665    new_path="$unix_path"
11666  fi
11667
11668  if test "x$path" != "x$new_path"; then
11669    BOOT_JDK="$new_path"
11670    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11671$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11672  fi
11673
11674  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11675  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11676
11677  else
11678    # We're on a posix platform. Hooray! :)
11679    path="$BOOT_JDK"
11680    has_space=`$ECHO "$path" | $GREP " "`
11681    if test "x$has_space" != x; then
11682      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11683$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11684      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11685    fi
11686
11687    # Use eval to expand a potential ~
11688    eval path="$path"
11689    if test ! -f "$path" && test ! -d "$path"; then
11690      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11691    fi
11692
11693    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11694  fi
11695
11696              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11697$as_echo_n "checking for Boot JDK... " >&6; }
11698              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11699$as_echo "$BOOT_JDK" >&6; }
11700              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11701$as_echo_n "checking Boot JDK version... " >&6; }
11702              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11703              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11704$as_echo "$BOOT_JDK_VERSION" >&6; }
11705            fi # end check jdk version
11706          fi # end check rt.jar
11707        fi # end check javac
11708      fi # end check java
11709    fi # end check boot jdk found
11710  fi
11711
11712
11713# Test: Is $JAVA_HOME set?
11714
11715  if test "x$BOOT_JDK_FOUND" = xno; then
11716    # Now execute the test
11717
11718    if test "x$JAVA_HOME" != x; then
11719        JAVA_HOME_PROCESSED="$JAVA_HOME"
11720
11721  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11722
11723  # Input might be given as Windows format, start by converting to
11724  # unix format.
11725  path="$JAVA_HOME_PROCESSED"
11726  new_path=`$CYGPATH -u "$path"`
11727
11728  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11729  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11730  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11731  # "foo.exe" is OK but "foo" is an error.
11732  #
11733  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11734  # It is also a way to make sure we got the proper file name for the real test later on.
11735  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11736  if test "x$test_shortpath" = x; then
11737    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11738$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11739    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11740  fi
11741
11742  # Call helper function which possibly converts this using DOS-style short mode.
11743  # If so, the updated path is stored in $new_path.
11744
11745  input_path="$new_path"
11746  # Check if we need to convert this using DOS-style short mode. If the path
11747  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11748  # take no chances and rewrite it.
11749  # Note: m4 eats our [], so we need to use [ and ] instead.
11750  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11751  if test "x$has_forbidden_chars" != x; then
11752    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11753    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11754    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11755    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11756      # Going to short mode and back again did indeed matter. Since short mode is
11757      # case insensitive, let's make it lowercase to improve readability.
11758      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11759      # Now convert it back to Unix-stile (cygpath)
11760      input_path=`$CYGPATH -u "$shortmode_path"`
11761      new_path="$input_path"
11762    fi
11763  fi
11764
11765  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11766  if test "x$test_cygdrive_prefix" = x; then
11767    # As a simple fix, exclude /usr/bin since it's not a real path.
11768    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11769      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11770      # a path prefixed by /cygdrive for fixpath to work.
11771      new_path="$CYGWIN_ROOT_PATH$input_path"
11772    fi
11773  fi
11774
11775
11776  if test "x$path" != "x$new_path"; then
11777    JAVA_HOME_PROCESSED="$new_path"
11778    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11779$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11780  fi
11781
11782  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11783
11784  path="$JAVA_HOME_PROCESSED"
11785  has_colon=`$ECHO $path | $GREP ^.:`
11786  new_path="$path"
11787  if test "x$has_colon" = x; then
11788    # Not in mixed or Windows style, start by that.
11789    new_path=`cmd //c echo $path`
11790  fi
11791
11792
11793  input_path="$new_path"
11794  # Check if we need to convert this using DOS-style short mode. If the path
11795  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11796  # take no chances and rewrite it.
11797  # Note: m4 eats our [], so we need to use [ and ] instead.
11798  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11799  if test "x$has_forbidden_chars" != x; then
11800    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11801    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11802  fi
11803
11804
11805  windows_path="$new_path"
11806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11807    unix_path=`$CYGPATH -u "$windows_path"`
11808    new_path="$unix_path"
11809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11810    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11811    new_path="$unix_path"
11812  fi
11813
11814  if test "x$path" != "x$new_path"; then
11815    JAVA_HOME_PROCESSED="$new_path"
11816    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11817$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11818  fi
11819
11820  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11821  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11822
11823  else
11824    # We're on a posix platform. Hooray! :)
11825    path="$JAVA_HOME_PROCESSED"
11826    has_space=`$ECHO "$path" | $GREP " "`
11827    if test "x$has_space" != x; then
11828      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11829$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11830      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11831    fi
11832
11833    # Use eval to expand a potential ~
11834    eval path="$path"
11835    if test ! -f "$path" && test ! -d "$path"; then
11836      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11837    fi
11838
11839    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
11840  fi
11841
11842        if test ! -d "$JAVA_HOME_PROCESSED"; then
11843            { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11844$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11845        else
11846          # Aha, the user has set a JAVA_HOME
11847          # let us use that as the Boot JDK.
11848          BOOT_JDK="$JAVA_HOME_PROCESSED"
11849          BOOT_JDK_FOUND=maybe
11850          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11851$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11852        fi
11853    fi
11854
11855
11856    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11857    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11858      # Do we have a bin/java?
11859      if test ! -x "$BOOT_JDK/bin/java"; then
11860        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11861$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11862        BOOT_JDK_FOUND=no
11863      else
11864        # Do we have a bin/javac?
11865        if test ! -x "$BOOT_JDK/bin/javac"; then
11866          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11867$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11868          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11869$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11870          BOOT_JDK_FOUND=no
11871        else
11872          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11873          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11874            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11875$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11876            BOOT_JDK_FOUND=no
11877          else
11878            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11879            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11880
11881            # Extra M4 quote needed to protect [] in grep expression.
11882            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11883            if test "x$FOUND_VERSION_78" = x; then
11884              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11885$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11886              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11887$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11888              BOOT_JDK_FOUND=no
11889            else
11890              # We're done! :-)
11891              BOOT_JDK_FOUND=yes
11892
11893  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11894
11895  # Input might be given as Windows format, start by converting to
11896  # unix format.
11897  path="$BOOT_JDK"
11898  new_path=`$CYGPATH -u "$path"`
11899
11900  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11901  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11902  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11903  # "foo.exe" is OK but "foo" is an error.
11904  #
11905  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11906  # It is also a way to make sure we got the proper file name for the real test later on.
11907  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11908  if test "x$test_shortpath" = x; then
11909    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11910$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11911    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11912  fi
11913
11914  # Call helper function which possibly converts this using DOS-style short mode.
11915  # If so, the updated path is stored in $new_path.
11916
11917  input_path="$new_path"
11918  # Check if we need to convert this using DOS-style short mode. If the path
11919  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11920  # take no chances and rewrite it.
11921  # Note: m4 eats our [], so we need to use [ and ] instead.
11922  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11923  if test "x$has_forbidden_chars" != x; then
11924    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11925    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11926    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11927    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11928      # Going to short mode and back again did indeed matter. Since short mode is
11929      # case insensitive, let's make it lowercase to improve readability.
11930      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11931      # Now convert it back to Unix-stile (cygpath)
11932      input_path=`$CYGPATH -u "$shortmode_path"`
11933      new_path="$input_path"
11934    fi
11935  fi
11936
11937  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11938  if test "x$test_cygdrive_prefix" = x; then
11939    # As a simple fix, exclude /usr/bin since it's not a real path.
11940    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11941      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11942      # a path prefixed by /cygdrive for fixpath to work.
11943      new_path="$CYGWIN_ROOT_PATH$input_path"
11944    fi
11945  fi
11946
11947
11948  if test "x$path" != "x$new_path"; then
11949    BOOT_JDK="$new_path"
11950    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11951$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11952  fi
11953
11954  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11955
11956  path="$BOOT_JDK"
11957  has_colon=`$ECHO $path | $GREP ^.:`
11958  new_path="$path"
11959  if test "x$has_colon" = x; then
11960    # Not in mixed or Windows style, start by that.
11961    new_path=`cmd //c echo $path`
11962  fi
11963
11964
11965  input_path="$new_path"
11966  # Check if we need to convert this using DOS-style short mode. If the path
11967  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11968  # take no chances and rewrite it.
11969  # Note: m4 eats our [], so we need to use [ and ] instead.
11970  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11971  if test "x$has_forbidden_chars" != x; then
11972    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11973    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11974  fi
11975
11976
11977  windows_path="$new_path"
11978  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11979    unix_path=`$CYGPATH -u "$windows_path"`
11980    new_path="$unix_path"
11981  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11982    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11983    new_path="$unix_path"
11984  fi
11985
11986  if test "x$path" != "x$new_path"; then
11987    BOOT_JDK="$new_path"
11988    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11989$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11990  fi
11991
11992  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11993  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11994
11995  else
11996    # We're on a posix platform. Hooray! :)
11997    path="$BOOT_JDK"
11998    has_space=`$ECHO "$path" | $GREP " "`
11999    if test "x$has_space" != x; then
12000      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12001$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12002      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12003    fi
12004
12005    # Use eval to expand a potential ~
12006    eval path="$path"
12007    if test ! -f "$path" && test ! -d "$path"; then
12008      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12009    fi
12010
12011    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12012  fi
12013
12014              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12015$as_echo_n "checking for Boot JDK... " >&6; }
12016              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12017$as_echo "$BOOT_JDK" >&6; }
12018              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12019$as_echo_n "checking Boot JDK version... " >&6; }
12020              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12021              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12022$as_echo "$BOOT_JDK_VERSION" >&6; }
12023            fi # end check jdk version
12024          fi # end check rt.jar
12025        fi # end check javac
12026      fi # end check java
12027    fi # end check boot jdk found
12028  fi
12029
12030
12031# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
12032
12033  if test "x$BOOT_JDK_FOUND" = xno; then
12034    # Now execute the test
12035
12036    if test -x /usr/libexec/java_home; then
12037        BOOT_JDK=`/usr/libexec/java_home`
12038        BOOT_JDK_FOUND=maybe
12039        { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
12040$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
12041    fi
12042
12043
12044    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12045    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12046      # Do we have a bin/java?
12047      if test ! -x "$BOOT_JDK/bin/java"; then
12048        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12049$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12050        BOOT_JDK_FOUND=no
12051      else
12052        # Do we have a bin/javac?
12053        if test ! -x "$BOOT_JDK/bin/javac"; then
12054          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12055$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12056          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12057$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12058          BOOT_JDK_FOUND=no
12059        else
12060          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12061          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12062            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12063$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12064            BOOT_JDK_FOUND=no
12065          else
12066            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12067            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12068
12069            # Extra M4 quote needed to protect [] in grep expression.
12070            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12071            if test "x$FOUND_VERSION_78" = x; then
12072              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12073$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12074              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12075$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12076              BOOT_JDK_FOUND=no
12077            else
12078              # We're done! :-)
12079              BOOT_JDK_FOUND=yes
12080
12081  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12082
12083  # Input might be given as Windows format, start by converting to
12084  # unix format.
12085  path="$BOOT_JDK"
12086  new_path=`$CYGPATH -u "$path"`
12087
12088  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12089  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12090  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12091  # "foo.exe" is OK but "foo" is an error.
12092  #
12093  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12094  # It is also a way to make sure we got the proper file name for the real test later on.
12095  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12096  if test "x$test_shortpath" = x; then
12097    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12098$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12099    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12100  fi
12101
12102  # Call helper function which possibly converts this using DOS-style short mode.
12103  # If so, the updated path is stored in $new_path.
12104
12105  input_path="$new_path"
12106  # Check if we need to convert this using DOS-style short mode. If the path
12107  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12108  # take no chances and rewrite it.
12109  # Note: m4 eats our [], so we need to use [ and ] instead.
12110  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12111  if test "x$has_forbidden_chars" != x; then
12112    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12113    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12114    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12115    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12116      # Going to short mode and back again did indeed matter. Since short mode is
12117      # case insensitive, let's make it lowercase to improve readability.
12118      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12119      # Now convert it back to Unix-stile (cygpath)
12120      input_path=`$CYGPATH -u "$shortmode_path"`
12121      new_path="$input_path"
12122    fi
12123  fi
12124
12125  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12126  if test "x$test_cygdrive_prefix" = x; then
12127    # As a simple fix, exclude /usr/bin since it's not a real path.
12128    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12129      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12130      # a path prefixed by /cygdrive for fixpath to work.
12131      new_path="$CYGWIN_ROOT_PATH$input_path"
12132    fi
12133  fi
12134
12135
12136  if test "x$path" != "x$new_path"; then
12137    BOOT_JDK="$new_path"
12138    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12139$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12140  fi
12141
12142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12143
12144  path="$BOOT_JDK"
12145  has_colon=`$ECHO $path | $GREP ^.:`
12146  new_path="$path"
12147  if test "x$has_colon" = x; then
12148    # Not in mixed or Windows style, start by that.
12149    new_path=`cmd //c echo $path`
12150  fi
12151
12152
12153  input_path="$new_path"
12154  # Check if we need to convert this using DOS-style short mode. If the path
12155  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12156  # take no chances and rewrite it.
12157  # Note: m4 eats our [], so we need to use [ and ] instead.
12158  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12159  if test "x$has_forbidden_chars" != x; then
12160    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12161    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12162  fi
12163
12164
12165  windows_path="$new_path"
12166  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12167    unix_path=`$CYGPATH -u "$windows_path"`
12168    new_path="$unix_path"
12169  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12170    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12171    new_path="$unix_path"
12172  fi
12173
12174  if test "x$path" != "x$new_path"; then
12175    BOOT_JDK="$new_path"
12176    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12177$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12178  fi
12179
12180  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12181  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12182
12183  else
12184    # We're on a posix platform. Hooray! :)
12185    path="$BOOT_JDK"
12186    has_space=`$ECHO "$path" | $GREP " "`
12187    if test "x$has_space" != x; then
12188      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12189$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12190      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12191    fi
12192
12193    # Use eval to expand a potential ~
12194    eval path="$path"
12195    if test ! -f "$path" && test ! -d "$path"; then
12196      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12197    fi
12198
12199    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12200  fi
12201
12202              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12203$as_echo_n "checking for Boot JDK... " >&6; }
12204              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12205$as_echo "$BOOT_JDK" >&6; }
12206              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12207$as_echo_n "checking Boot JDK version... " >&6; }
12208              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12209              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12210$as_echo "$BOOT_JDK_VERSION" >&6; }
12211            fi # end check jdk version
12212          fi # end check rt.jar
12213        fi # end check javac
12214      fi # end check java
12215    fi # end check boot jdk found
12216  fi
12217
12218
12219# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
12220
12221  if test "x$BOOT_JDK_FOUND" = xno; then
12222    # Now execute the test
12223
12224    # Extract the first word of "javac", so it can be a program name with args.
12225set dummy javac; ac_word=$2
12226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12227$as_echo_n "checking for $ac_word... " >&6; }
12228if ${ac_cv_path_JAVAC_CHECK+:} false; then :
12229  $as_echo_n "(cached) " >&6
12230else
12231  case $JAVAC_CHECK in
12232  [\\/]* | ?:[\\/]*)
12233  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
12234  ;;
12235  *)
12236  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12237for as_dir in $PATH
12238do
12239  IFS=$as_save_IFS
12240  test -z "$as_dir" && as_dir=.
12241    for ac_exec_ext in '' $ac_executable_extensions; do
12242  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12243    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
12244    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12245    break 2
12246  fi
12247done
12248  done
12249IFS=$as_save_IFS
12250
12251  ;;
12252esac
12253fi
12254JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
12255if test -n "$JAVAC_CHECK"; then
12256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
12257$as_echo "$JAVAC_CHECK" >&6; }
12258else
12259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12260$as_echo "no" >&6; }
12261fi
12262
12263
12264    # Extract the first word of "java", so it can be a program name with args.
12265set dummy java; ac_word=$2
12266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12267$as_echo_n "checking for $ac_word... " >&6; }
12268if ${ac_cv_path_JAVA_CHECK+:} false; then :
12269  $as_echo_n "(cached) " >&6
12270else
12271  case $JAVA_CHECK in
12272  [\\/]* | ?:[\\/]*)
12273  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
12274  ;;
12275  *)
12276  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12277for as_dir in $PATH
12278do
12279  IFS=$as_save_IFS
12280  test -z "$as_dir" && as_dir=.
12281    for ac_exec_ext in '' $ac_executable_extensions; do
12282  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12283    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
12284    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12285    break 2
12286  fi
12287done
12288  done
12289IFS=$as_save_IFS
12290
12291  ;;
12292esac
12293fi
12294JAVA_CHECK=$ac_cv_path_JAVA_CHECK
12295if test -n "$JAVA_CHECK"; then
12296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
12297$as_echo "$JAVA_CHECK" >&6; }
12298else
12299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12300$as_echo "no" >&6; }
12301fi
12302
12303
12304    BINARY="$JAVAC_CHECK"
12305    if test "x$JAVAC_CHECK" = x; then
12306        BINARY="$JAVA_CHECK"
12307    fi
12308    if test "x$BINARY" != x; then
12309        # So there is a java(c) binary, it might be part of a JDK.
12310        # Lets find the JDK/JRE directory by following symbolic links.
12311        # Linux/GNU systems often have links from /usr/bin/java to
12312        # /etc/alternatives/java to the real JDK binary.
12313
12314    if test "x$OPENJDK_BUILD_OS" != xwindows; then
12315        # Follow a chain of symbolic links. Use readlink
12316        # where it exists, else fall back to horribly
12317        # complicated shell code.
12318        if test "x$READLINK_TESTED" != yes; then
12319            # On MacOSX there is a readlink tool with a different
12320            # purpose than the GNU readlink tool. Check the found readlink.
12321            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12322            if test "x$ISGNU" = x; then
12323                 # A readlink that we do not know how to use.
12324                 # Are there other non-GNU readlinks out there?
12325                 READLINK_TESTED=yes
12326                 READLINK=
12327            fi
12328        fi
12329
12330        if test "x$READLINK" != x; then
12331            BINARY=`$READLINK -f $BINARY`
12332        else
12333            # Save the current directory for restoring afterwards
12334            STARTDIR=$PWD
12335            COUNTER=0
12336            sym_link_dir=`$DIRNAME $BINARY`
12337            sym_link_file=`$BASENAME $BINARY`
12338            cd $sym_link_dir
12339            # Use -P flag to resolve symlinks in directories.
12340            cd `$THEPWDCMD -P`
12341            sym_link_dir=`$THEPWDCMD -P`
12342            # Resolve file symlinks
12343            while test $COUNTER -lt 20; do
12344                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12345                if test "x$ISLINK" == x; then
12346                    # This is not a symbolic link! We are done!
12347                    break
12348                fi
12349                # Again resolve directory symlinks since the target of the just found
12350                # link could be in a different directory
12351                cd `$DIRNAME $ISLINK`
12352                sym_link_dir=`$THEPWDCMD -P`
12353                sym_link_file=`$BASENAME $ISLINK`
12354                let COUNTER=COUNTER+1
12355            done
12356            cd $STARTDIR
12357            BINARY=$sym_link_dir/$sym_link_file
12358        fi
12359    fi
12360
12361        BOOT_JDK=`dirname "$BINARY"`
12362        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12363        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12364            # Looks like we found ourselves an JDK
12365            BOOT_JDK_FOUND=maybe
12366            { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12367$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12368        fi
12369    fi
12370
12371
12372    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12373    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12374      # Do we have a bin/java?
12375      if test ! -x "$BOOT_JDK/bin/java"; then
12376        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12377$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12378        BOOT_JDK_FOUND=no
12379      else
12380        # Do we have a bin/javac?
12381        if test ! -x "$BOOT_JDK/bin/javac"; then
12382          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12383$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12384          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12385$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12386          BOOT_JDK_FOUND=no
12387        else
12388          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12389          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12390            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12391$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12392            BOOT_JDK_FOUND=no
12393          else
12394            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12395            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12396
12397            # Extra M4 quote needed to protect [] in grep expression.
12398            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12399            if test "x$FOUND_VERSION_78" = x; then
12400              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12401$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12402              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12403$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12404              BOOT_JDK_FOUND=no
12405            else
12406              # We're done! :-)
12407              BOOT_JDK_FOUND=yes
12408
12409  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12410
12411  # Input might be given as Windows format, start by converting to
12412  # unix format.
12413  path="$BOOT_JDK"
12414  new_path=`$CYGPATH -u "$path"`
12415
12416  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12417  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12418  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12419  # "foo.exe" is OK but "foo" is an error.
12420  #
12421  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12422  # It is also a way to make sure we got the proper file name for the real test later on.
12423  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12424  if test "x$test_shortpath" = x; then
12425    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12426$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12427    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12428  fi
12429
12430  # Call helper function which possibly converts this using DOS-style short mode.
12431  # If so, the updated path is stored in $new_path.
12432
12433  input_path="$new_path"
12434  # Check if we need to convert this using DOS-style short mode. If the path
12435  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12436  # take no chances and rewrite it.
12437  # Note: m4 eats our [], so we need to use [ and ] instead.
12438  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12439  if test "x$has_forbidden_chars" != x; then
12440    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12441    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12442    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12443    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12444      # Going to short mode and back again did indeed matter. Since short mode is
12445      # case insensitive, let's make it lowercase to improve readability.
12446      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12447      # Now convert it back to Unix-stile (cygpath)
12448      input_path=`$CYGPATH -u "$shortmode_path"`
12449      new_path="$input_path"
12450    fi
12451  fi
12452
12453  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12454  if test "x$test_cygdrive_prefix" = x; then
12455    # As a simple fix, exclude /usr/bin since it's not a real path.
12456    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12457      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12458      # a path prefixed by /cygdrive for fixpath to work.
12459      new_path="$CYGWIN_ROOT_PATH$input_path"
12460    fi
12461  fi
12462
12463
12464  if test "x$path" != "x$new_path"; then
12465    BOOT_JDK="$new_path"
12466    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12467$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12468  fi
12469
12470  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12471
12472  path="$BOOT_JDK"
12473  has_colon=`$ECHO $path | $GREP ^.:`
12474  new_path="$path"
12475  if test "x$has_colon" = x; then
12476    # Not in mixed or Windows style, start by that.
12477    new_path=`cmd //c echo $path`
12478  fi
12479
12480
12481  input_path="$new_path"
12482  # Check if we need to convert this using DOS-style short mode. If the path
12483  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12484  # take no chances and rewrite it.
12485  # Note: m4 eats our [], so we need to use [ and ] instead.
12486  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12487  if test "x$has_forbidden_chars" != x; then
12488    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12489    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12490  fi
12491
12492
12493  windows_path="$new_path"
12494  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12495    unix_path=`$CYGPATH -u "$windows_path"`
12496    new_path="$unix_path"
12497  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12498    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12499    new_path="$unix_path"
12500  fi
12501
12502  if test "x$path" != "x$new_path"; then
12503    BOOT_JDK="$new_path"
12504    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12505$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12506  fi
12507
12508  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12509  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12510
12511  else
12512    # We're on a posix platform. Hooray! :)
12513    path="$BOOT_JDK"
12514    has_space=`$ECHO "$path" | $GREP " "`
12515    if test "x$has_space" != x; then
12516      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12517$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12518      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12519    fi
12520
12521    # Use eval to expand a potential ~
12522    eval path="$path"
12523    if test ! -f "$path" && test ! -d "$path"; then
12524      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12525    fi
12526
12527    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12528  fi
12529
12530              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12531$as_echo_n "checking for Boot JDK... " >&6; }
12532              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12533$as_echo "$BOOT_JDK" >&6; }
12534              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12535$as_echo_n "checking Boot JDK version... " >&6; }
12536              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12537              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12538$as_echo "$BOOT_JDK_VERSION" >&6; }
12539            fi # end check jdk version
12540          fi # end check rt.jar
12541        fi # end check javac
12542      fi # end check java
12543    fi # end check boot jdk found
12544  fi
12545
12546
12547# Test: Is there a JDK installed in default, well-known locations?
12548
12549  if test "x$BOOT_JDK_FOUND" = xno; then
12550    # Now execute the test
12551
12552  if test "x$OPENJDK_TARGET_OS" = xwindows; then
12553
12554  if test "x$BOOT_JDK_FOUND" = xno; then
12555    # Now execute the test
12556
12557  if test "x$ProgramW6432" != x; then
12558    VIRTUAL_DIR="$ProgramW6432/Java"
12559
12560  windows_path="$VIRTUAL_DIR"
12561  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12562    unix_path=`$CYGPATH -u "$windows_path"`
12563    VIRTUAL_DIR="$unix_path"
12564  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12565    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12566    VIRTUAL_DIR="$unix_path"
12567  fi
12568
12569
12570  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12571  BOOT_JDK_SUFFIX=""
12572  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12573  if test "x$ALL_JDKS_FOUND" != x; then
12574    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12575
12576  if test "x$BOOT_JDK_FOUND" = xno; then
12577    # Now execute the test
12578
12579        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12580        if test -d "$BOOT_JDK"; then
12581          BOOT_JDK_FOUND=maybe
12582          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12583$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12584        fi
12585
12586
12587    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12588    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12589      # Do we have a bin/java?
12590      if test ! -x "$BOOT_JDK/bin/java"; then
12591        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12592$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12593        BOOT_JDK_FOUND=no
12594      else
12595        # Do we have a bin/javac?
12596        if test ! -x "$BOOT_JDK/bin/javac"; then
12597          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12598$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12599          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12600$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12601          BOOT_JDK_FOUND=no
12602        else
12603          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12604          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12605            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12606$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12607            BOOT_JDK_FOUND=no
12608          else
12609            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12610            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12611
12612            # Extra M4 quote needed to protect [] in grep expression.
12613            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12614            if test "x$FOUND_VERSION_78" = x; then
12615              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12616$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12617              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12618$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12619              BOOT_JDK_FOUND=no
12620            else
12621              # We're done! :-)
12622              BOOT_JDK_FOUND=yes
12623
12624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12625
12626  # Input might be given as Windows format, start by converting to
12627  # unix format.
12628  path="$BOOT_JDK"
12629  new_path=`$CYGPATH -u "$path"`
12630
12631  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12632  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12633  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12634  # "foo.exe" is OK but "foo" is an error.
12635  #
12636  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12637  # It is also a way to make sure we got the proper file name for the real test later on.
12638  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12639  if test "x$test_shortpath" = x; then
12640    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12641$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12642    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12643  fi
12644
12645  # Call helper function which possibly converts this using DOS-style short mode.
12646  # If so, the updated path is stored in $new_path.
12647
12648  input_path="$new_path"
12649  # Check if we need to convert this using DOS-style short mode. If the path
12650  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12651  # take no chances and rewrite it.
12652  # Note: m4 eats our [], so we need to use [ and ] instead.
12653  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12654  if test "x$has_forbidden_chars" != x; then
12655    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12656    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12657    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12658    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12659      # Going to short mode and back again did indeed matter. Since short mode is
12660      # case insensitive, let's make it lowercase to improve readability.
12661      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12662      # Now convert it back to Unix-stile (cygpath)
12663      input_path=`$CYGPATH -u "$shortmode_path"`
12664      new_path="$input_path"
12665    fi
12666  fi
12667
12668  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12669  if test "x$test_cygdrive_prefix" = x; then
12670    # As a simple fix, exclude /usr/bin since it's not a real path.
12671    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12672      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12673      # a path prefixed by /cygdrive for fixpath to work.
12674      new_path="$CYGWIN_ROOT_PATH$input_path"
12675    fi
12676  fi
12677
12678
12679  if test "x$path" != "x$new_path"; then
12680    BOOT_JDK="$new_path"
12681    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12682$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12683  fi
12684
12685  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12686
12687  path="$BOOT_JDK"
12688  has_colon=`$ECHO $path | $GREP ^.:`
12689  new_path="$path"
12690  if test "x$has_colon" = x; then
12691    # Not in mixed or Windows style, start by that.
12692    new_path=`cmd //c echo $path`
12693  fi
12694
12695
12696  input_path="$new_path"
12697  # Check if we need to convert this using DOS-style short mode. If the path
12698  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12699  # take no chances and rewrite it.
12700  # Note: m4 eats our [], so we need to use [ and ] instead.
12701  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12702  if test "x$has_forbidden_chars" != x; then
12703    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12704    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12705  fi
12706
12707
12708  windows_path="$new_path"
12709  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12710    unix_path=`$CYGPATH -u "$windows_path"`
12711    new_path="$unix_path"
12712  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12713    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12714    new_path="$unix_path"
12715  fi
12716
12717  if test "x$path" != "x$new_path"; then
12718    BOOT_JDK="$new_path"
12719    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12720$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12721  fi
12722
12723  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12724  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12725
12726  else
12727    # We're on a posix platform. Hooray! :)
12728    path="$BOOT_JDK"
12729    has_space=`$ECHO "$path" | $GREP " "`
12730    if test "x$has_space" != x; then
12731      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12732$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12733      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12734    fi
12735
12736    # Use eval to expand a potential ~
12737    eval path="$path"
12738    if test ! -f "$path" && test ! -d "$path"; then
12739      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12740    fi
12741
12742    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12743  fi
12744
12745              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12746$as_echo_n "checking for Boot JDK... " >&6; }
12747              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12748$as_echo "$BOOT_JDK" >&6; }
12749              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12750$as_echo_n "checking Boot JDK version... " >&6; }
12751              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12752              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12753$as_echo "$BOOT_JDK_VERSION" >&6; }
12754            fi # end check jdk version
12755          fi # end check rt.jar
12756        fi # end check javac
12757      fi # end check java
12758    fi # end check boot jdk found
12759  fi
12760
12761    done
12762  fi
12763
12764  fi
12765
12766
12767    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12768    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12769      # Do we have a bin/java?
12770      if test ! -x "$BOOT_JDK/bin/java"; then
12771        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12772$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12773        BOOT_JDK_FOUND=no
12774      else
12775        # Do we have a bin/javac?
12776        if test ! -x "$BOOT_JDK/bin/javac"; then
12777          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12778$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12779          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12780$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12781          BOOT_JDK_FOUND=no
12782        else
12783          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12784          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12785            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12786$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12787            BOOT_JDK_FOUND=no
12788          else
12789            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12790            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12791
12792            # Extra M4 quote needed to protect [] in grep expression.
12793            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12794            if test "x$FOUND_VERSION_78" = x; then
12795              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12796$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12797              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12798$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12799              BOOT_JDK_FOUND=no
12800            else
12801              # We're done! :-)
12802              BOOT_JDK_FOUND=yes
12803
12804  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12805
12806  # Input might be given as Windows format, start by converting to
12807  # unix format.
12808  path="$BOOT_JDK"
12809  new_path=`$CYGPATH -u "$path"`
12810
12811  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12812  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12813  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12814  # "foo.exe" is OK but "foo" is an error.
12815  #
12816  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12817  # It is also a way to make sure we got the proper file name for the real test later on.
12818  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12819  if test "x$test_shortpath" = x; then
12820    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12821$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12822    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12823  fi
12824
12825  # Call helper function which possibly converts this using DOS-style short mode.
12826  # If so, the updated path is stored in $new_path.
12827
12828  input_path="$new_path"
12829  # Check if we need to convert this using DOS-style short mode. If the path
12830  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12831  # take no chances and rewrite it.
12832  # Note: m4 eats our [], so we need to use [ and ] instead.
12833  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12834  if test "x$has_forbidden_chars" != x; then
12835    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12836    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12837    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12838    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12839      # Going to short mode and back again did indeed matter. Since short mode is
12840      # case insensitive, let's make it lowercase to improve readability.
12841      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12842      # Now convert it back to Unix-stile (cygpath)
12843      input_path=`$CYGPATH -u "$shortmode_path"`
12844      new_path="$input_path"
12845    fi
12846  fi
12847
12848  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12849  if test "x$test_cygdrive_prefix" = x; then
12850    # As a simple fix, exclude /usr/bin since it's not a real path.
12851    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12852      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12853      # a path prefixed by /cygdrive for fixpath to work.
12854      new_path="$CYGWIN_ROOT_PATH$input_path"
12855    fi
12856  fi
12857
12858
12859  if test "x$path" != "x$new_path"; then
12860    BOOT_JDK="$new_path"
12861    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12862$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12863  fi
12864
12865  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12866
12867  path="$BOOT_JDK"
12868  has_colon=`$ECHO $path | $GREP ^.:`
12869  new_path="$path"
12870  if test "x$has_colon" = x; then
12871    # Not in mixed or Windows style, start by that.
12872    new_path=`cmd //c echo $path`
12873  fi
12874
12875
12876  input_path="$new_path"
12877  # Check if we need to convert this using DOS-style short mode. If the path
12878  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12879  # take no chances and rewrite it.
12880  # Note: m4 eats our [], so we need to use [ and ] instead.
12881  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12882  if test "x$has_forbidden_chars" != x; then
12883    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12884    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12885  fi
12886
12887
12888  windows_path="$new_path"
12889  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12890    unix_path=`$CYGPATH -u "$windows_path"`
12891    new_path="$unix_path"
12892  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12893    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12894    new_path="$unix_path"
12895  fi
12896
12897  if test "x$path" != "x$new_path"; then
12898    BOOT_JDK="$new_path"
12899    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12900$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12901  fi
12902
12903  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12904  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12905
12906  else
12907    # We're on a posix platform. Hooray! :)
12908    path="$BOOT_JDK"
12909    has_space=`$ECHO "$path" | $GREP " "`
12910    if test "x$has_space" != x; then
12911      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12912$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12913      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12914    fi
12915
12916    # Use eval to expand a potential ~
12917    eval path="$path"
12918    if test ! -f "$path" && test ! -d "$path"; then
12919      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12920    fi
12921
12922    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12923  fi
12924
12925              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12926$as_echo_n "checking for Boot JDK... " >&6; }
12927              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12928$as_echo "$BOOT_JDK" >&6; }
12929              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12930$as_echo_n "checking Boot JDK version... " >&6; }
12931              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12932              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12933$as_echo "$BOOT_JDK_VERSION" >&6; }
12934            fi # end check jdk version
12935          fi # end check rt.jar
12936        fi # end check javac
12937      fi # end check java
12938    fi # end check boot jdk found
12939  fi
12940
12941
12942  if test "x$BOOT_JDK_FOUND" = xno; then
12943    # Now execute the test
12944
12945  if test "x$PROGRAMW6432" != x; then
12946    VIRTUAL_DIR="$PROGRAMW6432/Java"
12947
12948  windows_path="$VIRTUAL_DIR"
12949  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12950    unix_path=`$CYGPATH -u "$windows_path"`
12951    VIRTUAL_DIR="$unix_path"
12952  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12953    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12954    VIRTUAL_DIR="$unix_path"
12955  fi
12956
12957
12958  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12959  BOOT_JDK_SUFFIX=""
12960  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12961  if test "x$ALL_JDKS_FOUND" != x; then
12962    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12963
12964  if test "x$BOOT_JDK_FOUND" = xno; then
12965    # Now execute the test
12966
12967        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12968        if test -d "$BOOT_JDK"; then
12969          BOOT_JDK_FOUND=maybe
12970          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12971$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12972        fi
12973
12974
12975    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12976    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12977      # Do we have a bin/java?
12978      if test ! -x "$BOOT_JDK/bin/java"; then
12979        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12980$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12981        BOOT_JDK_FOUND=no
12982      else
12983        # Do we have a bin/javac?
12984        if test ! -x "$BOOT_JDK/bin/javac"; then
12985          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12986$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12987          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12988$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12989          BOOT_JDK_FOUND=no
12990        else
12991          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12992          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12993            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12994$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12995            BOOT_JDK_FOUND=no
12996          else
12997            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12998            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12999
13000            # Extra M4 quote needed to protect [] in grep expression.
13001            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13002            if test "x$FOUND_VERSION_78" = x; then
13003              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13004$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13005              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13006$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13007              BOOT_JDK_FOUND=no
13008            else
13009              # We're done! :-)
13010              BOOT_JDK_FOUND=yes
13011
13012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13013
13014  # Input might be given as Windows format, start by converting to
13015  # unix format.
13016  path="$BOOT_JDK"
13017  new_path=`$CYGPATH -u "$path"`
13018
13019  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13020  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13021  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13022  # "foo.exe" is OK but "foo" is an error.
13023  #
13024  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13025  # It is also a way to make sure we got the proper file name for the real test later on.
13026  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13027  if test "x$test_shortpath" = x; then
13028    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13029$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13030    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13031  fi
13032
13033  # Call helper function which possibly converts this using DOS-style short mode.
13034  # If so, the updated path is stored in $new_path.
13035
13036  input_path="$new_path"
13037  # Check if we need to convert this using DOS-style short mode. If the path
13038  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13039  # take no chances and rewrite it.
13040  # Note: m4 eats our [], so we need to use [ and ] instead.
13041  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13042  if test "x$has_forbidden_chars" != x; then
13043    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13044    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13045    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13046    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13047      # Going to short mode and back again did indeed matter. Since short mode is
13048      # case insensitive, let's make it lowercase to improve readability.
13049      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13050      # Now convert it back to Unix-stile (cygpath)
13051      input_path=`$CYGPATH -u "$shortmode_path"`
13052      new_path="$input_path"
13053    fi
13054  fi
13055
13056  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13057  if test "x$test_cygdrive_prefix" = x; then
13058    # As a simple fix, exclude /usr/bin since it's not a real path.
13059    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13060      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13061      # a path prefixed by /cygdrive for fixpath to work.
13062      new_path="$CYGWIN_ROOT_PATH$input_path"
13063    fi
13064  fi
13065
13066
13067  if test "x$path" != "x$new_path"; then
13068    BOOT_JDK="$new_path"
13069    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13070$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13071  fi
13072
13073  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13074
13075  path="$BOOT_JDK"
13076  has_colon=`$ECHO $path | $GREP ^.:`
13077  new_path="$path"
13078  if test "x$has_colon" = x; then
13079    # Not in mixed or Windows style, start by that.
13080    new_path=`cmd //c echo $path`
13081  fi
13082
13083
13084  input_path="$new_path"
13085  # Check if we need to convert this using DOS-style short mode. If the path
13086  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13087  # take no chances and rewrite it.
13088  # Note: m4 eats our [], so we need to use [ and ] instead.
13089  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13090  if test "x$has_forbidden_chars" != x; then
13091    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13092    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13093  fi
13094
13095
13096  windows_path="$new_path"
13097  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13098    unix_path=`$CYGPATH -u "$windows_path"`
13099    new_path="$unix_path"
13100  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13101    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13102    new_path="$unix_path"
13103  fi
13104
13105  if test "x$path" != "x$new_path"; then
13106    BOOT_JDK="$new_path"
13107    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13108$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13109  fi
13110
13111  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13112  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13113
13114  else
13115    # We're on a posix platform. Hooray! :)
13116    path="$BOOT_JDK"
13117    has_space=`$ECHO "$path" | $GREP " "`
13118    if test "x$has_space" != x; then
13119      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13120$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13121      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13122    fi
13123
13124    # Use eval to expand a potential ~
13125    eval path="$path"
13126    if test ! -f "$path" && test ! -d "$path"; then
13127      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13128    fi
13129
13130    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13131  fi
13132
13133              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13134$as_echo_n "checking for Boot JDK... " >&6; }
13135              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13136$as_echo "$BOOT_JDK" >&6; }
13137              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13138$as_echo_n "checking Boot JDK version... " >&6; }
13139              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13140              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13141$as_echo "$BOOT_JDK_VERSION" >&6; }
13142            fi # end check jdk version
13143          fi # end check rt.jar
13144        fi # end check javac
13145      fi # end check java
13146    fi # end check boot jdk found
13147  fi
13148
13149    done
13150  fi
13151
13152  fi
13153
13154
13155    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13156    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13157      # Do we have a bin/java?
13158      if test ! -x "$BOOT_JDK/bin/java"; then
13159        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13160$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13161        BOOT_JDK_FOUND=no
13162      else
13163        # Do we have a bin/javac?
13164        if test ! -x "$BOOT_JDK/bin/javac"; then
13165          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13166$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13167          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13168$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13169          BOOT_JDK_FOUND=no
13170        else
13171          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13172          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13173            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13174$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13175            BOOT_JDK_FOUND=no
13176          else
13177            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13178            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13179
13180            # Extra M4 quote needed to protect [] in grep expression.
13181            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13182            if test "x$FOUND_VERSION_78" = x; then
13183              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13184$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13185              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13186$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13187              BOOT_JDK_FOUND=no
13188            else
13189              # We're done! :-)
13190              BOOT_JDK_FOUND=yes
13191
13192  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13193
13194  # Input might be given as Windows format, start by converting to
13195  # unix format.
13196  path="$BOOT_JDK"
13197  new_path=`$CYGPATH -u "$path"`
13198
13199  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13200  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13201  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13202  # "foo.exe" is OK but "foo" is an error.
13203  #
13204  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13205  # It is also a way to make sure we got the proper file name for the real test later on.
13206  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13207  if test "x$test_shortpath" = x; then
13208    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13209$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13210    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13211  fi
13212
13213  # Call helper function which possibly converts this using DOS-style short mode.
13214  # If so, the updated path is stored in $new_path.
13215
13216  input_path="$new_path"
13217  # Check if we need to convert this using DOS-style short mode. If the path
13218  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13219  # take no chances and rewrite it.
13220  # Note: m4 eats our [], so we need to use [ and ] instead.
13221  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13222  if test "x$has_forbidden_chars" != x; then
13223    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13224    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13225    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13226    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13227      # Going to short mode and back again did indeed matter. Since short mode is
13228      # case insensitive, let's make it lowercase to improve readability.
13229      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13230      # Now convert it back to Unix-stile (cygpath)
13231      input_path=`$CYGPATH -u "$shortmode_path"`
13232      new_path="$input_path"
13233    fi
13234  fi
13235
13236  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13237  if test "x$test_cygdrive_prefix" = x; then
13238    # As a simple fix, exclude /usr/bin since it's not a real path.
13239    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13240      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13241      # a path prefixed by /cygdrive for fixpath to work.
13242      new_path="$CYGWIN_ROOT_PATH$input_path"
13243    fi
13244  fi
13245
13246
13247  if test "x$path" != "x$new_path"; then
13248    BOOT_JDK="$new_path"
13249    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13250$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13251  fi
13252
13253  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13254
13255  path="$BOOT_JDK"
13256  has_colon=`$ECHO $path | $GREP ^.:`
13257  new_path="$path"
13258  if test "x$has_colon" = x; then
13259    # Not in mixed or Windows style, start by that.
13260    new_path=`cmd //c echo $path`
13261  fi
13262
13263
13264  input_path="$new_path"
13265  # Check if we need to convert this using DOS-style short mode. If the path
13266  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13267  # take no chances and rewrite it.
13268  # Note: m4 eats our [], so we need to use [ and ] instead.
13269  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13270  if test "x$has_forbidden_chars" != x; then
13271    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13272    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13273  fi
13274
13275
13276  windows_path="$new_path"
13277  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13278    unix_path=`$CYGPATH -u "$windows_path"`
13279    new_path="$unix_path"
13280  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13281    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13282    new_path="$unix_path"
13283  fi
13284
13285  if test "x$path" != "x$new_path"; then
13286    BOOT_JDK="$new_path"
13287    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13288$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13289  fi
13290
13291  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13292  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13293
13294  else
13295    # We're on a posix platform. Hooray! :)
13296    path="$BOOT_JDK"
13297    has_space=`$ECHO "$path" | $GREP " "`
13298    if test "x$has_space" != x; then
13299      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13300$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13301      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13302    fi
13303
13304    # Use eval to expand a potential ~
13305    eval path="$path"
13306    if test ! -f "$path" && test ! -d "$path"; then
13307      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13308    fi
13309
13310    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13311  fi
13312
13313              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13314$as_echo_n "checking for Boot JDK... " >&6; }
13315              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13316$as_echo "$BOOT_JDK" >&6; }
13317              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13318$as_echo_n "checking Boot JDK version... " >&6; }
13319              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13320              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13321$as_echo "$BOOT_JDK_VERSION" >&6; }
13322            fi # end check jdk version
13323          fi # end check rt.jar
13324        fi # end check javac
13325      fi # end check java
13326    fi # end check boot jdk found
13327  fi
13328
13329
13330  if test "x$BOOT_JDK_FOUND" = xno; then
13331    # Now execute the test
13332
13333  if test "x$PROGRAMFILES" != x; then
13334    VIRTUAL_DIR="$PROGRAMFILES/Java"
13335
13336  windows_path="$VIRTUAL_DIR"
13337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13338    unix_path=`$CYGPATH -u "$windows_path"`
13339    VIRTUAL_DIR="$unix_path"
13340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13341    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13342    VIRTUAL_DIR="$unix_path"
13343  fi
13344
13345
13346  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13347  BOOT_JDK_SUFFIX=""
13348  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13349  if test "x$ALL_JDKS_FOUND" != x; then
13350    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13351
13352  if test "x$BOOT_JDK_FOUND" = xno; then
13353    # Now execute the test
13354
13355        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13356        if test -d "$BOOT_JDK"; then
13357          BOOT_JDK_FOUND=maybe
13358          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13359$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13360        fi
13361
13362
13363    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13364    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13365      # Do we have a bin/java?
13366      if test ! -x "$BOOT_JDK/bin/java"; then
13367        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13368$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13369        BOOT_JDK_FOUND=no
13370      else
13371        # Do we have a bin/javac?
13372        if test ! -x "$BOOT_JDK/bin/javac"; then
13373          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13374$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13375          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13376$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13377          BOOT_JDK_FOUND=no
13378        else
13379          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13380          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13381            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13382$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13383            BOOT_JDK_FOUND=no
13384          else
13385            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13386            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13387
13388            # Extra M4 quote needed to protect [] in grep expression.
13389            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13390            if test "x$FOUND_VERSION_78" = x; then
13391              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13392$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13393              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13394$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13395              BOOT_JDK_FOUND=no
13396            else
13397              # We're done! :-)
13398              BOOT_JDK_FOUND=yes
13399
13400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13401
13402  # Input might be given as Windows format, start by converting to
13403  # unix format.
13404  path="$BOOT_JDK"
13405  new_path=`$CYGPATH -u "$path"`
13406
13407  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13408  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13409  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13410  # "foo.exe" is OK but "foo" is an error.
13411  #
13412  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13413  # It is also a way to make sure we got the proper file name for the real test later on.
13414  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13415  if test "x$test_shortpath" = x; then
13416    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13417$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13418    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13419  fi
13420
13421  # Call helper function which possibly converts this using DOS-style short mode.
13422  # If so, the updated path is stored in $new_path.
13423
13424  input_path="$new_path"
13425  # Check if we need to convert this using DOS-style short mode. If the path
13426  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13427  # take no chances and rewrite it.
13428  # Note: m4 eats our [], so we need to use [ and ] instead.
13429  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13430  if test "x$has_forbidden_chars" != x; then
13431    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13432    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13433    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13434    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13435      # Going to short mode and back again did indeed matter. Since short mode is
13436      # case insensitive, let's make it lowercase to improve readability.
13437      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13438      # Now convert it back to Unix-stile (cygpath)
13439      input_path=`$CYGPATH -u "$shortmode_path"`
13440      new_path="$input_path"
13441    fi
13442  fi
13443
13444  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13445  if test "x$test_cygdrive_prefix" = x; then
13446    # As a simple fix, exclude /usr/bin since it's not a real path.
13447    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13448      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13449      # a path prefixed by /cygdrive for fixpath to work.
13450      new_path="$CYGWIN_ROOT_PATH$input_path"
13451    fi
13452  fi
13453
13454
13455  if test "x$path" != "x$new_path"; then
13456    BOOT_JDK="$new_path"
13457    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13458$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13459  fi
13460
13461  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13462
13463  path="$BOOT_JDK"
13464  has_colon=`$ECHO $path | $GREP ^.:`
13465  new_path="$path"
13466  if test "x$has_colon" = x; then
13467    # Not in mixed or Windows style, start by that.
13468    new_path=`cmd //c echo $path`
13469  fi
13470
13471
13472  input_path="$new_path"
13473  # Check if we need to convert this using DOS-style short mode. If the path
13474  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13475  # take no chances and rewrite it.
13476  # Note: m4 eats our [], so we need to use [ and ] instead.
13477  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13478  if test "x$has_forbidden_chars" != x; then
13479    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13480    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13481  fi
13482
13483
13484  windows_path="$new_path"
13485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13486    unix_path=`$CYGPATH -u "$windows_path"`
13487    new_path="$unix_path"
13488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13489    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13490    new_path="$unix_path"
13491  fi
13492
13493  if test "x$path" != "x$new_path"; then
13494    BOOT_JDK="$new_path"
13495    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13496$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13497  fi
13498
13499  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13500  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13501
13502  else
13503    # We're on a posix platform. Hooray! :)
13504    path="$BOOT_JDK"
13505    has_space=`$ECHO "$path" | $GREP " "`
13506    if test "x$has_space" != x; then
13507      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13508$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13509      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13510    fi
13511
13512    # Use eval to expand a potential ~
13513    eval path="$path"
13514    if test ! -f "$path" && test ! -d "$path"; then
13515      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13516    fi
13517
13518    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13519  fi
13520
13521              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13522$as_echo_n "checking for Boot JDK... " >&6; }
13523              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13524$as_echo "$BOOT_JDK" >&6; }
13525              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13526$as_echo_n "checking Boot JDK version... " >&6; }
13527              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13528              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13529$as_echo "$BOOT_JDK_VERSION" >&6; }
13530            fi # end check jdk version
13531          fi # end check rt.jar
13532        fi # end check javac
13533      fi # end check java
13534    fi # end check boot jdk found
13535  fi
13536
13537    done
13538  fi
13539
13540  fi
13541
13542
13543    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13544    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13545      # Do we have a bin/java?
13546      if test ! -x "$BOOT_JDK/bin/java"; then
13547        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13548$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13549        BOOT_JDK_FOUND=no
13550      else
13551        # Do we have a bin/javac?
13552        if test ! -x "$BOOT_JDK/bin/javac"; then
13553          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13554$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13555          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13556$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13557          BOOT_JDK_FOUND=no
13558        else
13559          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13560          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13561            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13562$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13563            BOOT_JDK_FOUND=no
13564          else
13565            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13566            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13567
13568            # Extra M4 quote needed to protect [] in grep expression.
13569            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13570            if test "x$FOUND_VERSION_78" = x; then
13571              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13572$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13573              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13574$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13575              BOOT_JDK_FOUND=no
13576            else
13577              # We're done! :-)
13578              BOOT_JDK_FOUND=yes
13579
13580  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13581
13582  # Input might be given as Windows format, start by converting to
13583  # unix format.
13584  path="$BOOT_JDK"
13585  new_path=`$CYGPATH -u "$path"`
13586
13587  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13588  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13589  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13590  # "foo.exe" is OK but "foo" is an error.
13591  #
13592  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13593  # It is also a way to make sure we got the proper file name for the real test later on.
13594  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13595  if test "x$test_shortpath" = x; then
13596    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13597$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13598    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13599  fi
13600
13601  # Call helper function which possibly converts this using DOS-style short mode.
13602  # If so, the updated path is stored in $new_path.
13603
13604  input_path="$new_path"
13605  # Check if we need to convert this using DOS-style short mode. If the path
13606  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13607  # take no chances and rewrite it.
13608  # Note: m4 eats our [], so we need to use [ and ] instead.
13609  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13610  if test "x$has_forbidden_chars" != x; then
13611    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13612    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13613    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13614    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13615      # Going to short mode and back again did indeed matter. Since short mode is
13616      # case insensitive, let's make it lowercase to improve readability.
13617      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13618      # Now convert it back to Unix-stile (cygpath)
13619      input_path=`$CYGPATH -u "$shortmode_path"`
13620      new_path="$input_path"
13621    fi
13622  fi
13623
13624  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13625  if test "x$test_cygdrive_prefix" = x; then
13626    # As a simple fix, exclude /usr/bin since it's not a real path.
13627    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13628      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13629      # a path prefixed by /cygdrive for fixpath to work.
13630      new_path="$CYGWIN_ROOT_PATH$input_path"
13631    fi
13632  fi
13633
13634
13635  if test "x$path" != "x$new_path"; then
13636    BOOT_JDK="$new_path"
13637    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13638$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13639  fi
13640
13641  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13642
13643  path="$BOOT_JDK"
13644  has_colon=`$ECHO $path | $GREP ^.:`
13645  new_path="$path"
13646  if test "x$has_colon" = x; then
13647    # Not in mixed or Windows style, start by that.
13648    new_path=`cmd //c echo $path`
13649  fi
13650
13651
13652  input_path="$new_path"
13653  # Check if we need to convert this using DOS-style short mode. If the path
13654  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13655  # take no chances and rewrite it.
13656  # Note: m4 eats our [], so we need to use [ and ] instead.
13657  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13658  if test "x$has_forbidden_chars" != x; then
13659    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13660    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13661  fi
13662
13663
13664  windows_path="$new_path"
13665  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13666    unix_path=`$CYGPATH -u "$windows_path"`
13667    new_path="$unix_path"
13668  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13669    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13670    new_path="$unix_path"
13671  fi
13672
13673  if test "x$path" != "x$new_path"; then
13674    BOOT_JDK="$new_path"
13675    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13676$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13677  fi
13678
13679  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13680  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13681
13682  else
13683    # We're on a posix platform. Hooray! :)
13684    path="$BOOT_JDK"
13685    has_space=`$ECHO "$path" | $GREP " "`
13686    if test "x$has_space" != x; then
13687      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13688$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13689      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13690    fi
13691
13692    # Use eval to expand a potential ~
13693    eval path="$path"
13694    if test ! -f "$path" && test ! -d "$path"; then
13695      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13696    fi
13697
13698    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13699  fi
13700
13701              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13702$as_echo_n "checking for Boot JDK... " >&6; }
13703              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13704$as_echo "$BOOT_JDK" >&6; }
13705              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13706$as_echo_n "checking Boot JDK version... " >&6; }
13707              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13708              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13709$as_echo "$BOOT_JDK_VERSION" >&6; }
13710            fi # end check jdk version
13711          fi # end check rt.jar
13712        fi # end check javac
13713      fi # end check java
13714    fi # end check boot jdk found
13715  fi
13716
13717
13718  if test "x$BOOT_JDK_FOUND" = xno; then
13719    # Now execute the test
13720
13721  if test "x$ProgramFiles" != x; then
13722    VIRTUAL_DIR="$ProgramFiles/Java"
13723
13724  windows_path="$VIRTUAL_DIR"
13725  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13726    unix_path=`$CYGPATH -u "$windows_path"`
13727    VIRTUAL_DIR="$unix_path"
13728  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13729    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13730    VIRTUAL_DIR="$unix_path"
13731  fi
13732
13733
13734  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13735  BOOT_JDK_SUFFIX=""
13736  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13737  if test "x$ALL_JDKS_FOUND" != x; then
13738    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13739
13740  if test "x$BOOT_JDK_FOUND" = xno; then
13741    # Now execute the test
13742
13743        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13744        if test -d "$BOOT_JDK"; then
13745          BOOT_JDK_FOUND=maybe
13746          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13747$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13748        fi
13749
13750
13751    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13752    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13753      # Do we have a bin/java?
13754      if test ! -x "$BOOT_JDK/bin/java"; then
13755        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13756$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13757        BOOT_JDK_FOUND=no
13758      else
13759        # Do we have a bin/javac?
13760        if test ! -x "$BOOT_JDK/bin/javac"; then
13761          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13762$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13763          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13764$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13765          BOOT_JDK_FOUND=no
13766        else
13767          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13768          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13769            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13770$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13771            BOOT_JDK_FOUND=no
13772          else
13773            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13774            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13775
13776            # Extra M4 quote needed to protect [] in grep expression.
13777            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13778            if test "x$FOUND_VERSION_78" = x; then
13779              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13780$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13781              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13782$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13783              BOOT_JDK_FOUND=no
13784            else
13785              # We're done! :-)
13786              BOOT_JDK_FOUND=yes
13787
13788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13789
13790  # Input might be given as Windows format, start by converting to
13791  # unix format.
13792  path="$BOOT_JDK"
13793  new_path=`$CYGPATH -u "$path"`
13794
13795  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13796  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13797  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13798  # "foo.exe" is OK but "foo" is an error.
13799  #
13800  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13801  # It is also a way to make sure we got the proper file name for the real test later on.
13802  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13803  if test "x$test_shortpath" = x; then
13804    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13805$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13806    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13807  fi
13808
13809  # Call helper function which possibly converts this using DOS-style short mode.
13810  # If so, the updated path is stored in $new_path.
13811
13812  input_path="$new_path"
13813  # Check if we need to convert this using DOS-style short mode. If the path
13814  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13815  # take no chances and rewrite it.
13816  # Note: m4 eats our [], so we need to use [ and ] instead.
13817  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13818  if test "x$has_forbidden_chars" != x; then
13819    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13820    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13821    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13822    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13823      # Going to short mode and back again did indeed matter. Since short mode is
13824      # case insensitive, let's make it lowercase to improve readability.
13825      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13826      # Now convert it back to Unix-stile (cygpath)
13827      input_path=`$CYGPATH -u "$shortmode_path"`
13828      new_path="$input_path"
13829    fi
13830  fi
13831
13832  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13833  if test "x$test_cygdrive_prefix" = x; then
13834    # As a simple fix, exclude /usr/bin since it's not a real path.
13835    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13836      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13837      # a path prefixed by /cygdrive for fixpath to work.
13838      new_path="$CYGWIN_ROOT_PATH$input_path"
13839    fi
13840  fi
13841
13842
13843  if test "x$path" != "x$new_path"; then
13844    BOOT_JDK="$new_path"
13845    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13846$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13847  fi
13848
13849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13850
13851  path="$BOOT_JDK"
13852  has_colon=`$ECHO $path | $GREP ^.:`
13853  new_path="$path"
13854  if test "x$has_colon" = x; then
13855    # Not in mixed or Windows style, start by that.
13856    new_path=`cmd //c echo $path`
13857  fi
13858
13859
13860  input_path="$new_path"
13861  # Check if we need to convert this using DOS-style short mode. If the path
13862  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13863  # take no chances and rewrite it.
13864  # Note: m4 eats our [], so we need to use [ and ] instead.
13865  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13866  if test "x$has_forbidden_chars" != x; then
13867    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13868    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13869  fi
13870
13871
13872  windows_path="$new_path"
13873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13874    unix_path=`$CYGPATH -u "$windows_path"`
13875    new_path="$unix_path"
13876  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13877    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13878    new_path="$unix_path"
13879  fi
13880
13881  if test "x$path" != "x$new_path"; then
13882    BOOT_JDK="$new_path"
13883    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13884$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13885  fi
13886
13887  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13888  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13889
13890  else
13891    # We're on a posix platform. Hooray! :)
13892    path="$BOOT_JDK"
13893    has_space=`$ECHO "$path" | $GREP " "`
13894    if test "x$has_space" != x; then
13895      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13896$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13897      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13898    fi
13899
13900    # Use eval to expand a potential ~
13901    eval path="$path"
13902    if test ! -f "$path" && test ! -d "$path"; then
13903      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13904    fi
13905
13906    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13907  fi
13908
13909              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13910$as_echo_n "checking for Boot JDK... " >&6; }
13911              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13912$as_echo "$BOOT_JDK" >&6; }
13913              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13914$as_echo_n "checking Boot JDK version... " >&6; }
13915              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13916              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13917$as_echo "$BOOT_JDK_VERSION" >&6; }
13918            fi # end check jdk version
13919          fi # end check rt.jar
13920        fi # end check javac
13921      fi # end check java
13922    fi # end check boot jdk found
13923  fi
13924
13925    done
13926  fi
13927
13928  fi
13929
13930
13931    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13932    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13933      # Do we have a bin/java?
13934      if test ! -x "$BOOT_JDK/bin/java"; then
13935        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13936$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13937        BOOT_JDK_FOUND=no
13938      else
13939        # Do we have a bin/javac?
13940        if test ! -x "$BOOT_JDK/bin/javac"; then
13941          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13942$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13943          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13944$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13945          BOOT_JDK_FOUND=no
13946        else
13947          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13948          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13949            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13950$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13951            BOOT_JDK_FOUND=no
13952          else
13953            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13954            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13955
13956            # Extra M4 quote needed to protect [] in grep expression.
13957            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13958            if test "x$FOUND_VERSION_78" = x; then
13959              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13960$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13961              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13962$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13963              BOOT_JDK_FOUND=no
13964            else
13965              # We're done! :-)
13966              BOOT_JDK_FOUND=yes
13967
13968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13969
13970  # Input might be given as Windows format, start by converting to
13971  # unix format.
13972  path="$BOOT_JDK"
13973  new_path=`$CYGPATH -u "$path"`
13974
13975  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13976  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13977  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13978  # "foo.exe" is OK but "foo" is an error.
13979  #
13980  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13981  # It is also a way to make sure we got the proper file name for the real test later on.
13982  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13983  if test "x$test_shortpath" = x; then
13984    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13985$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13986    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13987  fi
13988
13989  # Call helper function which possibly converts this using DOS-style short mode.
13990  # If so, the updated path is stored in $new_path.
13991
13992  input_path="$new_path"
13993  # Check if we need to convert this using DOS-style short mode. If the path
13994  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13995  # take no chances and rewrite it.
13996  # Note: m4 eats our [], so we need to use [ and ] instead.
13997  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13998  if test "x$has_forbidden_chars" != x; then
13999    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14000    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14001    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14002    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14003      # Going to short mode and back again did indeed matter. Since short mode is
14004      # case insensitive, let's make it lowercase to improve readability.
14005      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14006      # Now convert it back to Unix-stile (cygpath)
14007      input_path=`$CYGPATH -u "$shortmode_path"`
14008      new_path="$input_path"
14009    fi
14010  fi
14011
14012  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14013  if test "x$test_cygdrive_prefix" = x; then
14014    # As a simple fix, exclude /usr/bin since it's not a real path.
14015    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14016      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14017      # a path prefixed by /cygdrive for fixpath to work.
14018      new_path="$CYGWIN_ROOT_PATH$input_path"
14019    fi
14020  fi
14021
14022
14023  if test "x$path" != "x$new_path"; then
14024    BOOT_JDK="$new_path"
14025    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14026$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14027  fi
14028
14029  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14030
14031  path="$BOOT_JDK"
14032  has_colon=`$ECHO $path | $GREP ^.:`
14033  new_path="$path"
14034  if test "x$has_colon" = x; then
14035    # Not in mixed or Windows style, start by that.
14036    new_path=`cmd //c echo $path`
14037  fi
14038
14039
14040  input_path="$new_path"
14041  # Check if we need to convert this using DOS-style short mode. If the path
14042  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14043  # take no chances and rewrite it.
14044  # Note: m4 eats our [], so we need to use [ and ] instead.
14045  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14046  if test "x$has_forbidden_chars" != x; then
14047    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14048    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14049  fi
14050
14051
14052  windows_path="$new_path"
14053  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14054    unix_path=`$CYGPATH -u "$windows_path"`
14055    new_path="$unix_path"
14056  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14057    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14058    new_path="$unix_path"
14059  fi
14060
14061  if test "x$path" != "x$new_path"; then
14062    BOOT_JDK="$new_path"
14063    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14064$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14065  fi
14066
14067  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14068  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14069
14070  else
14071    # We're on a posix platform. Hooray! :)
14072    path="$BOOT_JDK"
14073    has_space=`$ECHO "$path" | $GREP " "`
14074    if test "x$has_space" != x; then
14075      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14076$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14077      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14078    fi
14079
14080    # Use eval to expand a potential ~
14081    eval path="$path"
14082    if test ! -f "$path" && test ! -d "$path"; then
14083      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14084    fi
14085
14086    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14087  fi
14088
14089              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14090$as_echo_n "checking for Boot JDK... " >&6; }
14091              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14092$as_echo "$BOOT_JDK" >&6; }
14093              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14094$as_echo_n "checking Boot JDK version... " >&6; }
14095              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14096              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14097$as_echo "$BOOT_JDK_VERSION" >&6; }
14098            fi # end check jdk version
14099          fi # end check rt.jar
14100        fi # end check javac
14101      fi # end check java
14102    fi # end check boot jdk found
14103  fi
14104
14105
14106  if test "x$BOOT_JDK_FOUND" = xno; then
14107    # Now execute the test
14108
14109  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
14110  BOOT_JDK_SUFFIX=""
14111  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14112  if test "x$ALL_JDKS_FOUND" != x; then
14113    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14114
14115  if test "x$BOOT_JDK_FOUND" = xno; then
14116    # Now execute the test
14117
14118        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14119        if test -d "$BOOT_JDK"; then
14120          BOOT_JDK_FOUND=maybe
14121          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14122$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14123        fi
14124
14125
14126    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14127    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14128      # Do we have a bin/java?
14129      if test ! -x "$BOOT_JDK/bin/java"; then
14130        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14131$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14132        BOOT_JDK_FOUND=no
14133      else
14134        # Do we have a bin/javac?
14135        if test ! -x "$BOOT_JDK/bin/javac"; then
14136          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14137$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14138          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14139$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14140          BOOT_JDK_FOUND=no
14141        else
14142          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14143          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14144            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14145$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14146            BOOT_JDK_FOUND=no
14147          else
14148            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14149            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14150
14151            # Extra M4 quote needed to protect [] in grep expression.
14152            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14153            if test "x$FOUND_VERSION_78" = x; then
14154              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14155$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14156              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14157$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14158              BOOT_JDK_FOUND=no
14159            else
14160              # We're done! :-)
14161              BOOT_JDK_FOUND=yes
14162
14163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14164
14165  # Input might be given as Windows format, start by converting to
14166  # unix format.
14167  path="$BOOT_JDK"
14168  new_path=`$CYGPATH -u "$path"`
14169
14170  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14171  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14172  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14173  # "foo.exe" is OK but "foo" is an error.
14174  #
14175  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14176  # It is also a way to make sure we got the proper file name for the real test later on.
14177  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14178  if test "x$test_shortpath" = x; then
14179    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14180$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14181    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14182  fi
14183
14184  # Call helper function which possibly converts this using DOS-style short mode.
14185  # If so, the updated path is stored in $new_path.
14186
14187  input_path="$new_path"
14188  # Check if we need to convert this using DOS-style short mode. If the path
14189  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14190  # take no chances and rewrite it.
14191  # Note: m4 eats our [], so we need to use [ and ] instead.
14192  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14193  if test "x$has_forbidden_chars" != x; then
14194    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14195    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14196    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14197    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14198      # Going to short mode and back again did indeed matter. Since short mode is
14199      # case insensitive, let's make it lowercase to improve readability.
14200      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14201      # Now convert it back to Unix-stile (cygpath)
14202      input_path=`$CYGPATH -u "$shortmode_path"`
14203      new_path="$input_path"
14204    fi
14205  fi
14206
14207  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14208  if test "x$test_cygdrive_prefix" = x; then
14209    # As a simple fix, exclude /usr/bin since it's not a real path.
14210    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14211      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14212      # a path prefixed by /cygdrive for fixpath to work.
14213      new_path="$CYGWIN_ROOT_PATH$input_path"
14214    fi
14215  fi
14216
14217
14218  if test "x$path" != "x$new_path"; then
14219    BOOT_JDK="$new_path"
14220    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14221$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14222  fi
14223
14224  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14225
14226  path="$BOOT_JDK"
14227  has_colon=`$ECHO $path | $GREP ^.:`
14228  new_path="$path"
14229  if test "x$has_colon" = x; then
14230    # Not in mixed or Windows style, start by that.
14231    new_path=`cmd //c echo $path`
14232  fi
14233
14234
14235  input_path="$new_path"
14236  # Check if we need to convert this using DOS-style short mode. If the path
14237  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14238  # take no chances and rewrite it.
14239  # Note: m4 eats our [], so we need to use [ and ] instead.
14240  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14241  if test "x$has_forbidden_chars" != x; then
14242    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14243    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14244  fi
14245
14246
14247  windows_path="$new_path"
14248  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14249    unix_path=`$CYGPATH -u "$windows_path"`
14250    new_path="$unix_path"
14251  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14252    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14253    new_path="$unix_path"
14254  fi
14255
14256  if test "x$path" != "x$new_path"; then
14257    BOOT_JDK="$new_path"
14258    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14259$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14260  fi
14261
14262  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14263  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14264
14265  else
14266    # We're on a posix platform. Hooray! :)
14267    path="$BOOT_JDK"
14268    has_space=`$ECHO "$path" | $GREP " "`
14269    if test "x$has_space" != x; then
14270      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14271$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14272      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14273    fi
14274
14275    # Use eval to expand a potential ~
14276    eval path="$path"
14277    if test ! -f "$path" && test ! -d "$path"; then
14278      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14279    fi
14280
14281    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14282  fi
14283
14284              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14285$as_echo_n "checking for Boot JDK... " >&6; }
14286              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14287$as_echo "$BOOT_JDK" >&6; }
14288              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14289$as_echo_n "checking Boot JDK version... " >&6; }
14290              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14291              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14292$as_echo "$BOOT_JDK_VERSION" >&6; }
14293            fi # end check jdk version
14294          fi # end check rt.jar
14295        fi # end check javac
14296      fi # end check java
14297    fi # end check boot jdk found
14298  fi
14299
14300    done
14301  fi
14302
14303
14304    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14305    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14306      # Do we have a bin/java?
14307      if test ! -x "$BOOT_JDK/bin/java"; then
14308        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14309$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14310        BOOT_JDK_FOUND=no
14311      else
14312        # Do we have a bin/javac?
14313        if test ! -x "$BOOT_JDK/bin/javac"; then
14314          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14315$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14316          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14317$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14318          BOOT_JDK_FOUND=no
14319        else
14320          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14321          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14322            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14323$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14324            BOOT_JDK_FOUND=no
14325          else
14326            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14327            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14328
14329            # Extra M4 quote needed to protect [] in grep expression.
14330            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14331            if test "x$FOUND_VERSION_78" = x; then
14332              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14333$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14334              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14335$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14336              BOOT_JDK_FOUND=no
14337            else
14338              # We're done! :-)
14339              BOOT_JDK_FOUND=yes
14340
14341  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14342
14343  # Input might be given as Windows format, start by converting to
14344  # unix format.
14345  path="$BOOT_JDK"
14346  new_path=`$CYGPATH -u "$path"`
14347
14348  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14349  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14350  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14351  # "foo.exe" is OK but "foo" is an error.
14352  #
14353  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14354  # It is also a way to make sure we got the proper file name for the real test later on.
14355  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14356  if test "x$test_shortpath" = x; then
14357    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14358$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14359    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14360  fi
14361
14362  # Call helper function which possibly converts this using DOS-style short mode.
14363  # If so, the updated path is stored in $new_path.
14364
14365  input_path="$new_path"
14366  # Check if we need to convert this using DOS-style short mode. If the path
14367  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14368  # take no chances and rewrite it.
14369  # Note: m4 eats our [], so we need to use [ and ] instead.
14370  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14371  if test "x$has_forbidden_chars" != x; then
14372    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14373    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14374    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14375    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14376      # Going to short mode and back again did indeed matter. Since short mode is
14377      # case insensitive, let's make it lowercase to improve readability.
14378      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14379      # Now convert it back to Unix-stile (cygpath)
14380      input_path=`$CYGPATH -u "$shortmode_path"`
14381      new_path="$input_path"
14382    fi
14383  fi
14384
14385  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14386  if test "x$test_cygdrive_prefix" = x; then
14387    # As a simple fix, exclude /usr/bin since it's not a real path.
14388    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14389      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14390      # a path prefixed by /cygdrive for fixpath to work.
14391      new_path="$CYGWIN_ROOT_PATH$input_path"
14392    fi
14393  fi
14394
14395
14396  if test "x$path" != "x$new_path"; then
14397    BOOT_JDK="$new_path"
14398    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14399$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14400  fi
14401
14402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14403
14404  path="$BOOT_JDK"
14405  has_colon=`$ECHO $path | $GREP ^.:`
14406  new_path="$path"
14407  if test "x$has_colon" = x; then
14408    # Not in mixed or Windows style, start by that.
14409    new_path=`cmd //c echo $path`
14410  fi
14411
14412
14413  input_path="$new_path"
14414  # Check if we need to convert this using DOS-style short mode. If the path
14415  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14416  # take no chances and rewrite it.
14417  # Note: m4 eats our [], so we need to use [ and ] instead.
14418  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14419  if test "x$has_forbidden_chars" != x; then
14420    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14421    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14422  fi
14423
14424
14425  windows_path="$new_path"
14426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14427    unix_path=`$CYGPATH -u "$windows_path"`
14428    new_path="$unix_path"
14429  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14430    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14431    new_path="$unix_path"
14432  fi
14433
14434  if test "x$path" != "x$new_path"; then
14435    BOOT_JDK="$new_path"
14436    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14437$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14438  fi
14439
14440  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14441  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14442
14443  else
14444    # We're on a posix platform. Hooray! :)
14445    path="$BOOT_JDK"
14446    has_space=`$ECHO "$path" | $GREP " "`
14447    if test "x$has_space" != x; then
14448      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14449$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14450      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14451    fi
14452
14453    # Use eval to expand a potential ~
14454    eval path="$path"
14455    if test ! -f "$path" && test ! -d "$path"; then
14456      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14457    fi
14458
14459    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14460  fi
14461
14462              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14463$as_echo_n "checking for Boot JDK... " >&6; }
14464              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14465$as_echo "$BOOT_JDK" >&6; }
14466              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14467$as_echo_n "checking Boot JDK version... " >&6; }
14468              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14469              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14470$as_echo "$BOOT_JDK_VERSION" >&6; }
14471            fi # end check jdk version
14472          fi # end check rt.jar
14473        fi # end check javac
14474      fi # end check java
14475    fi # end check boot jdk found
14476  fi
14477
14478  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14479
14480  if test "x$BOOT_JDK_FOUND" = xno; then
14481    # Now execute the test
14482
14483  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14484  BOOT_JDK_SUFFIX="/Contents/Home"
14485  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14486  if test "x$ALL_JDKS_FOUND" != x; then
14487    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14488
14489  if test "x$BOOT_JDK_FOUND" = xno; then
14490    # Now execute the test
14491
14492        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14493        if test -d "$BOOT_JDK"; then
14494          BOOT_JDK_FOUND=maybe
14495          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14496$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14497        fi
14498
14499
14500    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14501    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14502      # Do we have a bin/java?
14503      if test ! -x "$BOOT_JDK/bin/java"; then
14504        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14505$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14506        BOOT_JDK_FOUND=no
14507      else
14508        # Do we have a bin/javac?
14509        if test ! -x "$BOOT_JDK/bin/javac"; then
14510          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14511$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14512          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14513$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14514          BOOT_JDK_FOUND=no
14515        else
14516          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14517          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14518            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14519$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14520            BOOT_JDK_FOUND=no
14521          else
14522            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14523            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14524
14525            # Extra M4 quote needed to protect [] in grep expression.
14526            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14527            if test "x$FOUND_VERSION_78" = x; then
14528              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14529$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14530              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14531$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14532              BOOT_JDK_FOUND=no
14533            else
14534              # We're done! :-)
14535              BOOT_JDK_FOUND=yes
14536
14537  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14538
14539  # Input might be given as Windows format, start by converting to
14540  # unix format.
14541  path="$BOOT_JDK"
14542  new_path=`$CYGPATH -u "$path"`
14543
14544  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14545  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14546  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14547  # "foo.exe" is OK but "foo" is an error.
14548  #
14549  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14550  # It is also a way to make sure we got the proper file name for the real test later on.
14551  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14552  if test "x$test_shortpath" = x; then
14553    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14554$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14555    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14556  fi
14557
14558  # Call helper function which possibly converts this using DOS-style short mode.
14559  # If so, the updated path is stored in $new_path.
14560
14561  input_path="$new_path"
14562  # Check if we need to convert this using DOS-style short mode. If the path
14563  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14564  # take no chances and rewrite it.
14565  # Note: m4 eats our [], so we need to use [ and ] instead.
14566  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14567  if test "x$has_forbidden_chars" != x; then
14568    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14569    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14570    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14571    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14572      # Going to short mode and back again did indeed matter. Since short mode is
14573      # case insensitive, let's make it lowercase to improve readability.
14574      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14575      # Now convert it back to Unix-stile (cygpath)
14576      input_path=`$CYGPATH -u "$shortmode_path"`
14577      new_path="$input_path"
14578    fi
14579  fi
14580
14581  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14582  if test "x$test_cygdrive_prefix" = x; then
14583    # As a simple fix, exclude /usr/bin since it's not a real path.
14584    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14585      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14586      # a path prefixed by /cygdrive for fixpath to work.
14587      new_path="$CYGWIN_ROOT_PATH$input_path"
14588    fi
14589  fi
14590
14591
14592  if test "x$path" != "x$new_path"; then
14593    BOOT_JDK="$new_path"
14594    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14595$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14596  fi
14597
14598  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14599
14600  path="$BOOT_JDK"
14601  has_colon=`$ECHO $path | $GREP ^.:`
14602  new_path="$path"
14603  if test "x$has_colon" = x; then
14604    # Not in mixed or Windows style, start by that.
14605    new_path=`cmd //c echo $path`
14606  fi
14607
14608
14609  input_path="$new_path"
14610  # Check if we need to convert this using DOS-style short mode. If the path
14611  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14612  # take no chances and rewrite it.
14613  # Note: m4 eats our [], so we need to use [ and ] instead.
14614  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14615  if test "x$has_forbidden_chars" != x; then
14616    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14617    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14618  fi
14619
14620
14621  windows_path="$new_path"
14622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14623    unix_path=`$CYGPATH -u "$windows_path"`
14624    new_path="$unix_path"
14625  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14626    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14627    new_path="$unix_path"
14628  fi
14629
14630  if test "x$path" != "x$new_path"; then
14631    BOOT_JDK="$new_path"
14632    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14633$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14634  fi
14635
14636  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14637  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14638
14639  else
14640    # We're on a posix platform. Hooray! :)
14641    path="$BOOT_JDK"
14642    has_space=`$ECHO "$path" | $GREP " "`
14643    if test "x$has_space" != x; then
14644      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14645$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14646      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14647    fi
14648
14649    # Use eval to expand a potential ~
14650    eval path="$path"
14651    if test ! -f "$path" && test ! -d "$path"; then
14652      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14653    fi
14654
14655    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14656  fi
14657
14658              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14659$as_echo_n "checking for Boot JDK... " >&6; }
14660              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14661$as_echo "$BOOT_JDK" >&6; }
14662              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14663$as_echo_n "checking Boot JDK version... " >&6; }
14664              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14665              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14666$as_echo "$BOOT_JDK_VERSION" >&6; }
14667            fi # end check jdk version
14668          fi # end check rt.jar
14669        fi # end check javac
14670      fi # end check java
14671    fi # end check boot jdk found
14672  fi
14673
14674    done
14675  fi
14676
14677
14678    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14679    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14680      # Do we have a bin/java?
14681      if test ! -x "$BOOT_JDK/bin/java"; then
14682        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14683$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14684        BOOT_JDK_FOUND=no
14685      else
14686        # Do we have a bin/javac?
14687        if test ! -x "$BOOT_JDK/bin/javac"; then
14688          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14689$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14690          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14691$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14692          BOOT_JDK_FOUND=no
14693        else
14694          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14695          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14696            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14697$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14698            BOOT_JDK_FOUND=no
14699          else
14700            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14701            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14702
14703            # Extra M4 quote needed to protect [] in grep expression.
14704            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14705            if test "x$FOUND_VERSION_78" = x; then
14706              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14707$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14708              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14709$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14710              BOOT_JDK_FOUND=no
14711            else
14712              # We're done! :-)
14713              BOOT_JDK_FOUND=yes
14714
14715  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14716
14717  # Input might be given as Windows format, start by converting to
14718  # unix format.
14719  path="$BOOT_JDK"
14720  new_path=`$CYGPATH -u "$path"`
14721
14722  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14723  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14724  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14725  # "foo.exe" is OK but "foo" is an error.
14726  #
14727  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14728  # It is also a way to make sure we got the proper file name for the real test later on.
14729  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14730  if test "x$test_shortpath" = x; then
14731    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14732$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14733    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14734  fi
14735
14736  # Call helper function which possibly converts this using DOS-style short mode.
14737  # If so, the updated path is stored in $new_path.
14738
14739  input_path="$new_path"
14740  # Check if we need to convert this using DOS-style short mode. If the path
14741  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14742  # take no chances and rewrite it.
14743  # Note: m4 eats our [], so we need to use [ and ] instead.
14744  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14745  if test "x$has_forbidden_chars" != x; then
14746    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14747    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14748    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14749    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14750      # Going to short mode and back again did indeed matter. Since short mode is
14751      # case insensitive, let's make it lowercase to improve readability.
14752      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14753      # Now convert it back to Unix-stile (cygpath)
14754      input_path=`$CYGPATH -u "$shortmode_path"`
14755      new_path="$input_path"
14756    fi
14757  fi
14758
14759  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14760  if test "x$test_cygdrive_prefix" = x; then
14761    # As a simple fix, exclude /usr/bin since it's not a real path.
14762    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14763      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14764      # a path prefixed by /cygdrive for fixpath to work.
14765      new_path="$CYGWIN_ROOT_PATH$input_path"
14766    fi
14767  fi
14768
14769
14770  if test "x$path" != "x$new_path"; then
14771    BOOT_JDK="$new_path"
14772    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14773$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14774  fi
14775
14776  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14777
14778  path="$BOOT_JDK"
14779  has_colon=`$ECHO $path | $GREP ^.:`
14780  new_path="$path"
14781  if test "x$has_colon" = x; then
14782    # Not in mixed or Windows style, start by that.
14783    new_path=`cmd //c echo $path`
14784  fi
14785
14786
14787  input_path="$new_path"
14788  # Check if we need to convert this using DOS-style short mode. If the path
14789  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14790  # take no chances and rewrite it.
14791  # Note: m4 eats our [], so we need to use [ and ] instead.
14792  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14793  if test "x$has_forbidden_chars" != x; then
14794    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14795    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14796  fi
14797
14798
14799  windows_path="$new_path"
14800  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14801    unix_path=`$CYGPATH -u "$windows_path"`
14802    new_path="$unix_path"
14803  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14804    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14805    new_path="$unix_path"
14806  fi
14807
14808  if test "x$path" != "x$new_path"; then
14809    BOOT_JDK="$new_path"
14810    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14811$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14812  fi
14813
14814  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14815  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14816
14817  else
14818    # We're on a posix platform. Hooray! :)
14819    path="$BOOT_JDK"
14820    has_space=`$ECHO "$path" | $GREP " "`
14821    if test "x$has_space" != x; then
14822      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14823$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14824      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14825    fi
14826
14827    # Use eval to expand a potential ~
14828    eval path="$path"
14829    if test ! -f "$path" && test ! -d "$path"; then
14830      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14831    fi
14832
14833    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14834  fi
14835
14836              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14837$as_echo_n "checking for Boot JDK... " >&6; }
14838              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14839$as_echo "$BOOT_JDK" >&6; }
14840              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14841$as_echo_n "checking Boot JDK version... " >&6; }
14842              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14843              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14844$as_echo "$BOOT_JDK_VERSION" >&6; }
14845            fi # end check jdk version
14846          fi # end check rt.jar
14847        fi # end check javac
14848      fi # end check java
14849    fi # end check boot jdk found
14850  fi
14851
14852
14853  if test "x$BOOT_JDK_FOUND" = xno; then
14854    # Now execute the test
14855
14856  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14857  BOOT_JDK_SUFFIX="/Contents/Home"
14858  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14859  if test "x$ALL_JDKS_FOUND" != x; then
14860    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14861
14862  if test "x$BOOT_JDK_FOUND" = xno; then
14863    # Now execute the test
14864
14865        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14866        if test -d "$BOOT_JDK"; then
14867          BOOT_JDK_FOUND=maybe
14868          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14869$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14870        fi
14871
14872
14873    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14874    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14875      # Do we have a bin/java?
14876      if test ! -x "$BOOT_JDK/bin/java"; then
14877        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14878$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14879        BOOT_JDK_FOUND=no
14880      else
14881        # Do we have a bin/javac?
14882        if test ! -x "$BOOT_JDK/bin/javac"; then
14883          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14884$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14885          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14886$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14887          BOOT_JDK_FOUND=no
14888        else
14889          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14890          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14891            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14892$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14893            BOOT_JDK_FOUND=no
14894          else
14895            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14896            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14897
14898            # Extra M4 quote needed to protect [] in grep expression.
14899            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14900            if test "x$FOUND_VERSION_78" = x; then
14901              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14902$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14903              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14904$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14905              BOOT_JDK_FOUND=no
14906            else
14907              # We're done! :-)
14908              BOOT_JDK_FOUND=yes
14909
14910  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14911
14912  # Input might be given as Windows format, start by converting to
14913  # unix format.
14914  path="$BOOT_JDK"
14915  new_path=`$CYGPATH -u "$path"`
14916
14917  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14918  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14919  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14920  # "foo.exe" is OK but "foo" is an error.
14921  #
14922  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14923  # It is also a way to make sure we got the proper file name for the real test later on.
14924  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14925  if test "x$test_shortpath" = x; then
14926    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14927$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14928    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14929  fi
14930
14931  # Call helper function which possibly converts this using DOS-style short mode.
14932  # If so, the updated path is stored in $new_path.
14933
14934  input_path="$new_path"
14935  # Check if we need to convert this using DOS-style short mode. If the path
14936  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14937  # take no chances and rewrite it.
14938  # Note: m4 eats our [], so we need to use [ and ] instead.
14939  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14940  if test "x$has_forbidden_chars" != x; then
14941    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14942    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14943    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14944    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14945      # Going to short mode and back again did indeed matter. Since short mode is
14946      # case insensitive, let's make it lowercase to improve readability.
14947      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14948      # Now convert it back to Unix-stile (cygpath)
14949      input_path=`$CYGPATH -u "$shortmode_path"`
14950      new_path="$input_path"
14951    fi
14952  fi
14953
14954  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14955  if test "x$test_cygdrive_prefix" = x; then
14956    # As a simple fix, exclude /usr/bin since it's not a real path.
14957    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14958      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14959      # a path prefixed by /cygdrive for fixpath to work.
14960      new_path="$CYGWIN_ROOT_PATH$input_path"
14961    fi
14962  fi
14963
14964
14965  if test "x$path" != "x$new_path"; then
14966    BOOT_JDK="$new_path"
14967    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14968$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14969  fi
14970
14971  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14972
14973  path="$BOOT_JDK"
14974  has_colon=`$ECHO $path | $GREP ^.:`
14975  new_path="$path"
14976  if test "x$has_colon" = x; then
14977    # Not in mixed or Windows style, start by that.
14978    new_path=`cmd //c echo $path`
14979  fi
14980
14981
14982  input_path="$new_path"
14983  # Check if we need to convert this using DOS-style short mode. If the path
14984  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14985  # take no chances and rewrite it.
14986  # Note: m4 eats our [], so we need to use [ and ] instead.
14987  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14988  if test "x$has_forbidden_chars" != x; then
14989    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14990    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14991  fi
14992
14993
14994  windows_path="$new_path"
14995  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14996    unix_path=`$CYGPATH -u "$windows_path"`
14997    new_path="$unix_path"
14998  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14999    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15000    new_path="$unix_path"
15001  fi
15002
15003  if test "x$path" != "x$new_path"; then
15004    BOOT_JDK="$new_path"
15005    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15006$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15007  fi
15008
15009  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15010  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15011
15012  else
15013    # We're on a posix platform. Hooray! :)
15014    path="$BOOT_JDK"
15015    has_space=`$ECHO "$path" | $GREP " "`
15016    if test "x$has_space" != x; then
15017      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15018$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15019      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15020    fi
15021
15022    # Use eval to expand a potential ~
15023    eval path="$path"
15024    if test ! -f "$path" && test ! -d "$path"; then
15025      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15026    fi
15027
15028    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15029  fi
15030
15031              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15032$as_echo_n "checking for Boot JDK... " >&6; }
15033              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15034$as_echo "$BOOT_JDK" >&6; }
15035              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15036$as_echo_n "checking Boot JDK version... " >&6; }
15037              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15038              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15039$as_echo "$BOOT_JDK_VERSION" >&6; }
15040            fi # end check jdk version
15041          fi # end check rt.jar
15042        fi # end check javac
15043      fi # end check java
15044    fi # end check boot jdk found
15045  fi
15046
15047    done
15048  fi
15049
15050
15051    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15052    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15053      # Do we have a bin/java?
15054      if test ! -x "$BOOT_JDK/bin/java"; then
15055        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15056$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15057        BOOT_JDK_FOUND=no
15058      else
15059        # Do we have a bin/javac?
15060        if test ! -x "$BOOT_JDK/bin/javac"; then
15061          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15062$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15063          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15064$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15065          BOOT_JDK_FOUND=no
15066        else
15067          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15068          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15069            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15070$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15071            BOOT_JDK_FOUND=no
15072          else
15073            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15074            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15075
15076            # Extra M4 quote needed to protect [] in grep expression.
15077            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15078            if test "x$FOUND_VERSION_78" = x; then
15079              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15080$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15081              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15082$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15083              BOOT_JDK_FOUND=no
15084            else
15085              # We're done! :-)
15086              BOOT_JDK_FOUND=yes
15087
15088  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15089
15090  # Input might be given as Windows format, start by converting to
15091  # unix format.
15092  path="$BOOT_JDK"
15093  new_path=`$CYGPATH -u "$path"`
15094
15095  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15096  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15097  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15098  # "foo.exe" is OK but "foo" is an error.
15099  #
15100  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15101  # It is also a way to make sure we got the proper file name for the real test later on.
15102  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15103  if test "x$test_shortpath" = x; then
15104    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15105$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15106    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15107  fi
15108
15109  # Call helper function which possibly converts this using DOS-style short mode.
15110  # If so, the updated path is stored in $new_path.
15111
15112  input_path="$new_path"
15113  # Check if we need to convert this using DOS-style short mode. If the path
15114  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15115  # take no chances and rewrite it.
15116  # Note: m4 eats our [], so we need to use [ and ] instead.
15117  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15118  if test "x$has_forbidden_chars" != x; then
15119    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15120    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15121    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15122    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15123      # Going to short mode and back again did indeed matter. Since short mode is
15124      # case insensitive, let's make it lowercase to improve readability.
15125      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15126      # Now convert it back to Unix-stile (cygpath)
15127      input_path=`$CYGPATH -u "$shortmode_path"`
15128      new_path="$input_path"
15129    fi
15130  fi
15131
15132  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15133  if test "x$test_cygdrive_prefix" = x; then
15134    # As a simple fix, exclude /usr/bin since it's not a real path.
15135    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15136      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15137      # a path prefixed by /cygdrive for fixpath to work.
15138      new_path="$CYGWIN_ROOT_PATH$input_path"
15139    fi
15140  fi
15141
15142
15143  if test "x$path" != "x$new_path"; then
15144    BOOT_JDK="$new_path"
15145    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15146$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15147  fi
15148
15149  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15150
15151  path="$BOOT_JDK"
15152  has_colon=`$ECHO $path | $GREP ^.:`
15153  new_path="$path"
15154  if test "x$has_colon" = x; then
15155    # Not in mixed or Windows style, start by that.
15156    new_path=`cmd //c echo $path`
15157  fi
15158
15159
15160  input_path="$new_path"
15161  # Check if we need to convert this using DOS-style short mode. If the path
15162  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15163  # take no chances and rewrite it.
15164  # Note: m4 eats our [], so we need to use [ and ] instead.
15165  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15166  if test "x$has_forbidden_chars" != x; then
15167    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15168    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15169  fi
15170
15171
15172  windows_path="$new_path"
15173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15174    unix_path=`$CYGPATH -u "$windows_path"`
15175    new_path="$unix_path"
15176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15177    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15178    new_path="$unix_path"
15179  fi
15180
15181  if test "x$path" != "x$new_path"; then
15182    BOOT_JDK="$new_path"
15183    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15184$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15185  fi
15186
15187  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15188  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15189
15190  else
15191    # We're on a posix platform. Hooray! :)
15192    path="$BOOT_JDK"
15193    has_space=`$ECHO "$path" | $GREP " "`
15194    if test "x$has_space" != x; then
15195      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15196$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15197      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15198    fi
15199
15200    # Use eval to expand a potential ~
15201    eval path="$path"
15202    if test ! -f "$path" && test ! -d "$path"; then
15203      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15204    fi
15205
15206    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15207  fi
15208
15209              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15210$as_echo_n "checking for Boot JDK... " >&6; }
15211              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15212$as_echo "$BOOT_JDK" >&6; }
15213              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15214$as_echo_n "checking Boot JDK version... " >&6; }
15215              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15216              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15217$as_echo "$BOOT_JDK_VERSION" >&6; }
15218            fi # end check jdk version
15219          fi # end check rt.jar
15220        fi # end check javac
15221      fi # end check java
15222    fi # end check boot jdk found
15223  fi
15224
15225  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
15226
15227  if test "x$BOOT_JDK_FOUND" = xno; then
15228    # Now execute the test
15229
15230  BOOT_JDK_PREFIX="/usr/lib/jvm"
15231  BOOT_JDK_SUFFIX=""
15232  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
15233  if test "x$ALL_JDKS_FOUND" != x; then
15234    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
15235
15236  if test "x$BOOT_JDK_FOUND" = xno; then
15237    # Now execute the test
15238
15239        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
15240        if test -d "$BOOT_JDK"; then
15241          BOOT_JDK_FOUND=maybe
15242          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
15243$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
15244        fi
15245
15246
15247    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15248    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15249      # Do we have a bin/java?
15250      if test ! -x "$BOOT_JDK/bin/java"; then
15251        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15252$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15253        BOOT_JDK_FOUND=no
15254      else
15255        # Do we have a bin/javac?
15256        if test ! -x "$BOOT_JDK/bin/javac"; then
15257          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15258$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15259          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15260$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15261          BOOT_JDK_FOUND=no
15262        else
15263          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15264          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15265            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15266$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15267            BOOT_JDK_FOUND=no
15268          else
15269            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15270            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15271
15272            # Extra M4 quote needed to protect [] in grep expression.
15273            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15274            if test "x$FOUND_VERSION_78" = x; then
15275              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15276$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15277              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15278$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15279              BOOT_JDK_FOUND=no
15280            else
15281              # We're done! :-)
15282              BOOT_JDK_FOUND=yes
15283
15284  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15285
15286  # Input might be given as Windows format, start by converting to
15287  # unix format.
15288  path="$BOOT_JDK"
15289  new_path=`$CYGPATH -u "$path"`
15290
15291  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15292  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15293  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15294  # "foo.exe" is OK but "foo" is an error.
15295  #
15296  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15297  # It is also a way to make sure we got the proper file name for the real test later on.
15298  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15299  if test "x$test_shortpath" = x; then
15300    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15301$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15302    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15303  fi
15304
15305  # Call helper function which possibly converts this using DOS-style short mode.
15306  # If so, the updated path is stored in $new_path.
15307
15308  input_path="$new_path"
15309  # Check if we need to convert this using DOS-style short mode. If the path
15310  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15311  # take no chances and rewrite it.
15312  # Note: m4 eats our [], so we need to use [ and ] instead.
15313  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15314  if test "x$has_forbidden_chars" != x; then
15315    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15316    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15317    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15318    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15319      # Going to short mode and back again did indeed matter. Since short mode is
15320      # case insensitive, let's make it lowercase to improve readability.
15321      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15322      # Now convert it back to Unix-stile (cygpath)
15323      input_path=`$CYGPATH -u "$shortmode_path"`
15324      new_path="$input_path"
15325    fi
15326  fi
15327
15328  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15329  if test "x$test_cygdrive_prefix" = x; then
15330    # As a simple fix, exclude /usr/bin since it's not a real path.
15331    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15332      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15333      # a path prefixed by /cygdrive for fixpath to work.
15334      new_path="$CYGWIN_ROOT_PATH$input_path"
15335    fi
15336  fi
15337
15338
15339  if test "x$path" != "x$new_path"; then
15340    BOOT_JDK="$new_path"
15341    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15342$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15343  fi
15344
15345  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15346
15347  path="$BOOT_JDK"
15348  has_colon=`$ECHO $path | $GREP ^.:`
15349  new_path="$path"
15350  if test "x$has_colon" = x; then
15351    # Not in mixed or Windows style, start by that.
15352    new_path=`cmd //c echo $path`
15353  fi
15354
15355
15356  input_path="$new_path"
15357  # Check if we need to convert this using DOS-style short mode. If the path
15358  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15359  # take no chances and rewrite it.
15360  # Note: m4 eats our [], so we need to use [ and ] instead.
15361  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15362  if test "x$has_forbidden_chars" != x; then
15363    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15364    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15365  fi
15366
15367
15368  windows_path="$new_path"
15369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15370    unix_path=`$CYGPATH -u "$windows_path"`
15371    new_path="$unix_path"
15372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15373    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15374    new_path="$unix_path"
15375  fi
15376
15377  if test "x$path" != "x$new_path"; then
15378    BOOT_JDK="$new_path"
15379    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15380$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15381  fi
15382
15383  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15384  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15385
15386  else
15387    # We're on a posix platform. Hooray! :)
15388    path="$BOOT_JDK"
15389    has_space=`$ECHO "$path" | $GREP " "`
15390    if test "x$has_space" != x; then
15391      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15392$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15393      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15394    fi
15395
15396    # Use eval to expand a potential ~
15397    eval path="$path"
15398    if test ! -f "$path" && test ! -d "$path"; then
15399      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15400    fi
15401
15402    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15403  fi
15404
15405              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15406$as_echo_n "checking for Boot JDK... " >&6; }
15407              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15408$as_echo "$BOOT_JDK" >&6; }
15409              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15410$as_echo_n "checking Boot JDK version... " >&6; }
15411              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15412              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15413$as_echo "$BOOT_JDK_VERSION" >&6; }
15414            fi # end check jdk version
15415          fi # end check rt.jar
15416        fi # end check javac
15417      fi # end check java
15418    fi # end check boot jdk found
15419  fi
15420
15421    done
15422  fi
15423
15424
15425    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15426    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15427      # Do we have a bin/java?
15428      if test ! -x "$BOOT_JDK/bin/java"; then
15429        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15430$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15431        BOOT_JDK_FOUND=no
15432      else
15433        # Do we have a bin/javac?
15434        if test ! -x "$BOOT_JDK/bin/javac"; then
15435          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15436$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15437          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15438$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15439          BOOT_JDK_FOUND=no
15440        else
15441          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15442          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15443            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15444$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15445            BOOT_JDK_FOUND=no
15446          else
15447            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15448            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15449
15450            # Extra M4 quote needed to protect [] in grep expression.
15451            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15452            if test "x$FOUND_VERSION_78" = x; then
15453              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15454$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15455              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15456$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15457              BOOT_JDK_FOUND=no
15458            else
15459              # We're done! :-)
15460              BOOT_JDK_FOUND=yes
15461
15462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15463
15464  # Input might be given as Windows format, start by converting to
15465  # unix format.
15466  path="$BOOT_JDK"
15467  new_path=`$CYGPATH -u "$path"`
15468
15469  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15470  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15471  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15472  # "foo.exe" is OK but "foo" is an error.
15473  #
15474  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15475  # It is also a way to make sure we got the proper file name for the real test later on.
15476  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15477  if test "x$test_shortpath" = x; then
15478    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15479$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15480    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15481  fi
15482
15483  # Call helper function which possibly converts this using DOS-style short mode.
15484  # If so, the updated path is stored in $new_path.
15485
15486  input_path="$new_path"
15487  # Check if we need to convert this using DOS-style short mode. If the path
15488  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15489  # take no chances and rewrite it.
15490  # Note: m4 eats our [], so we need to use [ and ] instead.
15491  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15492  if test "x$has_forbidden_chars" != x; then
15493    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15494    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15495    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15496    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15497      # Going to short mode and back again did indeed matter. Since short mode is
15498      # case insensitive, let's make it lowercase to improve readability.
15499      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15500      # Now convert it back to Unix-stile (cygpath)
15501      input_path=`$CYGPATH -u "$shortmode_path"`
15502      new_path="$input_path"
15503    fi
15504  fi
15505
15506  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15507  if test "x$test_cygdrive_prefix" = x; then
15508    # As a simple fix, exclude /usr/bin since it's not a real path.
15509    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15510      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15511      # a path prefixed by /cygdrive for fixpath to work.
15512      new_path="$CYGWIN_ROOT_PATH$input_path"
15513    fi
15514  fi
15515
15516
15517  if test "x$path" != "x$new_path"; then
15518    BOOT_JDK="$new_path"
15519    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15520$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15521  fi
15522
15523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15524
15525  path="$BOOT_JDK"
15526  has_colon=`$ECHO $path | $GREP ^.:`
15527  new_path="$path"
15528  if test "x$has_colon" = x; then
15529    # Not in mixed or Windows style, start by that.
15530    new_path=`cmd //c echo $path`
15531  fi
15532
15533
15534  input_path="$new_path"
15535  # Check if we need to convert this using DOS-style short mode. If the path
15536  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15537  # take no chances and rewrite it.
15538  # Note: m4 eats our [], so we need to use [ and ] instead.
15539  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15540  if test "x$has_forbidden_chars" != x; then
15541    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15542    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15543  fi
15544
15545
15546  windows_path="$new_path"
15547  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15548    unix_path=`$CYGPATH -u "$windows_path"`
15549    new_path="$unix_path"
15550  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15551    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15552    new_path="$unix_path"
15553  fi
15554
15555  if test "x$path" != "x$new_path"; then
15556    BOOT_JDK="$new_path"
15557    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15558$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15559  fi
15560
15561  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15562  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15563
15564  else
15565    # We're on a posix platform. Hooray! :)
15566    path="$BOOT_JDK"
15567    has_space=`$ECHO "$path" | $GREP " "`
15568    if test "x$has_space" != x; then
15569      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15570$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15571      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15572    fi
15573
15574    # Use eval to expand a potential ~
15575    eval path="$path"
15576    if test ! -f "$path" && test ! -d "$path"; then
15577      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15578    fi
15579
15580    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15581  fi
15582
15583              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15584$as_echo_n "checking for Boot JDK... " >&6; }
15585              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15586$as_echo "$BOOT_JDK" >&6; }
15587              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15588$as_echo_n "checking Boot JDK version... " >&6; }
15589              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15590              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15591$as_echo "$BOOT_JDK_VERSION" >&6; }
15592            fi # end check jdk version
15593          fi # end check rt.jar
15594        fi # end check javac
15595      fi # end check java
15596    fi # end check boot jdk found
15597  fi
15598
15599  fi
15600
15601
15602    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15603    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15604      # Do we have a bin/java?
15605      if test ! -x "$BOOT_JDK/bin/java"; then
15606        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15607$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15608        BOOT_JDK_FOUND=no
15609      else
15610        # Do we have a bin/javac?
15611        if test ! -x "$BOOT_JDK/bin/javac"; then
15612          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15613$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15614          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15615$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15616          BOOT_JDK_FOUND=no
15617        else
15618          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15619          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15620            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15621$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15622            BOOT_JDK_FOUND=no
15623          else
15624            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15625            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15626
15627            # Extra M4 quote needed to protect [] in grep expression.
15628            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15629            if test "x$FOUND_VERSION_78" = x; then
15630              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15631$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15632              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15633$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15634              BOOT_JDK_FOUND=no
15635            else
15636              # We're done! :-)
15637              BOOT_JDK_FOUND=yes
15638
15639  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15640
15641  # Input might be given as Windows format, start by converting to
15642  # unix format.
15643  path="$BOOT_JDK"
15644  new_path=`$CYGPATH -u "$path"`
15645
15646  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15647  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15648  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15649  # "foo.exe" is OK but "foo" is an error.
15650  #
15651  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15652  # It is also a way to make sure we got the proper file name for the real test later on.
15653  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15654  if test "x$test_shortpath" = x; then
15655    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15656$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15657    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15658  fi
15659
15660  # Call helper function which possibly converts this using DOS-style short mode.
15661  # If so, the updated path is stored in $new_path.
15662
15663  input_path="$new_path"
15664  # Check if we need to convert this using DOS-style short mode. If the path
15665  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15666  # take no chances and rewrite it.
15667  # Note: m4 eats our [], so we need to use [ and ] instead.
15668  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15669  if test "x$has_forbidden_chars" != x; then
15670    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15671    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15672    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15673    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15674      # Going to short mode and back again did indeed matter. Since short mode is
15675      # case insensitive, let's make it lowercase to improve readability.
15676      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15677      # Now convert it back to Unix-stile (cygpath)
15678      input_path=`$CYGPATH -u "$shortmode_path"`
15679      new_path="$input_path"
15680    fi
15681  fi
15682
15683  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15684  if test "x$test_cygdrive_prefix" = x; then
15685    # As a simple fix, exclude /usr/bin since it's not a real path.
15686    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15687      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15688      # a path prefixed by /cygdrive for fixpath to work.
15689      new_path="$CYGWIN_ROOT_PATH$input_path"
15690    fi
15691  fi
15692
15693
15694  if test "x$path" != "x$new_path"; then
15695    BOOT_JDK="$new_path"
15696    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15697$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15698  fi
15699
15700  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15701
15702  path="$BOOT_JDK"
15703  has_colon=`$ECHO $path | $GREP ^.:`
15704  new_path="$path"
15705  if test "x$has_colon" = x; then
15706    # Not in mixed or Windows style, start by that.
15707    new_path=`cmd //c echo $path`
15708  fi
15709
15710
15711  input_path="$new_path"
15712  # Check if we need to convert this using DOS-style short mode. If the path
15713  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15714  # take no chances and rewrite it.
15715  # Note: m4 eats our [], so we need to use [ and ] instead.
15716  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15717  if test "x$has_forbidden_chars" != x; then
15718    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15719    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15720  fi
15721
15722
15723  windows_path="$new_path"
15724  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15725    unix_path=`$CYGPATH -u "$windows_path"`
15726    new_path="$unix_path"
15727  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15728    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15729    new_path="$unix_path"
15730  fi
15731
15732  if test "x$path" != "x$new_path"; then
15733    BOOT_JDK="$new_path"
15734    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15735$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15736  fi
15737
15738  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15739  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15740
15741  else
15742    # We're on a posix platform. Hooray! :)
15743    path="$BOOT_JDK"
15744    has_space=`$ECHO "$path" | $GREP " "`
15745    if test "x$has_space" != x; then
15746      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15747$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15748      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15749    fi
15750
15751    # Use eval to expand a potential ~
15752    eval path="$path"
15753    if test ! -f "$path" && test ! -d "$path"; then
15754      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15755    fi
15756
15757    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15758  fi
15759
15760              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15761$as_echo_n "checking for Boot JDK... " >&6; }
15762              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15763$as_echo "$BOOT_JDK" >&6; }
15764              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15765$as_echo_n "checking Boot JDK version... " >&6; }
15766              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15767              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15768$as_echo "$BOOT_JDK_VERSION" >&6; }
15769            fi # end check jdk version
15770          fi # end check rt.jar
15771        fi # end check javac
15772      fi # end check java
15773    fi # end check boot jdk found
15774  fi
15775
15776
15777# If we haven't found anything yet, we've truly lost. Give up.
15778if test "x$BOOT_JDK_FOUND" = xno; then
15779
15780    # Print a helpful message on how to acquire the necessary build dependency.
15781    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15782    MISSING_DEPENDENCY=openjdk
15783    PKGHANDLER_COMMAND=
15784
15785    case $PKGHANDLER in
15786	apt-get)
15787                apt_help     $MISSING_DEPENDENCY ;;
15788    yum)
15789                yum_help     $MISSING_DEPENDENCY ;;
15790	port)
15791                port_help    $MISSING_DEPENDENCY ;;
15792	pkgutil)
15793                pkgutil_help $MISSING_DEPENDENCY ;;
15794	pkgadd)
15795                pkgadd_help  $MISSING_DEPENDENCY ;;
15796    * )
15797      break ;;
15798    esac
15799
15800    if test "x$PKGHANDLER_COMMAND" != x; then
15801        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15802    fi
15803
15804  { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15805$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15806  { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15807$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15808  as_fn_error $? "Cannot continue" "$LINENO" 5
15809fi
15810
15811# Setup proper paths for what we found
15812BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15813if test ! -f "$BOOT_RTJAR"; then
15814    # On MacOSX it is called classes.jar
15815    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15816    if test -f "$BOOT_RTJAR"; then
15817      # Remove the ..
15818      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15819    fi
15820fi
15821BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15822BOOT_JDK="$BOOT_JDK"
15823
15824
15825
15826
15827# Setup tools from the Boot JDK.
15828
15829  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15830$as_echo_n "checking for java in Boot JDK... " >&6; }
15831  JAVA=$BOOT_JDK/bin/java
15832  if test ! -x $JAVA; then
15833      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15834$as_echo "not found" >&6; }
15835      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15836$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15837      as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15838  fi
15839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15840$as_echo "ok" >&6; }
15841
15842
15843  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15844$as_echo_n "checking for javac in Boot JDK... " >&6; }
15845  JAVAC=$BOOT_JDK/bin/javac
15846  if test ! -x $JAVAC; then
15847      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15848$as_echo "not found" >&6; }
15849      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15850$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15851      as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15852  fi
15853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15854$as_echo "ok" >&6; }
15855
15856
15857  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15858$as_echo_n "checking for javah in Boot JDK... " >&6; }
15859  JAVAH=$BOOT_JDK/bin/javah
15860  if test ! -x $JAVAH; then
15861      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15862$as_echo "not found" >&6; }
15863      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15864$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15865      as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15866  fi
15867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15868$as_echo "ok" >&6; }
15869
15870
15871  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15872$as_echo_n "checking for javap in Boot JDK... " >&6; }
15873  JAVAP=$BOOT_JDK/bin/javap
15874  if test ! -x $JAVAP; then
15875      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15876$as_echo "not found" >&6; }
15877      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15878$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15879      as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15880  fi
15881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15882$as_echo "ok" >&6; }
15883
15884
15885  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15886$as_echo_n "checking for jar in Boot JDK... " >&6; }
15887  JAR=$BOOT_JDK/bin/jar
15888  if test ! -x $JAR; then
15889      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15890$as_echo "not found" >&6; }
15891      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15892$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15893      as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15894  fi
15895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15896$as_echo "ok" >&6; }
15897
15898
15899  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15900$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15901  RMIC=$BOOT_JDK/bin/rmic
15902  if test ! -x $RMIC; then
15903      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15904$as_echo "not found" >&6; }
15905      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15906$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15907      as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15908  fi
15909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15910$as_echo "ok" >&6; }
15911
15912
15913  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15914$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15915  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15916  if test ! -x $NATIVE2ASCII; then
15917      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15918$as_echo "not found" >&6; }
15919      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15920$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15921      as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15922  fi
15923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15924$as_echo "ok" >&6; }
15925
15926
15927# Finally, set some other options...
15928
15929# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15930BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15931
15932
15933
15934
15935##############################################################################
15936#
15937# Specify options for anything that is run with the Boot JDK.
15938#
15939
15940# Check whether --with-boot-jdk-jvmargs was given.
15941if test "${with_boot_jdk_jvmargs+set}" = set; then :
15942  withval=$with_boot_jdk_jvmargs;
15943fi
15944
15945
15946if test "x$with_boot_jdk_jvmargs" = x; then
15947    # Not all JVM:s accept the same arguments on the command line.
15948    # OpenJDK specific increase in thread stack for JDK build,
15949    # well more specifically, when running javac.
15950    if test "x$BUILD_NUM_BITS" = x32; then
15951       STACK_SIZE=768
15952    else
15953       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15954       # since 64-bit pointers are pushed on the stach. Apparently, we need
15955       # to increase the stack space when javacing the JDK....
15956       STACK_SIZE=1536
15957    fi
15958
15959    # Minimum amount of heap memory.
15960
15961    $ECHO "Check if jvm arg is ok: -Xms64M" >&5
15962    $ECHO "Command: $JAVA -Xms64M -version" >&5
15963    OUTPUT=`$JAVA -Xms64M -version 2>&1`
15964    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15965    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15966    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15967        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15968	JVM_ARG_OK=true
15969    else
15970	$ECHO "Arg failed:" >&5
15971	$ECHO "$OUTPUT" >&5
15972	JVM_ARG_OK=false
15973    fi
15974
15975    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15976        # Why does macosx need more heap? Its the huge JDK batch.
15977
15978    $ECHO "Check if jvm arg is ok: -Xmx1600M" >&5
15979    $ECHO "Command: $JAVA -Xmx1600M -version" >&5
15980    OUTPUT=`$JAVA -Xmx1600M -version 2>&1`
15981    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15982    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15983    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15984        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15985	JVM_ARG_OK=true
15986    else
15987	$ECHO "Arg failed:" >&5
15988	$ECHO "$OUTPUT" >&5
15989	JVM_ARG_OK=false
15990    fi
15991
15992    else
15993
15994    $ECHO "Check if jvm arg is ok: -Xmx1100M" >&5
15995    $ECHO "Command: $JAVA -Xmx1100M -version" >&5
15996    OUTPUT=`$JAVA -Xmx1100M -version 2>&1`
15997    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15998    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15999    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16000        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
16001	JVM_ARG_OK=true
16002    else
16003	$ECHO "Arg failed:" >&5
16004	$ECHO "$OUTPUT" >&5
16005	JVM_ARG_OK=false
16006    fi
16007
16008    fi
16009    # When is adding -client something that speeds up the JVM?
16010    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
16011
16012    $ECHO "Check if jvm arg is ok: -XX:PermSize=32m" >&5
16013    $ECHO "Command: $JAVA -XX:PermSize=32m -version" >&5
16014    OUTPUT=`$JAVA -XX:PermSize=32m -version 2>&1`
16015    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16016    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16017    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16018        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
16019	JVM_ARG_OK=true
16020    else
16021	$ECHO "Arg failed:" >&5
16022	$ECHO "$OUTPUT" >&5
16023	JVM_ARG_OK=false
16024    fi
16025
16026
16027    $ECHO "Check if jvm arg is ok: -XX:MaxPermSize=160m" >&5
16028    $ECHO "Command: $JAVA -XX:MaxPermSize=160m -version" >&5
16029    OUTPUT=`$JAVA -XX:MaxPermSize=160m -version 2>&1`
16030    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16031    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16032    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16033        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
16034	JVM_ARG_OK=true
16035    else
16036	$ECHO "Arg failed:" >&5
16037	$ECHO "$OUTPUT" >&5
16038	JVM_ARG_OK=false
16039    fi
16040
16041
16042    $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
16043    $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
16044    OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
16045    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16046    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16047    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16048        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
16049	JVM_ARG_OK=true
16050    else
16051	$ECHO "Arg failed:" >&5
16052	$ECHO "$OUTPUT" >&5
16053	JVM_ARG_OK=false
16054    fi
16055
16056    # Disable special log output when a debug build is used as Boot JDK...
16057
16058    $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
16059    $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
16060    OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
16061    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16062    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16063    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16064        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
16065	JVM_ARG_OK=true
16066    else
16067	$ECHO "Arg failed:" >&5
16068	$ECHO "$OUTPUT" >&5
16069	JVM_ARG_OK=false
16070    fi
16071
16072fi
16073
16074BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
16075
16076
16077
16078###############################################################################
16079#
16080# Configure the sources to use. We can add or override individual directories.
16081#
16082###############################################################################
16083
16084
16085
16086# Where are the sources. Any of these can be overridden
16087# using --with-override-corba and the likes.
16088LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
16089CORBA_TOPDIR="$SRC_ROOT/corba"
16090JAXP_TOPDIR="$SRC_ROOT/jaxp"
16091JAXWS_TOPDIR="$SRC_ROOT/jaxws"
16092HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
16093NASHORN_TOPDIR="$SRC_ROOT/nashorn"
16094JDK_TOPDIR="$SRC_ROOT/jdk"
16095
16096
16097
16098
16099
16100
16101
16102
16103
16104
16105###############################################################################
16106#
16107# Pickup additional source for a component from outside of the source root
16108# or override source for a component.
16109#
16110
16111# Check whether --with-add-source-root was given.
16112if test "${with_add_source_root+set}" = set; then :
16113  withval=$with_add_source_root;
16114fi
16115
16116
16117
16118# Check whether --with-override-source-root was given.
16119if test "${with_override_source_root+set}" = set; then :
16120  withval=$with_override_source_root;
16121fi
16122
16123
16124
16125# Check whether --with-adds-and-overrides was given.
16126if test "${with_adds_and_overrides+set}" = set; then :
16127  withval=$with_adds_and_overrides;
16128fi
16129
16130
16131if test "x$with_adds_and_overrides" != x; then
16132    with_add_source_root="$with_adds_and_overrides/adds"
16133    with_override_source_root="$with_adds_and_overrides/overrides"
16134fi
16135
16136if test "x$with_add_source_root" != x; then
16137    if ! test -d $with_add_source_root; then
16138       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
16139    fi
16140    CURDIR="$PWD"
16141    cd "$with_add_source_root"
16142    ADD_SRC_ROOT="`pwd`"
16143    cd "$CURDIR"
16144    # Verify that the addon source root does not have any root makefiles.
16145    # If it does, then it is usually an error, prevent this.
16146    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
16147       test -f $with_add_source_root/langtools/make/Makefile; then
16148        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
16149    fi
16150    if test -f $with_add_source_root/corba/makefiles/Makefile || \
16151       test -f $with_add_source_root/corba/make/Makefile; then
16152        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
16153    fi
16154    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
16155       test -f $with_add_source_root/jaxp/make/Makefile; then
16156        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
16157    fi
16158    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
16159       test -f $with_add_source_root/jaxws/make/Makefile; then
16160        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
16161    fi
16162    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
16163       test -f $with_add_source_root/hotspot/make/Makefile; then
16164        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
16165    fi
16166    if test -f $with_add_source_root/nashorn/makefiles/Makefile || \
16167       test -f $with_add_source_root/nashorn/make/Makefile; then
16168        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
16169    fi
16170    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
16171       test -f $with_add_source_root/jdk/make/Makefile; then
16172        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
16173    fi
16174fi
16175
16176
16177if test "x$with_override_source_root" != x; then
16178    if ! test -d $with_override_source_root; then
16179       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
16180    fi
16181    CURDIR="$PWD"
16182    cd "$with_override_source_root"
16183    OVERRIDE_SRC_ROOT="`pwd`"
16184    cd "$CURDIR"
16185    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
16186       test -f $with_override_source_root/langtools/make/Makefile; then
16187        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
16188    fi
16189    if test -f $with_override_source_root/corba/makefiles/Makefile || \
16190       test -f $with_override_source_root/corba/make/Makefile; then
16191        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
16192    fi
16193    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
16194       test -f $with_override_source_root/jaxp/make/Makefile; then
16195        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
16196    fi
16197    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
16198       test -f $with_override_source_root/jaxws/make/Makefile; then
16199        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
16200    fi
16201    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
16202       test -f $with_override_source_root/hotspot/make/Makefile; then
16203        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
16204    fi
16205    if test -f $with_override_source_root/nashorn/makefiles/Makefile || \
16206       test -f $with_override_source_root/nashorn/make/Makefile; then
16207        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
16208    fi
16209    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
16210       test -f $with_override_source_root/jdk/make/Makefile; then
16211        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
16212    fi
16213fi
16214
16215
16216###############################################################################
16217#
16218# Override a repo completely, this is used for example when you have 3 small
16219# development sandboxes of the langtools sources and want to avoid having 3 full
16220# OpenJDK sources checked out on disk.
16221#
16222# Assuming that the 3 langtools sandboxes are located here:
16223# /home/fredrik/sandbox1/langtools
16224# /home/fredrik/sandbox2/langtools
16225# /home/fredrik/sandbox3/langtools
16226#
16227# From the source root you create build subdirs manually:
16228#     mkdir -p build1 build2 build3
16229# in each build directory run:
16230#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
16231#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
16232#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
16233#
16234
16235
16236# Check whether --with-override-langtools was given.
16237if test "${with_override_langtools+set}" = set; then :
16238  withval=$with_override_langtools;
16239fi
16240
16241
16242
16243# Check whether --with-override-corba was given.
16244if test "${with_override_corba+set}" = set; then :
16245  withval=$with_override_corba;
16246fi
16247
16248
16249
16250# Check whether --with-override-jaxp was given.
16251if test "${with_override_jaxp+set}" = set; then :
16252  withval=$with_override_jaxp;
16253fi
16254
16255
16256
16257# Check whether --with-override-jaxws was given.
16258if test "${with_override_jaxws+set}" = set; then :
16259  withval=$with_override_jaxws;
16260fi
16261
16262
16263
16264# Check whether --with-override-hotspot was given.
16265if test "${with_override_hotspot+set}" = set; then :
16266  withval=$with_override_hotspot;
16267fi
16268
16269
16270
16271# Check whether --with-override-nashorn was given.
16272if test "${with_override_nashorn+set}" = set; then :
16273  withval=$with_override_nashorn;
16274fi
16275
16276
16277
16278# Check whether --with-override-jdk was given.
16279if test "${with_override_jdk+set}" = set; then :
16280  withval=$with_override_jdk;
16281fi
16282
16283
16284if test "x$with_override_langtools" != x; then
16285    CURDIR="$PWD"
16286    cd "$with_override_langtools"
16287    LANGTOOLS_TOPDIR="`pwd`"
16288    cd "$CURDIR"
16289    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
16290        as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
16291    fi
16292    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
16293$as_echo_n "checking if langtools should be overridden... " >&6; }
16294    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
16295$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
16296fi
16297if test "x$with_override_corba" != x; then
16298    CURDIR="$PWD"
16299    cd "$with_override_corba"
16300    CORBA_TOPDIR="`pwd`"
16301    cd "$CURDIR"
16302    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
16303        as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
16304    fi
16305    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
16306$as_echo_n "checking if corba should be overridden... " >&6; }
16307    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
16308$as_echo "yes with $CORBA_TOPDIR" >&6; }
16309fi
16310if test "x$with_override_jaxp" != x; then
16311    CURDIR="$PWD"
16312    cd "$with_override_jaxp"
16313    JAXP_TOPDIR="`pwd`"
16314    cd "$CURDIR"
16315    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
16316        as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
16317    fi
16318    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
16319$as_echo_n "checking if jaxp should be overridden... " >&6; }
16320    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
16321$as_echo "yes with $JAXP_TOPDIR" >&6; }
16322fi
16323if test "x$with_override_jaxws" != x; then
16324    CURDIR="$PWD"
16325    cd "$with_override_jaxws"
16326    JAXWS_TOPDIR="`pwd`"
16327    cd "$CURDIR"
16328    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
16329        as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
16330    fi
16331    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
16332$as_echo_n "checking if jaxws should be overridden... " >&6; }
16333    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
16334$as_echo "yes with $JAXWS_TOPDIR" >&6; }
16335fi
16336if test "x$with_override_hotspot" != x; then
16337    CURDIR="$PWD"
16338    cd "$with_override_hotspot"
16339    HOTSPOT_TOPDIR="`pwd`"
16340    cd "$CURDIR"
16341    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
16342       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
16343        as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
16344    fi
16345    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
16346$as_echo_n "checking if hotspot should be overridden... " >&6; }
16347    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
16348$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
16349fi
16350if test "x$with_override_nashorn" != x; then
16351    CURDIR="$PWD"
16352    cd "$with_override_nashorn"
16353    NASHORN_TOPDIR="`pwd`"
16354    cd "$CURDIR"
16355    if ! test -f $NASHORN_TOPDIR/makefiles/Makefile; then
16356        as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
16357    fi
16358    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
16359$as_echo_n "checking if nashorn should be overridden... " >&6; }
16360    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
16361$as_echo "yes with $NASHORN_TOPDIR" >&6; }
16362fi
16363if test "x$with_override_jdk" != x; then
16364    CURDIR="$PWD"
16365    cd "$with_override_jdk"
16366    JDK_TOPDIR="`pwd`"
16367    cd "$CURDIR"
16368    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
16369        as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
16370    fi
16371    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
16372$as_echo_n "checking if JDK should be overridden... " >&6; }
16373    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
16374$as_echo "yes with $JDK_TOPDIR" >&6; }
16375fi
16376
16377
16378
16379BUILD_OUTPUT="$OUTPUT_ROOT"
16380
16381
16382HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
16383BUILD_HOTSPOT=true
16384
16385
16386
16387# Check whether --with-import-hotspot was given.
16388if test "${with_import_hotspot+set}" = set; then :
16389  withval=$with_import_hotspot;
16390fi
16391
16392if test "x$with_import_hotspot" != x; then
16393    CURDIR="$PWD"
16394    cd "$with_import_hotspot"
16395    HOTSPOT_DIST="`pwd`"
16396    cd "$CURDIR"
16397    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
16398        as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
16399    fi
16400    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
16401$as_echo_n "checking if hotspot should be imported... " >&6; }
16402    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
16403$as_echo "yes from $HOTSPOT_DIST" >&6; }
16404    BUILD_HOTSPOT=false
16405fi
16406
16407JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
16408
16409
16410###############################################################################
16411#
16412# Setup the toolchain (compilers etc), i.e. the tools that need to be
16413# cross-compilation aware.
16414#
16415###############################################################################
16416
16417
16418###############################################################################
16419#
16420# Configure the development tool paths and potential sysroot.
16421#
16422ac_ext=cpp
16423ac_cpp='$CXXCPP $CPPFLAGS'
16424ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16425ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16426ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16427
16428
16429# The option used to specify the target .o,.a or .so file.
16430# When compiling, how to specify the to be created object file.
16431CC_OUT_OPTION='-o$(SPACE)'
16432# When linking, how to specify the to be created executable.
16433EXE_OUT_OPTION='-o$(SPACE)'
16434# When linking, how to specify the to be created dynamically linkable library.
16435LD_OUT_OPTION='-o$(SPACE)'
16436# When archiving, how to specify the to be create static archive for object files.
16437AR_OUT_OPTION='rcs$(SPACE)'
16438
16439
16440
16441
16442
16443# Locate the actual tools
16444
16445
16446# Check whether --with-jtreg was given.
16447if test "${with_jtreg+set}" = set; then :
16448  withval=$with_jtreg;
16449else
16450  with_jtreg=no
16451fi
16452
16453
16454  if test "x$with_jtreg" = xno; then
16455    # jtreg disabled
16456    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16457$as_echo_n "checking for jtreg... " >&6; }
16458    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16459$as_echo "no" >&6; }
16460  else
16461    if test "x$with_jtreg" != xyes; then
16462      # with path specified.
16463      JT_HOME="$with_jtreg"
16464    fi
16465
16466    if test "x$JT_HOME" != x; then
16467      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16468$as_echo_n "checking for jtreg... " >&6; }
16469
16470      # use JT_HOME enviroment var.
16471
16472  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16473
16474  # Input might be given as Windows format, start by converting to
16475  # unix format.
16476  path="$JT_HOME"
16477  new_path=`$CYGPATH -u "$path"`
16478
16479  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16480  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16481  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16482  # "foo.exe" is OK but "foo" is an error.
16483  #
16484  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16485  # It is also a way to make sure we got the proper file name for the real test later on.
16486  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16487  if test "x$test_shortpath" = x; then
16488    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16489$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16490    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
16491  fi
16492
16493  # Call helper function which possibly converts this using DOS-style short mode.
16494  # If so, the updated path is stored in $new_path.
16495
16496  input_path="$new_path"
16497  # Check if we need to convert this using DOS-style short mode. If the path
16498  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16499  # take no chances and rewrite it.
16500  # Note: m4 eats our [], so we need to use [ and ] instead.
16501  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16502  if test "x$has_forbidden_chars" != x; then
16503    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16504    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16505    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16506    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16507      # Going to short mode and back again did indeed matter. Since short mode is
16508      # case insensitive, let's make it lowercase to improve readability.
16509      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16510      # Now convert it back to Unix-stile (cygpath)
16511      input_path=`$CYGPATH -u "$shortmode_path"`
16512      new_path="$input_path"
16513    fi
16514  fi
16515
16516  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16517  if test "x$test_cygdrive_prefix" = x; then
16518    # As a simple fix, exclude /usr/bin since it's not a real path.
16519    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16520      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16521      # a path prefixed by /cygdrive for fixpath to work.
16522      new_path="$CYGWIN_ROOT_PATH$input_path"
16523    fi
16524  fi
16525
16526
16527  if test "x$path" != "x$new_path"; then
16528    JT_HOME="$new_path"
16529    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16530$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16531  fi
16532
16533  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16534
16535  path="$JT_HOME"
16536  has_colon=`$ECHO $path | $GREP ^.:`
16537  new_path="$path"
16538  if test "x$has_colon" = x; then
16539    # Not in mixed or Windows style, start by that.
16540    new_path=`cmd //c echo $path`
16541  fi
16542
16543
16544  input_path="$new_path"
16545  # Check if we need to convert this using DOS-style short mode. If the path
16546  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16547  # take no chances and rewrite it.
16548  # Note: m4 eats our [], so we need to use [ and ] instead.
16549  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16550  if test "x$has_forbidden_chars" != x; then
16551    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16552    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16553  fi
16554
16555
16556  windows_path="$new_path"
16557  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16558    unix_path=`$CYGPATH -u "$windows_path"`
16559    new_path="$unix_path"
16560  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16561    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16562    new_path="$unix_path"
16563  fi
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  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16572  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16573
16574  else
16575    # We're on a posix platform. Hooray! :)
16576    path="$JT_HOME"
16577    has_space=`$ECHO "$path" | $GREP " "`
16578    if test "x$has_space" != x; then
16579      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16580$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16581      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16582    fi
16583
16584    # Use eval to expand a potential ~
16585    eval path="$path"
16586    if test ! -f "$path" && test ! -d "$path"; then
16587      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
16588    fi
16589
16590    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
16591  fi
16592
16593
16594      # jtreg win32 script works for everybody
16595      JTREGEXE="$JT_HOME/win32/bin/jtreg"
16596
16597      if test ! -f "$JTREGEXE"; then
16598        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
16599      fi
16600
16601      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16602$as_echo "$JTREGEXE" >&6; }
16603    else
16604      # try to find jtreg on path
16605
16606    for ac_prog in jtreg
16607do
16608  # Extract the first word of "$ac_prog", so it can be a program name with args.
16609set dummy $ac_prog; ac_word=$2
16610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16611$as_echo_n "checking for $ac_word... " >&6; }
16612if ${ac_cv_path_JTREGEXE+:} false; then :
16613  $as_echo_n "(cached) " >&6
16614else
16615  case $JTREGEXE in
16616  [\\/]* | ?:[\\/]*)
16617  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
16618  ;;
16619  *)
16620  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16621for as_dir in $PATH
16622do
16623  IFS=$as_save_IFS
16624  test -z "$as_dir" && as_dir=.
16625    for ac_exec_ext in '' $ac_executable_extensions; do
16626  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16627    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
16628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16629    break 2
16630  fi
16631done
16632  done
16633IFS=$as_save_IFS
16634
16635  ;;
16636esac
16637fi
16638JTREGEXE=$ac_cv_path_JTREGEXE
16639if test -n "$JTREGEXE"; then
16640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16641$as_echo "$JTREGEXE" >&6; }
16642else
16643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16644$as_echo "no" >&6; }
16645fi
16646
16647
16648  test -n "$JTREGEXE" && break
16649done
16650
16651
16652    if test "x$JTREGEXE" = x; then
16653        if test "xjtreg" = x; then
16654          PROG_NAME=jtregexe
16655        else
16656          PROG_NAME=jtreg
16657        fi
16658        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
16659$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
16660        as_fn_error $? "Cannot continue" "$LINENO" 5
16661    fi
16662
16663
16664      JT_HOME="`$DIRNAME $JTREGEXE`"
16665    fi
16666  fi
16667
16668
16669
16670
16671
16672if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16673
16674  # Store path to cygwin link.exe to help excluding it when searching for
16675  # VS linker. This must be done before changing the PATH when looking for VS.
16676  # Extract the first word of "link", so it can be a program name with args.
16677set dummy link; ac_word=$2
16678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16679$as_echo_n "checking for $ac_word... " >&6; }
16680if ${ac_cv_path_CYGWIN_LINK+:} false; then :
16681  $as_echo_n "(cached) " >&6
16682else
16683  case $CYGWIN_LINK in
16684  [\\/]* | ?:[\\/]*)
16685  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16686  ;;
16687  *)
16688  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16689for as_dir in $PATH
16690do
16691  IFS=$as_save_IFS
16692  test -z "$as_dir" && as_dir=.
16693    for ac_exec_ext in '' $ac_executable_extensions; do
16694  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16695    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16696    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16697    break 2
16698  fi
16699done
16700  done
16701IFS=$as_save_IFS
16702
16703  ;;
16704esac
16705fi
16706CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16707if test -n "$CYGWIN_LINK"; then
16708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16709$as_echo "$CYGWIN_LINK" >&6; }
16710else
16711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16712$as_echo "no" >&6; }
16713fi
16714
16715
16716  if test "x$CYGWIN_LINK" != x; then
16717    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16718$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16719    "$CYGWIN_LINK" --version > /dev/null
16720    if test $? -eq 0 ; then
16721      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16722$as_echo "yes" >&6; }
16723    else
16724      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16725$as_echo "no" >&6; }
16726      # This might be the VS linker. Don't exclude it later on.
16727      CYGWIN_LINK=""
16728    fi
16729  fi
16730
16731  # First-hand choice is to locate and run the vsvars bat file.
16732
16733  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16734    VCVARSFILE="vc/bin/vcvars32.bat"
16735  else
16736    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16737  fi
16738
16739  VS_ENV_CMD=""
16740  VS_ENV_ARGS=""
16741  if test "x$with_toolsdir" != x; then
16742
16743  if test "x$VS_ENV_CMD" = x; then
16744    VS100BASE="$with_toolsdir/../.."
16745    METHOD="--with-tools-dir"
16746
16747  windows_path="$VS100BASE"
16748  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16749    unix_path=`$CYGPATH -u "$windows_path"`
16750    VS100BASE="$unix_path"
16751  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16752    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16753    VS100BASE="$unix_path"
16754  fi
16755
16756    if test -d "$VS100BASE"; then
16757      if test -f "$VS100BASE/$VCVARSFILE"; then
16758        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16759$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16760        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16761      else
16762        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16763$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16764        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16765$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16766      fi
16767    fi
16768  fi
16769
16770  fi
16771
16772  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16773    # Having specified an argument which is incorrect will produce an instant failure;
16774    # we should not go on looking
16775    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16776$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16777    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16778$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16779    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16780  fi
16781
16782  if test "x$VS100COMNTOOLS" != x; then
16783
16784  if test "x$VS_ENV_CMD" = x; then
16785    VS100BASE="$VS100COMNTOOLS/../.."
16786    METHOD="VS100COMNTOOLS variable"
16787
16788  windows_path="$VS100BASE"
16789  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16790    unix_path=`$CYGPATH -u "$windows_path"`
16791    VS100BASE="$unix_path"
16792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16793    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16794    VS100BASE="$unix_path"
16795  fi
16796
16797    if test -d "$VS100BASE"; then
16798      if test -f "$VS100BASE/$VCVARSFILE"; then
16799        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16800$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16801        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16802      else
16803        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16804$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16805        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16806$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16807      fi
16808    fi
16809  fi
16810
16811  fi
16812  if test "x$PROGRAMFILES" != x; then
16813
16814  if test "x$VS_ENV_CMD" = x; then
16815    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16816    METHOD="well-known name"
16817
16818  windows_path="$VS100BASE"
16819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16820    unix_path=`$CYGPATH -u "$windows_path"`
16821    VS100BASE="$unix_path"
16822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16823    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16824    VS100BASE="$unix_path"
16825  fi
16826
16827    if test -d "$VS100BASE"; then
16828      if test -f "$VS100BASE/$VCVARSFILE"; then
16829        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16830$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16831        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16832      else
16833        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16834$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16835        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16836$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16837      fi
16838    fi
16839  fi
16840
16841  fi
16842
16843  if test "x$VS_ENV_CMD" = x; then
16844    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16845    METHOD="well-known name"
16846
16847  windows_path="$VS100BASE"
16848  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16849    unix_path=`$CYGPATH -u "$windows_path"`
16850    VS100BASE="$unix_path"
16851  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16852    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16853    VS100BASE="$unix_path"
16854  fi
16855
16856    if test -d "$VS100BASE"; then
16857      if test -f "$VS100BASE/$VCVARSFILE"; then
16858        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16859$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16860        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16861      else
16862        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16863$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16864        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16865$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16866      fi
16867    fi
16868  fi
16869
16870
16871  if test "x$VS_ENV_CMD" = x; then
16872    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16873    METHOD="well-known name"
16874
16875  windows_path="$VS100BASE"
16876  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16877    unix_path=`$CYGPATH -u "$windows_path"`
16878    VS100BASE="$unix_path"
16879  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16880    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16881    VS100BASE="$unix_path"
16882  fi
16883
16884    if test -d "$VS100BASE"; then
16885      if test -f "$VS100BASE/$VCVARSFILE"; then
16886        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16887$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16888        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16889      else
16890        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16891$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16892        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16893$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16894      fi
16895    fi
16896  fi
16897
16898
16899  if test "x$ProgramW6432" != x; then
16900
16901  if test "x$VS_ENV_CMD" = x; then
16902    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16903    METHOD="well-known name"
16904
16905  windows_path="$WIN_SDK_BASE"
16906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16907    unix_path=`$CYGPATH -u "$windows_path"`
16908    WIN_SDK_BASE="$unix_path"
16909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16910    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16911    WIN_SDK_BASE="$unix_path"
16912  fi
16913
16914    if test -d "$WIN_SDK_BASE"; then
16915      # There have been cases of partial or broken SDK installations. A missing
16916      # lib dir is not going to work.
16917      if test ! -d "$WIN_SDK_BASE/../lib"; then
16918        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16919$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16920        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16921$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16922      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16923        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16924$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16925        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16926        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16927          VS_ENV_ARGS="/x86"
16928        else
16929          VS_ENV_ARGS="/x64"
16930        fi
16931      else
16932        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16933$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16934        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16935$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16936      fi
16937    fi
16938  fi
16939
16940  fi
16941  if test "x$PROGRAMW6432" != x; then
16942
16943  if test "x$VS_ENV_CMD" = x; then
16944    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16945    METHOD="well-known name"
16946
16947  windows_path="$WIN_SDK_BASE"
16948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16949    unix_path=`$CYGPATH -u "$windows_path"`
16950    WIN_SDK_BASE="$unix_path"
16951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16952    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16953    WIN_SDK_BASE="$unix_path"
16954  fi
16955
16956    if test -d "$WIN_SDK_BASE"; then
16957      # There have been cases of partial or broken SDK installations. A missing
16958      # lib dir is not going to work.
16959      if test ! -d "$WIN_SDK_BASE/../lib"; then
16960        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16961$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16962        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16963$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16964      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16965        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16966$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16967        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16968        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16969          VS_ENV_ARGS="/x86"
16970        else
16971          VS_ENV_ARGS="/x64"
16972        fi
16973      else
16974        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16975$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16976        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16977$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16978      fi
16979    fi
16980  fi
16981
16982  fi
16983  if test "x$PROGRAMFILES" != x; then
16984
16985  if test "x$VS_ENV_CMD" = x; then
16986    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16987    METHOD="well-known name"
16988
16989  windows_path="$WIN_SDK_BASE"
16990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16991    unix_path=`$CYGPATH -u "$windows_path"`
16992    WIN_SDK_BASE="$unix_path"
16993  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16994    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16995    WIN_SDK_BASE="$unix_path"
16996  fi
16997
16998    if test -d "$WIN_SDK_BASE"; then
16999      # There have been cases of partial or broken SDK installations. A missing
17000      # lib dir is not going to work.
17001      if test ! -d "$WIN_SDK_BASE/../lib"; then
17002        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17003$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17004        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17005$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17006      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17007        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17008$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17009        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17010        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17011          VS_ENV_ARGS="/x86"
17012        else
17013          VS_ENV_ARGS="/x64"
17014        fi
17015      else
17016        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17017$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17018        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17019$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17020      fi
17021    fi
17022  fi
17023
17024  fi
17025
17026  if test "x$VS_ENV_CMD" = x; then
17027    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
17028    METHOD="well-known name"
17029
17030  windows_path="$WIN_SDK_BASE"
17031  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17032    unix_path=`$CYGPATH -u "$windows_path"`
17033    WIN_SDK_BASE="$unix_path"
17034  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17035    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17036    WIN_SDK_BASE="$unix_path"
17037  fi
17038
17039    if test -d "$WIN_SDK_BASE"; then
17040      # There have been cases of partial or broken SDK installations. A missing
17041      # lib dir is not going to work.
17042      if test ! -d "$WIN_SDK_BASE/../lib"; then
17043        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17044$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17045        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17046$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17047      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17048        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17049$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17050        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17051        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17052          VS_ENV_ARGS="/x86"
17053        else
17054          VS_ENV_ARGS="/x64"
17055        fi
17056      else
17057        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17058$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17059        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17060$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17061      fi
17062    fi
17063  fi
17064
17065
17066  if test "x$VS_ENV_CMD" = x; then
17067    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
17068    METHOD="well-known name"
17069
17070  windows_path="$WIN_SDK_BASE"
17071  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17072    unix_path=`$CYGPATH -u "$windows_path"`
17073    WIN_SDK_BASE="$unix_path"
17074  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17075    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17076    WIN_SDK_BASE="$unix_path"
17077  fi
17078
17079    if test -d "$WIN_SDK_BASE"; then
17080      # There have been cases of partial or broken SDK installations. A missing
17081      # lib dir is not going to work.
17082      if test ! -d "$WIN_SDK_BASE/../lib"; then
17083        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17084$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17085        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17086$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17087      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17088        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17089$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17090        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17091        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17092          VS_ENV_ARGS="/x86"
17093        else
17094          VS_ENV_ARGS="/x64"
17095        fi
17096      else
17097        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17098$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17099        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17100$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17101      fi
17102    fi
17103  fi
17104
17105
17106  if test "x$VS_ENV_CMD" != x; then
17107    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
17108
17109  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17110
17111  # First separate the path from the arguments. This will split at the first
17112  # space.
17113  complete="$VS_ENV_CMD"
17114  path="${complete%% *}"
17115  tmp="$complete EOL"
17116  arguments="${tmp#* }"
17117
17118  # Input might be given as Windows format, start by converting to
17119  # unix format.
17120  new_path=`$CYGPATH -u "$path"`
17121
17122  # Now try to locate executable using which
17123  new_path=`$WHICH "$new_path" 2> /dev/null`
17124  # bat and cmd files are not always considered executable in cygwin causing which
17125  # to not find them
17126  if test "x$new_path" = x \
17127           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17128           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17129    new_path=`$CYGPATH -u "$path"`
17130  fi
17131  if test "x$new_path" = x; then
17132    # Oops. Which didn't find the executable.
17133    # The splitting of arguments from the executable at a space might have been incorrect,
17134    # since paths with space are more likely in Windows. Give it another try with the whole
17135    # argument.
17136    path="$complete"
17137    arguments="EOL"
17138    new_path=`$CYGPATH -u "$path"`
17139    new_path=`$WHICH "$new_path" 2> /dev/null`
17140    # bat and cmd files are not always considered executable in cygwin causing which
17141    # to not find them
17142    if test "x$new_path" = x \
17143             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17144             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17145      new_path=`$CYGPATH -u "$path"`
17146    fi
17147    if test "x$new_path" = x; then
17148      # It's still not found. Now this is an unrecoverable error.
17149      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17150$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17151      has_space=`$ECHO "$complete" | $GREP " "`
17152      if test "x$has_space" != x; then
17153        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17154$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17155      fi
17156      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17157    fi
17158  fi
17159
17160  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17161  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17162  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17163  # "foo.exe" is OK but "foo" is an error.
17164  #
17165  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17166  # It is also a way to make sure we got the proper file name for the real test later on.
17167  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17168  if test "x$test_shortpath" = x; then
17169    # Short path failed, file does not exist as specified.
17170    # Try adding .exe or .cmd
17171    if test -f "${new_path}.exe"; then
17172       input_to_shortpath="${new_path}.exe"
17173    elif test -f "${new_path}.cmd"; then
17174       input_to_shortpath="${new_path}.cmd"
17175    else
17176      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
17177$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
17178      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17179$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17180      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17181    fi
17182  else
17183    input_to_shortpath="$new_path"
17184  fi
17185
17186  # Call helper function which possibly converts this using DOS-style short mode.
17187  # If so, the updated path is stored in $new_path.
17188  new_path="$input_to_shortpath"
17189
17190  input_path="$input_to_shortpath"
17191  # Check if we need to convert this using DOS-style short mode. If the path
17192  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17193  # take no chances and rewrite it.
17194  # Note: m4 eats our [], so we need to use [ and ] instead.
17195  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17196  if test "x$has_forbidden_chars" != x; then
17197    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17198    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17199    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17200    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17201      # Going to short mode and back again did indeed matter. Since short mode is
17202      # case insensitive, let's make it lowercase to improve readability.
17203      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17204      # Now convert it back to Unix-stile (cygpath)
17205      input_path=`$CYGPATH -u "$shortmode_path"`
17206      new_path="$input_path"
17207    fi
17208  fi
17209
17210  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17211  if test "x$test_cygdrive_prefix" = x; then
17212    # As a simple fix, exclude /usr/bin since it's not a real path.
17213    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17214      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17215      # a path prefixed by /cygdrive for fixpath to work.
17216      new_path="$CYGWIN_ROOT_PATH$input_path"
17217    fi
17218  fi
17219
17220  # remove trailing .exe if any
17221  new_path="${new_path/%.exe/}"
17222
17223  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17224
17225  # First separate the path from the arguments. This will split at the first
17226  # space.
17227  complete="$VS_ENV_CMD"
17228  path="${complete%% *}"
17229  tmp="$complete EOL"
17230  arguments="${tmp#* }"
17231
17232  # Input might be given as Windows format, start by converting to
17233  # unix format.
17234  new_path="$path"
17235
17236  windows_path="$new_path"
17237  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17238    unix_path=`$CYGPATH -u "$windows_path"`
17239    new_path="$unix_path"
17240  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17241    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17242    new_path="$unix_path"
17243  fi
17244
17245
17246  # Now try to locate executable using which
17247  new_path=`$WHICH "$new_path" 2> /dev/null`
17248
17249  if test "x$new_path" = x; then
17250    # Oops. Which didn't find the executable.
17251    # The splitting of arguments from the executable at a space might have been incorrect,
17252    # since paths with space are more likely in Windows. Give it another try with the whole
17253    # argument.
17254    path="$complete"
17255    arguments="EOL"
17256    new_path="$path"
17257
17258  windows_path="$new_path"
17259  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17260    unix_path=`$CYGPATH -u "$windows_path"`
17261    new_path="$unix_path"
17262  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17263    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17264    new_path="$unix_path"
17265  fi
17266
17267
17268    new_path=`$WHICH "$new_path" 2> /dev/null`
17269
17270    if test "x$new_path" = x; then
17271      # It's still not found. Now this is an unrecoverable error.
17272      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17273$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17274      has_space=`$ECHO "$complete" | $GREP " "`
17275      if test "x$has_space" != x; then
17276        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17277$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17278      fi
17279      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17280    fi
17281  fi
17282
17283  # Now new_path has a complete unix path to the binary
17284  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17285    # Keep paths in /bin as-is, but remove trailing .exe if any
17286    new_path="${new_path/%.exe/}"
17287    # Do not save /bin paths to all_fixpath_prefixes!
17288  else
17289    # Not in mixed or Windows style, start by that.
17290    new_path=`cmd //c echo $new_path`
17291
17292  input_path="$new_path"
17293  # Check if we need to convert this using DOS-style short mode. If the path
17294  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17295  # take no chances and rewrite it.
17296  # Note: m4 eats our [], so we need to use [ and ] instead.
17297  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17298  if test "x$has_forbidden_chars" != x; then
17299    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17300    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17301  fi
17302
17303    # Output is in $new_path
17304
17305  windows_path="$new_path"
17306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17307    unix_path=`$CYGPATH -u "$windows_path"`
17308    new_path="$unix_path"
17309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17310    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17311    new_path="$unix_path"
17312  fi
17313
17314    # remove trailing .exe if any
17315    new_path="${new_path/%.exe/}"
17316
17317    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17318    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17319  fi
17320
17321  else
17322    # We're on a posix platform. Hooray! :)
17323    # First separate the path from the arguments. This will split at the first
17324    # space.
17325    complete="$VS_ENV_CMD"
17326    path="${complete%% *}"
17327    tmp="$complete EOL"
17328    arguments="${tmp#* }"
17329
17330    # Cannot rely on the command "which" here since it doesn't always work.
17331    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17332    if test -z "$is_absolute_path"; then
17333      # Path to executable is not absolute. Find it.
17334      IFS_save="$IFS"
17335      IFS=:
17336      for p in $PATH; do
17337        if test -f "$p/$path" && test -x "$p/$path"; then
17338          new_path="$p/$path"
17339          break
17340        fi
17341      done
17342      IFS="$IFS_save"
17343    else
17344      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
17345$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
17346      new_path="$path"
17347    fi
17348
17349    if test "x$new_path" = x; then
17350        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17351$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17352        has_space=`$ECHO "$complete" | $GREP " "`
17353        if test "x$has_space" != x; then
17354          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17355$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17356        fi
17357        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17358      fi
17359  fi
17360
17361      # Now join together the path and the arguments once again
17362      if test "x$arguments" != xEOL; then
17363        new_complete="$new_path ${arguments% *}"
17364      else
17365        new_complete="$new_path"
17366      fi
17367
17368  if test "x$complete" != "x$new_complete"; then
17369      VS_ENV_CMD="$new_complete"
17370      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
17371$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
17372    fi
17373
17374
17375    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
17376    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
17377$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
17378    cd $OUTPUT_ROOT
17379    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
17380    # to autoconf standards.
17381
17382    #----
17383
17384    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
17385    # but calculate the difference in Cygwin environment before/after running it and then
17386    # apply the diff.
17387
17388    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
17389      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
17390      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
17391      _dosbash=`cygpath -a -w -s \`which bash\`.*`
17392    else
17393      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
17394      _dosbash=`cmd //c echo \`which bash\``
17395    fi
17396
17397    # generate the set of exported vars before/after the vs10 setup
17398    $ECHO "@echo off"                                           >  localdevenvtmp.bat
17399    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
17400    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
17401    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
17402
17403    # Now execute the newly created bat file.
17404    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
17405    cmd /c localdevenvtmp.bat | cat
17406
17407    # apply the diff (less some non-vs10 vars named by "!")
17408    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
17409    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
17410    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
17411
17412    # cleanup
17413    $RM localdevenvtmp*
17414    #----
17415    cd $CURDIR
17416    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
17417      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17418$as_echo "no" >&6; }
17419      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
17420$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
17421      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17422$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17423      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17424$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17425      as_fn_error $? "Cannot continue" "$LINENO" 5
17426    fi
17427
17428    # Now set all paths and other env variables. This will allow the rest of
17429    # the configure script to find and run the compiler in the proper way.
17430    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
17431$as_echo "$as_me: Setting extracted environment variables" >&6;}
17432    . $OUTPUT_ROOT/localdevenv.sh
17433  else
17434    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
17435    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
17436$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
17437  fi
17438
17439  # At this point, we should have corrent variables in the environment, or we can't continue.
17440  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
17441$as_echo_n "checking for Visual Studio variables... " >&6; }
17442
17443  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
17444    if test "x$INCLUDE" = x || test "x$LIB" = x; then
17445      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
17446$as_echo "present but broken" >&6; }
17447      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
17448    else
17449      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17450$as_echo "ok" >&6; }
17451      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
17452      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
17453      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
17454      # Remove any paths containing # (typically F#) as that messes up make
17455      PATH=`$ECHO "$PATH" | $SED 's/[^:#]*#[^:]*://g'`
17456      VS_PATH="$PATH"
17457
17458
17459
17460    fi
17461  else
17462    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17463$as_echo "not found" >&6; }
17464
17465    if test "x$VS_ENV_CMD" = x; then
17466      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
17467$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
17468      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
17469$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
17470    else
17471      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
17472$as_echo "$as_me: Running the extraction script failed." >&6;}
17473    fi
17474    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17475$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17476    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17477$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17478    as_fn_error $? "Cannot continue" "$LINENO" 5
17479  fi
17480
17481  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17482$as_echo_n "checking for msvcr100.dll... " >&6; }
17483
17484# Check whether --with-msvcr-dll was given.
17485if test "${with_msvcr_dll+set}" = set; then :
17486  withval=$with_msvcr_dll;
17487fi
17488
17489  if test "x$with_msvcr_dll" != x; then
17490    MSVCR_DLL="$with_msvcr_dll"
17491  else
17492    if test "x$VCINSTALLDIR" != x; then
17493      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17494        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
17495      else
17496        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
17497        if test "x$MSVCR_DLL" = x; then
17498          MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
17499        fi
17500      fi
17501      if test "x$MSVCR_DLL" != x; then
17502        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
17503$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
17504      else
17505        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
17506$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
17507      fi
17508    fi
17509    # Try some fallback alternatives
17510    if test "x$MSVCR_DLL" = x; then
17511      # If visual studio express is installed, there is usually one with the debugger
17512      if test "x$VS100COMNTOOLS" != x; then
17513        if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17514          MSVCR_DLL=`find "$VS100COMNTOOLS/.." -name msvcr100.dll | grep -i x64 | head --lines 1`
17515          { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $VS100COMNTOOLS..: $VS100COMNTOOLS.." >&5
17516$as_echo "$as_me: msvcr100.dll found in $VS100COMNTOOLS..: $VS100COMNTOOLS.." >&6;}
17517        fi
17518      fi
17519    fi
17520    if test "x$MSVCR_DLL" = x; then
17521      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17522        # Fallback for 32bit builds, look in the windows directory.
17523        if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
17524          { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
17525$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
17526          MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
17527        fi
17528      fi
17529    fi
17530  fi
17531  if test "x$MSVCR_DLL" = x; then
17532    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17533$as_echo "no" >&6; }
17534    as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
17535  fi
17536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17537$as_echo "$MSVCR_DLL" >&6; }
17538
17539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17540
17541  # Input might be given as Windows format, start by converting to
17542  # unix format.
17543  path="$MSVCR_DLL"
17544  new_path=`$CYGPATH -u "$path"`
17545
17546  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17547  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17548  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17549  # "foo.exe" is OK but "foo" is an error.
17550  #
17551  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17552  # It is also a way to make sure we got the proper file name for the real test later on.
17553  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17554  if test "x$test_shortpath" = x; then
17555    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17556$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17557    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
17558  fi
17559
17560  # Call helper function which possibly converts this using DOS-style short mode.
17561  # If so, the updated path is stored in $new_path.
17562
17563  input_path="$new_path"
17564  # Check if we need to convert this using DOS-style short mode. If the path
17565  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17566  # take no chances and rewrite it.
17567  # Note: m4 eats our [], so we need to use [ and ] instead.
17568  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17569  if test "x$has_forbidden_chars" != x; then
17570    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17571    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17572    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17573    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17574      # Going to short mode and back again did indeed matter. Since short mode is
17575      # case insensitive, let's make it lowercase to improve readability.
17576      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17577      # Now convert it back to Unix-stile (cygpath)
17578      input_path=`$CYGPATH -u "$shortmode_path"`
17579      new_path="$input_path"
17580    fi
17581  fi
17582
17583  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17584  if test "x$test_cygdrive_prefix" = x; then
17585    # As a simple fix, exclude /usr/bin since it's not a real path.
17586    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17587      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17588      # a path prefixed by /cygdrive for fixpath to work.
17589      new_path="$CYGWIN_ROOT_PATH$input_path"
17590    fi
17591  fi
17592
17593
17594  if test "x$path" != "x$new_path"; then
17595    MSVCR_DLL="$new_path"
17596    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17597$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17598  fi
17599
17600  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17601
17602  path="$MSVCR_DLL"
17603  has_colon=`$ECHO $path | $GREP ^.:`
17604  new_path="$path"
17605  if test "x$has_colon" = x; then
17606    # Not in mixed or Windows style, start by that.
17607    new_path=`cmd //c echo $path`
17608  fi
17609
17610
17611  input_path="$new_path"
17612  # Check if we need to convert this using DOS-style short mode. If the path
17613  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17614  # take no chances and rewrite it.
17615  # Note: m4 eats our [], so we need to use [ and ] instead.
17616  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17617  if test "x$has_forbidden_chars" != x; then
17618    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17619    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17620  fi
17621
17622
17623  windows_path="$new_path"
17624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17625    unix_path=`$CYGPATH -u "$windows_path"`
17626    new_path="$unix_path"
17627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17628    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17629    new_path="$unix_path"
17630  fi
17631
17632  if test "x$path" != "x$new_path"; then
17633    MSVCR_DLL="$new_path"
17634    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17635$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17636  fi
17637
17638  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17639  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17640
17641  else
17642    # We're on a posix platform. Hooray! :)
17643    path="$MSVCR_DLL"
17644    has_space=`$ECHO "$path" | $GREP " "`
17645    if test "x$has_space" != x; then
17646      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17647$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17648      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17649    fi
17650
17651    # Use eval to expand a potential ~
17652    eval path="$path"
17653    if test ! -f "$path" && test ! -d "$path"; then
17654      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
17655    fi
17656
17657    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
17658  fi
17659
17660
17661
17662
17663# Check whether --with-dxsdk was given.
17664if test "${with_dxsdk+set}" = set; then :
17665  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
17666$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
17667fi
17668
17669
17670
17671
17672# Check whether --with-dxsdk-lib was given.
17673if test "${with_dxsdk_lib+set}" = set; then :
17674  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
17675$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
17676fi
17677
17678
17679
17680
17681# Check whether --with-dxsdk-include was given.
17682if test "${with_dxsdk_include+set}" = set; then :
17683  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
17684$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
17685fi
17686
17687
17688fi
17689
17690
17691
17692# If --build AND --host is set, then the configure script will find any
17693# cross compilation tools in the PATH. Cross compilation tools
17694# follows the cross compilation standard where they are prefixed with ${host}.
17695# For example the binary i686-sun-solaris2.10-gcc
17696# will cross compile for i686-sun-solaris2.10
17697# If neither of build and host is not set, then build=host and the
17698# default compiler found in the path will be used.
17699# Setting only --host, does not seem to be really supported.
17700# Please set both --build and --host if you want to cross compile.
17701
17702if test "x$COMPILE_TYPE" = "xcross"; then
17703    # Now we to find a C/C++ compiler that can build executables for the build
17704    # platform. We can't use the AC_PROG_CC macro, since it can only be used
17705    # once. Also, we need to do this before adding a tools dir to the path,
17706    # otherwise we might pick up cross-compilers which don't use standard naming.
17707    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
17708    # to wait until they are properly discovered.
17709    for ac_prog in cl cc gcc
17710do
17711  # Extract the first word of "$ac_prog", so it can be a program name with args.
17712set dummy $ac_prog; ac_word=$2
17713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17714$as_echo_n "checking for $ac_word... " >&6; }
17715if ${ac_cv_path_BUILD_CC+:} false; then :
17716  $as_echo_n "(cached) " >&6
17717else
17718  case $BUILD_CC in
17719  [\\/]* | ?:[\\/]*)
17720  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
17721  ;;
17722  *)
17723  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17724for as_dir in $PATH
17725do
17726  IFS=$as_save_IFS
17727  test -z "$as_dir" && as_dir=.
17728    for ac_exec_ext in '' $ac_executable_extensions; do
17729  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17730    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
17731    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17732    break 2
17733  fi
17734done
17735  done
17736IFS=$as_save_IFS
17737
17738  ;;
17739esac
17740fi
17741BUILD_CC=$ac_cv_path_BUILD_CC
17742if test -n "$BUILD_CC"; then
17743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
17744$as_echo "$BUILD_CC" >&6; }
17745else
17746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17747$as_echo "no" >&6; }
17748fi
17749
17750
17751  test -n "$BUILD_CC" && break
17752done
17753
17754
17755  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17756
17757  # First separate the path from the arguments. This will split at the first
17758  # space.
17759  complete="$BUILD_CC"
17760  path="${complete%% *}"
17761  tmp="$complete EOL"
17762  arguments="${tmp#* }"
17763
17764  # Input might be given as Windows format, start by converting to
17765  # unix format.
17766  new_path=`$CYGPATH -u "$path"`
17767
17768  # Now try to locate executable using which
17769  new_path=`$WHICH "$new_path" 2> /dev/null`
17770  # bat and cmd files are not always considered executable in cygwin causing which
17771  # to not find them
17772  if test "x$new_path" = x \
17773           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17774           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17775    new_path=`$CYGPATH -u "$path"`
17776  fi
17777  if test "x$new_path" = x; then
17778    # Oops. Which didn't find the executable.
17779    # The splitting of arguments from the executable at a space might have been incorrect,
17780    # since paths with space are more likely in Windows. Give it another try with the whole
17781    # argument.
17782    path="$complete"
17783    arguments="EOL"
17784    new_path=`$CYGPATH -u "$path"`
17785    new_path=`$WHICH "$new_path" 2> /dev/null`
17786    # bat and cmd files are not always considered executable in cygwin causing which
17787    # to not find them
17788    if test "x$new_path" = x \
17789             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17790             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17791      new_path=`$CYGPATH -u "$path"`
17792    fi
17793    if test "x$new_path" = x; then
17794      # It's still not found. Now this is an unrecoverable error.
17795      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17796$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17797      has_space=`$ECHO "$complete" | $GREP " "`
17798      if test "x$has_space" != x; then
17799        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17800$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17801      fi
17802      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17803    fi
17804  fi
17805
17806  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17807  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17808  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17809  # "foo.exe" is OK but "foo" is an error.
17810  #
17811  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17812  # It is also a way to make sure we got the proper file name for the real test later on.
17813  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17814  if test "x$test_shortpath" = x; then
17815    # Short path failed, file does not exist as specified.
17816    # Try adding .exe or .cmd
17817    if test -f "${new_path}.exe"; then
17818       input_to_shortpath="${new_path}.exe"
17819    elif test -f "${new_path}.cmd"; then
17820       input_to_shortpath="${new_path}.cmd"
17821    else
17822      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
17823$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
17824      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17825$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17826      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17827    fi
17828  else
17829    input_to_shortpath="$new_path"
17830  fi
17831
17832  # Call helper function which possibly converts this using DOS-style short mode.
17833  # If so, the updated path is stored in $new_path.
17834  new_path="$input_to_shortpath"
17835
17836  input_path="$input_to_shortpath"
17837  # Check if we need to convert this using DOS-style short mode. If the path
17838  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17839  # take no chances and rewrite it.
17840  # Note: m4 eats our [], so we need to use [ and ] instead.
17841  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17842  if test "x$has_forbidden_chars" != x; then
17843    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17844    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17845    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17846    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17847      # Going to short mode and back again did indeed matter. Since short mode is
17848      # case insensitive, let's make it lowercase to improve readability.
17849      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17850      # Now convert it back to Unix-stile (cygpath)
17851      input_path=`$CYGPATH -u "$shortmode_path"`
17852      new_path="$input_path"
17853    fi
17854  fi
17855
17856  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17857  if test "x$test_cygdrive_prefix" = x; then
17858    # As a simple fix, exclude /usr/bin since it's not a real path.
17859    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17860      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17861      # a path prefixed by /cygdrive for fixpath to work.
17862      new_path="$CYGWIN_ROOT_PATH$input_path"
17863    fi
17864  fi
17865
17866  # remove trailing .exe if any
17867  new_path="${new_path/%.exe/}"
17868
17869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17870
17871  # First separate the path from the arguments. This will split at the first
17872  # space.
17873  complete="$BUILD_CC"
17874  path="${complete%% *}"
17875  tmp="$complete EOL"
17876  arguments="${tmp#* }"
17877
17878  # Input might be given as Windows format, start by converting to
17879  # unix format.
17880  new_path="$path"
17881
17882  windows_path="$new_path"
17883  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17884    unix_path=`$CYGPATH -u "$windows_path"`
17885    new_path="$unix_path"
17886  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17887    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17888    new_path="$unix_path"
17889  fi
17890
17891
17892  # Now try to locate executable using which
17893  new_path=`$WHICH "$new_path" 2> /dev/null`
17894
17895  if test "x$new_path" = x; then
17896    # Oops. Which didn't find the executable.
17897    # The splitting of arguments from the executable at a space might have been incorrect,
17898    # since paths with space are more likely in Windows. Give it another try with the whole
17899    # argument.
17900    path="$complete"
17901    arguments="EOL"
17902    new_path="$path"
17903
17904  windows_path="$new_path"
17905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17906    unix_path=`$CYGPATH -u "$windows_path"`
17907    new_path="$unix_path"
17908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17909    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17910    new_path="$unix_path"
17911  fi
17912
17913
17914    new_path=`$WHICH "$new_path" 2> /dev/null`
17915
17916    if test "x$new_path" = x; then
17917      # It's still not found. Now this is an unrecoverable error.
17918      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17919$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17920      has_space=`$ECHO "$complete" | $GREP " "`
17921      if test "x$has_space" != x; then
17922        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17923$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17924      fi
17925      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17926    fi
17927  fi
17928
17929  # Now new_path has a complete unix path to the binary
17930  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17931    # Keep paths in /bin as-is, but remove trailing .exe if any
17932    new_path="${new_path/%.exe/}"
17933    # Do not save /bin paths to all_fixpath_prefixes!
17934  else
17935    # Not in mixed or Windows style, start by that.
17936    new_path=`cmd //c echo $new_path`
17937
17938  input_path="$new_path"
17939  # Check if we need to convert this using DOS-style short mode. If the path
17940  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17941  # take no chances and rewrite it.
17942  # Note: m4 eats our [], so we need to use [ and ] instead.
17943  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17944  if test "x$has_forbidden_chars" != x; then
17945    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17946    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17947  fi
17948
17949    # Output is in $new_path
17950
17951  windows_path="$new_path"
17952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17953    unix_path=`$CYGPATH -u "$windows_path"`
17954    new_path="$unix_path"
17955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17956    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17957    new_path="$unix_path"
17958  fi
17959
17960    # remove trailing .exe if any
17961    new_path="${new_path/%.exe/}"
17962
17963    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17964    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17965  fi
17966
17967  else
17968    # We're on a posix platform. Hooray! :)
17969    # First separate the path from the arguments. This will split at the first
17970    # space.
17971    complete="$BUILD_CC"
17972    path="${complete%% *}"
17973    tmp="$complete EOL"
17974    arguments="${tmp#* }"
17975
17976    # Cannot rely on the command "which" here since it doesn't always work.
17977    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17978    if test -z "$is_absolute_path"; then
17979      # Path to executable is not absolute. Find it.
17980      IFS_save="$IFS"
17981      IFS=:
17982      for p in $PATH; do
17983        if test -f "$p/$path" && test -x "$p/$path"; then
17984          new_path="$p/$path"
17985          break
17986        fi
17987      done
17988      IFS="$IFS_save"
17989    else
17990      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
17991$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
17992      new_path="$path"
17993    fi
17994
17995    if test "x$new_path" = x; then
17996        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17997$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17998        has_space=`$ECHO "$complete" | $GREP " "`
17999        if test "x$has_space" != x; then
18000          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18001$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18002        fi
18003        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18004      fi
18005  fi
18006
18007      # Now join together the path and the arguments once again
18008      if test "x$arguments" != xEOL; then
18009        new_complete="$new_path ${arguments% *}"
18010      else
18011        new_complete="$new_path"
18012      fi
18013
18014  if test "x$complete" != "x$new_complete"; then
18015      BUILD_CC="$new_complete"
18016      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
18017$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
18018    fi
18019
18020    for ac_prog in cl CC g++
18021do
18022  # Extract the first word of "$ac_prog", so it can be a program name with args.
18023set dummy $ac_prog; ac_word=$2
18024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18025$as_echo_n "checking for $ac_word... " >&6; }
18026if ${ac_cv_path_BUILD_CXX+:} false; then :
18027  $as_echo_n "(cached) " >&6
18028else
18029  case $BUILD_CXX in
18030  [\\/]* | ?:[\\/]*)
18031  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
18032  ;;
18033  *)
18034  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18035for as_dir in $PATH
18036do
18037  IFS=$as_save_IFS
18038  test -z "$as_dir" && as_dir=.
18039    for ac_exec_ext in '' $ac_executable_extensions; do
18040  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18041    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
18042    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18043    break 2
18044  fi
18045done
18046  done
18047IFS=$as_save_IFS
18048
18049  ;;
18050esac
18051fi
18052BUILD_CXX=$ac_cv_path_BUILD_CXX
18053if test -n "$BUILD_CXX"; then
18054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
18055$as_echo "$BUILD_CXX" >&6; }
18056else
18057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18058$as_echo "no" >&6; }
18059fi
18060
18061
18062  test -n "$BUILD_CXX" && break
18063done
18064
18065
18066  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18067
18068  # First separate the path from the arguments. This will split at the first
18069  # space.
18070  complete="$BUILD_CXX"
18071  path="${complete%% *}"
18072  tmp="$complete EOL"
18073  arguments="${tmp#* }"
18074
18075  # Input might be given as Windows format, start by converting to
18076  # unix format.
18077  new_path=`$CYGPATH -u "$path"`
18078
18079  # Now try to locate executable using which
18080  new_path=`$WHICH "$new_path" 2> /dev/null`
18081  # bat and cmd files are not always considered executable in cygwin causing which
18082  # to not find them
18083  if test "x$new_path" = x \
18084           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18085           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18086    new_path=`$CYGPATH -u "$path"`
18087  fi
18088  if test "x$new_path" = x; then
18089    # Oops. Which didn't find the executable.
18090    # The splitting of arguments from the executable at a space might have been incorrect,
18091    # since paths with space are more likely in Windows. Give it another try with the whole
18092    # argument.
18093    path="$complete"
18094    arguments="EOL"
18095    new_path=`$CYGPATH -u "$path"`
18096    new_path=`$WHICH "$new_path" 2> /dev/null`
18097    # bat and cmd files are not always considered executable in cygwin causing which
18098    # to not find them
18099    if test "x$new_path" = x \
18100             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18101             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18102      new_path=`$CYGPATH -u "$path"`
18103    fi
18104    if test "x$new_path" = x; then
18105      # It's still not found. Now this is an unrecoverable error.
18106      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18107$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18108      has_space=`$ECHO "$complete" | $GREP " "`
18109      if test "x$has_space" != x; then
18110        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18111$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18112      fi
18113      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18114    fi
18115  fi
18116
18117  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18118  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18119  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18120  # "foo.exe" is OK but "foo" is an error.
18121  #
18122  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18123  # It is also a way to make sure we got the proper file name for the real test later on.
18124  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18125  if test "x$test_shortpath" = x; then
18126    # Short path failed, file does not exist as specified.
18127    # Try adding .exe or .cmd
18128    if test -f "${new_path}.exe"; then
18129       input_to_shortpath="${new_path}.exe"
18130    elif test -f "${new_path}.cmd"; then
18131       input_to_shortpath="${new_path}.cmd"
18132    else
18133      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
18134$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
18135      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18136$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18137      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18138    fi
18139  else
18140    input_to_shortpath="$new_path"
18141  fi
18142
18143  # Call helper function which possibly converts this using DOS-style short mode.
18144  # If so, the updated path is stored in $new_path.
18145  new_path="$input_to_shortpath"
18146
18147  input_path="$input_to_shortpath"
18148  # Check if we need to convert this using DOS-style short mode. If the path
18149  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18150  # take no chances and rewrite it.
18151  # Note: m4 eats our [], so we need to use [ and ] instead.
18152  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18153  if test "x$has_forbidden_chars" != x; then
18154    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18155    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18156    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18157    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18158      # Going to short mode and back again did indeed matter. Since short mode is
18159      # case insensitive, let's make it lowercase to improve readability.
18160      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18161      # Now convert it back to Unix-stile (cygpath)
18162      input_path=`$CYGPATH -u "$shortmode_path"`
18163      new_path="$input_path"
18164    fi
18165  fi
18166
18167  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18168  if test "x$test_cygdrive_prefix" = x; then
18169    # As a simple fix, exclude /usr/bin since it's not a real path.
18170    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18171      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18172      # a path prefixed by /cygdrive for fixpath to work.
18173      new_path="$CYGWIN_ROOT_PATH$input_path"
18174    fi
18175  fi
18176
18177  # remove trailing .exe if any
18178  new_path="${new_path/%.exe/}"
18179
18180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18181
18182  # First separate the path from the arguments. This will split at the first
18183  # space.
18184  complete="$BUILD_CXX"
18185  path="${complete%% *}"
18186  tmp="$complete EOL"
18187  arguments="${tmp#* }"
18188
18189  # Input might be given as Windows format, start by converting to
18190  # unix format.
18191  new_path="$path"
18192
18193  windows_path="$new_path"
18194  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18195    unix_path=`$CYGPATH -u "$windows_path"`
18196    new_path="$unix_path"
18197  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18198    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18199    new_path="$unix_path"
18200  fi
18201
18202
18203  # Now try to locate executable using which
18204  new_path=`$WHICH "$new_path" 2> /dev/null`
18205
18206  if test "x$new_path" = x; then
18207    # Oops. Which didn't find the executable.
18208    # The splitting of arguments from the executable at a space might have been incorrect,
18209    # since paths with space are more likely in Windows. Give it another try with the whole
18210    # argument.
18211    path="$complete"
18212    arguments="EOL"
18213    new_path="$path"
18214
18215  windows_path="$new_path"
18216  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18217    unix_path=`$CYGPATH -u "$windows_path"`
18218    new_path="$unix_path"
18219  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18220    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18221    new_path="$unix_path"
18222  fi
18223
18224
18225    new_path=`$WHICH "$new_path" 2> /dev/null`
18226
18227    if test "x$new_path" = x; then
18228      # It's still not found. Now this is an unrecoverable error.
18229      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18230$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18231      has_space=`$ECHO "$complete" | $GREP " "`
18232      if test "x$has_space" != x; then
18233        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18234$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18235      fi
18236      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18237    fi
18238  fi
18239
18240  # Now new_path has a complete unix path to the binary
18241  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18242    # Keep paths in /bin as-is, but remove trailing .exe if any
18243    new_path="${new_path/%.exe/}"
18244    # Do not save /bin paths to all_fixpath_prefixes!
18245  else
18246    # Not in mixed or Windows style, start by that.
18247    new_path=`cmd //c echo $new_path`
18248
18249  input_path="$new_path"
18250  # Check if we need to convert this using DOS-style short mode. If the path
18251  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18252  # take no chances and rewrite it.
18253  # Note: m4 eats our [], so we need to use [ and ] instead.
18254  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18255  if test "x$has_forbidden_chars" != x; then
18256    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18257    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18258  fi
18259
18260    # Output is in $new_path
18261
18262  windows_path="$new_path"
18263  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18264    unix_path=`$CYGPATH -u "$windows_path"`
18265    new_path="$unix_path"
18266  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18267    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18268    new_path="$unix_path"
18269  fi
18270
18271    # remove trailing .exe if any
18272    new_path="${new_path/%.exe/}"
18273
18274    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18275    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18276  fi
18277
18278  else
18279    # We're on a posix platform. Hooray! :)
18280    # First separate the path from the arguments. This will split at the first
18281    # space.
18282    complete="$BUILD_CXX"
18283    path="${complete%% *}"
18284    tmp="$complete EOL"
18285    arguments="${tmp#* }"
18286
18287    # Cannot rely on the command "which" here since it doesn't always work.
18288    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18289    if test -z "$is_absolute_path"; then
18290      # Path to executable is not absolute. Find it.
18291      IFS_save="$IFS"
18292      IFS=:
18293      for p in $PATH; do
18294        if test -f "$p/$path" && test -x "$p/$path"; then
18295          new_path="$p/$path"
18296          break
18297        fi
18298      done
18299      IFS="$IFS_save"
18300    else
18301      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18302$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18303      new_path="$path"
18304    fi
18305
18306    if test "x$new_path" = x; then
18307        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18308$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18309        has_space=`$ECHO "$complete" | $GREP " "`
18310        if test "x$has_space" != x; then
18311          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18312$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18313        fi
18314        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18315      fi
18316  fi
18317
18318      # Now join together the path and the arguments once again
18319      if test "x$arguments" != xEOL; then
18320        new_complete="$new_path ${arguments% *}"
18321      else
18322        new_complete="$new_path"
18323      fi
18324
18325  if test "x$complete" != "x$new_complete"; then
18326      BUILD_CXX="$new_complete"
18327      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18328$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18329    fi
18330
18331    # Extract the first word of "ld", so it can be a program name with args.
18332set dummy ld; ac_word=$2
18333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18334$as_echo_n "checking for $ac_word... " >&6; }
18335if ${ac_cv_path_BUILD_LD+:} false; then :
18336  $as_echo_n "(cached) " >&6
18337else
18338  case $BUILD_LD in
18339  [\\/]* | ?:[\\/]*)
18340  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18341  ;;
18342  *)
18343  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18344for as_dir in $PATH
18345do
18346  IFS=$as_save_IFS
18347  test -z "$as_dir" && as_dir=.
18348    for ac_exec_ext in '' $ac_executable_extensions; do
18349  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18350    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18351    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18352    break 2
18353  fi
18354done
18355  done
18356IFS=$as_save_IFS
18357
18358  ;;
18359esac
18360fi
18361BUILD_LD=$ac_cv_path_BUILD_LD
18362if test -n "$BUILD_LD"; then
18363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18364$as_echo "$BUILD_LD" >&6; }
18365else
18366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18367$as_echo "no" >&6; }
18368fi
18369
18370
18371
18372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18373
18374  # First separate the path from the arguments. This will split at the first
18375  # space.
18376  complete="$BUILD_LD"
18377  path="${complete%% *}"
18378  tmp="$complete EOL"
18379  arguments="${tmp#* }"
18380
18381  # Input might be given as Windows format, start by converting to
18382  # unix format.
18383  new_path=`$CYGPATH -u "$path"`
18384
18385  # Now try to locate executable using which
18386  new_path=`$WHICH "$new_path" 2> /dev/null`
18387  # bat and cmd files are not always considered executable in cygwin causing which
18388  # to not find them
18389  if test "x$new_path" = x \
18390           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18391           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18392    new_path=`$CYGPATH -u "$path"`
18393  fi
18394  if test "x$new_path" = x; then
18395    # Oops. Which didn't find the executable.
18396    # The splitting of arguments from the executable at a space might have been incorrect,
18397    # since paths with space are more likely in Windows. Give it another try with the whole
18398    # argument.
18399    path="$complete"
18400    arguments="EOL"
18401    new_path=`$CYGPATH -u "$path"`
18402    new_path=`$WHICH "$new_path" 2> /dev/null`
18403    # bat and cmd files are not always considered executable in cygwin causing which
18404    # to not find them
18405    if test "x$new_path" = x \
18406             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18407             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18408      new_path=`$CYGPATH -u "$path"`
18409    fi
18410    if test "x$new_path" = x; then
18411      # It's still not found. Now this is an unrecoverable error.
18412      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18413$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18414      has_space=`$ECHO "$complete" | $GREP " "`
18415      if test "x$has_space" != x; then
18416        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18417$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18418      fi
18419      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18420    fi
18421  fi
18422
18423  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18424  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18425  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18426  # "foo.exe" is OK but "foo" is an error.
18427  #
18428  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18429  # It is also a way to make sure we got the proper file name for the real test later on.
18430  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18431  if test "x$test_shortpath" = x; then
18432    # Short path failed, file does not exist as specified.
18433    # Try adding .exe or .cmd
18434    if test -f "${new_path}.exe"; then
18435       input_to_shortpath="${new_path}.exe"
18436    elif test -f "${new_path}.cmd"; then
18437       input_to_shortpath="${new_path}.cmd"
18438    else
18439      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18440$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18441      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18442$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18443      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18444    fi
18445  else
18446    input_to_shortpath="$new_path"
18447  fi
18448
18449  # Call helper function which possibly converts this using DOS-style short mode.
18450  # If so, the updated path is stored in $new_path.
18451  new_path="$input_to_shortpath"
18452
18453  input_path="$input_to_shortpath"
18454  # Check if we need to convert this using DOS-style short mode. If the path
18455  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18456  # take no chances and rewrite it.
18457  # Note: m4 eats our [], so we need to use [ and ] instead.
18458  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18459  if test "x$has_forbidden_chars" != x; then
18460    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18461    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18462    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18463    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18464      # Going to short mode and back again did indeed matter. Since short mode is
18465      # case insensitive, let's make it lowercase to improve readability.
18466      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18467      # Now convert it back to Unix-stile (cygpath)
18468      input_path=`$CYGPATH -u "$shortmode_path"`
18469      new_path="$input_path"
18470    fi
18471  fi
18472
18473  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18474  if test "x$test_cygdrive_prefix" = x; then
18475    # As a simple fix, exclude /usr/bin since it's not a real path.
18476    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18477      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18478      # a path prefixed by /cygdrive for fixpath to work.
18479      new_path="$CYGWIN_ROOT_PATH$input_path"
18480    fi
18481  fi
18482
18483  # remove trailing .exe if any
18484  new_path="${new_path/%.exe/}"
18485
18486  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18487
18488  # First separate the path from the arguments. This will split at the first
18489  # space.
18490  complete="$BUILD_LD"
18491  path="${complete%% *}"
18492  tmp="$complete EOL"
18493  arguments="${tmp#* }"
18494
18495  # Input might be given as Windows format, start by converting to
18496  # unix format.
18497  new_path="$path"
18498
18499  windows_path="$new_path"
18500  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18501    unix_path=`$CYGPATH -u "$windows_path"`
18502    new_path="$unix_path"
18503  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18504    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18505    new_path="$unix_path"
18506  fi
18507
18508
18509  # Now try to locate executable using which
18510  new_path=`$WHICH "$new_path" 2> /dev/null`
18511
18512  if test "x$new_path" = x; then
18513    # Oops. Which didn't find the executable.
18514    # The splitting of arguments from the executable at a space might have been incorrect,
18515    # since paths with space are more likely in Windows. Give it another try with the whole
18516    # argument.
18517    path="$complete"
18518    arguments="EOL"
18519    new_path="$path"
18520
18521  windows_path="$new_path"
18522  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18523    unix_path=`$CYGPATH -u "$windows_path"`
18524    new_path="$unix_path"
18525  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18526    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18527    new_path="$unix_path"
18528  fi
18529
18530
18531    new_path=`$WHICH "$new_path" 2> /dev/null`
18532
18533    if test "x$new_path" = x; then
18534      # It's still not found. Now this is an unrecoverable error.
18535      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18536$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18537      has_space=`$ECHO "$complete" | $GREP " "`
18538      if test "x$has_space" != x; then
18539        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18540$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18541      fi
18542      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18543    fi
18544  fi
18545
18546  # Now new_path has a complete unix path to the binary
18547  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18548    # Keep paths in /bin as-is, but remove trailing .exe if any
18549    new_path="${new_path/%.exe/}"
18550    # Do not save /bin paths to all_fixpath_prefixes!
18551  else
18552    # Not in mixed or Windows style, start by that.
18553    new_path=`cmd //c echo $new_path`
18554
18555  input_path="$new_path"
18556  # Check if we need to convert this using DOS-style short mode. If the path
18557  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18558  # take no chances and rewrite it.
18559  # Note: m4 eats our [], so we need to use [ and ] instead.
18560  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18561  if test "x$has_forbidden_chars" != x; then
18562    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18563    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18564  fi
18565
18566    # Output is in $new_path
18567
18568  windows_path="$new_path"
18569  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18570    unix_path=`$CYGPATH -u "$windows_path"`
18571    new_path="$unix_path"
18572  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18573    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18574    new_path="$unix_path"
18575  fi
18576
18577    # remove trailing .exe if any
18578    new_path="${new_path/%.exe/}"
18579
18580    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18581    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18582  fi
18583
18584  else
18585    # We're on a posix platform. Hooray! :)
18586    # First separate the path from the arguments. This will split at the first
18587    # space.
18588    complete="$BUILD_LD"
18589    path="${complete%% *}"
18590    tmp="$complete EOL"
18591    arguments="${tmp#* }"
18592
18593    # Cannot rely on the command "which" here since it doesn't always work.
18594    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18595    if test -z "$is_absolute_path"; then
18596      # Path to executable is not absolute. Find it.
18597      IFS_save="$IFS"
18598      IFS=:
18599      for p in $PATH; do
18600        if test -f "$p/$path" && test -x "$p/$path"; then
18601          new_path="$p/$path"
18602          break
18603        fi
18604      done
18605      IFS="$IFS_save"
18606    else
18607      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
18608$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
18609      new_path="$path"
18610    fi
18611
18612    if test "x$new_path" = x; then
18613        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18614$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18615        has_space=`$ECHO "$complete" | $GREP " "`
18616        if test "x$has_space" != x; then
18617          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18618$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18619        fi
18620        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18621      fi
18622  fi
18623
18624      # Now join together the path and the arguments once again
18625      if test "x$arguments" != xEOL; then
18626        new_complete="$new_path ${arguments% *}"
18627      else
18628        new_complete="$new_path"
18629      fi
18630
18631  if test "x$complete" != "x$new_complete"; then
18632      BUILD_LD="$new_complete"
18633      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
18634$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
18635    fi
18636
18637fi
18638
18639
18640
18641
18642# If a devkit is found on the builddeps server, then prepend its path to the
18643# PATH variable. If there are cross compilers available in the devkit, these
18644# will be found by AC_PROG_CC et al.
18645DEVKIT=
18646
18647
18648    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
18649        # Source the builddeps file again, to make sure it uses the latest variables!
18650        . $builddepsfile
18651        # Look for a target and build machine specific resource!
18652        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
18653        if test "x$resource" = x; then
18654            # Ok, lets instead look for a target specific resource
18655            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
18656        fi
18657        if test "x$resource" = x; then
18658            # Ok, lets instead look for a build specific resource
18659            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
18660        fi
18661        if test "x$resource" = x; then
18662            # Ok, lets instead look for a generic resource
18663            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
18664            resource=${builddep_devkit}
18665        fi
18666        if test "x$resource" != x; then
18667            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
18668$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
18669	    # If the resource in the builddeps.conf file is an existing directory,
18670	    # for example /java/linux/cups
18671	    if test -d ${resource}; then
18672	       depdir=${resource}
18673	    else
18674
18675# devkit is for example mymodule
18676# $resource is for example libs/general/libmymod_1_2_3.zip
18677# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
18678# $with_builddeps_dir is for example /localhome/builddeps
18679# depdir is the name of the variable into which we store the depdir, eg MYMOD
18680# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
18681# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
18682    filename=`basename $resource`
18683    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
18684    filebase=${filename%%.*}
18685    extension=${filename#*.}
18686    installdir=$with_builddeps_dir/$filebase
18687    if test ! -f $installdir/$filename.unpacked; then
18688        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
18689$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
18690        if test ! -d $installdir; then
18691            mkdir -p $installdir
18692        fi
18693        if test ! -d $installdir; then
18694            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
18695        fi
18696        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
18697        touch $tmpfile
18698        if test ! -f $tmpfile; then
18699            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
18700        fi
18701
18702    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
18703    # $tmpfile is the local file name for the downloaded file.
18704    VALID_TOOL=no
18705    if test "x$BDEPS_FTP" = xwget; then
18706       VALID_TOOL=yes
18707       wget -O $tmpfile $with_builddeps_server/$resource
18708    fi
18709    if test "x$BDEPS_FTP" = xlftp; then
18710       VALID_TOOL=yes
18711       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
18712    fi
18713    if test "x$BDEPS_FTP" = xftp; then
18714        VALID_TOOL=yes
18715        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
18716        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
18717        FTPUSERPWD=${FTPSERVER%%@*}
18718        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
18719            FTPUSER=${userpwd%%:*}
18720            FTPPWD=${userpwd#*@}
18721            FTPSERVER=${FTPSERVER#*@}
18722        else
18723            FTPUSER=ftp
18724            FTPPWD=ftp
18725        fi
18726        # the "pass" command does not work on some
18727        # ftp clients (read ftp.exe) but if it works,
18728        # passive mode is better!
18729        (\
18730            echo "user $FTPUSER $FTPPWD"        ;\
18731            echo "pass"                         ;\
18732            echo "bin"                          ;\
18733            echo "get $FTPPATH $tmpfile"              ;\
18734        ) | ftp -in $FTPSERVER
18735    fi
18736    if test "x$VALID_TOOL" != xyes; then
18737       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
18738    fi
18739
18740        mv $tmpfile $installdir/$filename
18741        if test ! -s $installdir/$filename; then
18742            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
18743        fi
18744        case "$extension" in
18745            zip)  echo "Unzipping $installdir/$filename..."
18746               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
18747            ;;
18748            tar.gz) echo "Untaring $installdir/$filename..."
18749               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18750            ;;
18751            tgz) echo "Untaring $installdir/$filename..."
18752               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18753            ;;
18754            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
18755            ;;
18756        esac
18757    fi
18758    if test -f $installdir/$filename.unpacked; then
18759        depdir=$installdir
18760    fi
18761
18762	    fi
18763            # Source the builddeps file again, because in the previous command, the depdir
18764            # was updated to point at the current build dependency install directory.
18765            . $builddepsfile
18766            # Now extract variables from the builddeps.conf files.
18767            theroot=${builddep_devkit_ROOT}
18768            thecflags=${builddep_devkit_CFLAGS}
18769            thelibs=${builddep_devkit_LIBS}
18770            if test "x$depdir" = x; then
18771                as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
18772            fi
18773            DEVKIT=$depdir
18774            if test "x$theroot" != x; then
18775               DEVKIT="$theroot"
18776            fi
18777            if test "x$thecflags" != x; then
18778               DEVKIT_CFLAGS="$thecflags"
18779            fi
18780            if test "x$thelibs" != x; then
18781               DEVKIT_LIBS="$thelibs"
18782            fi
18783            # Found devkit
18784                     PATH="$DEVKIT/bin:$PATH"
18785                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
18786                     if test "x$x_includes" = "xNONE"; then
18787                         x_includes="$SYS_ROOT/usr/include/X11"
18788                     fi
18789                     if test "x$x_libraries" = "xNONE"; then
18790                         x_libraries="$SYS_ROOT/usr/lib"
18791                     fi
18792
18793
18794        fi
18795
18796    fi
18797
18798
18799# Store the CFLAGS etal passed to the configure script.
18800ORG_CFLAGS="$CFLAGS"
18801ORG_CXXFLAGS="$CXXFLAGS"
18802ORG_OBJCFLAGS="$OBJCFLAGS"
18803
18804# autoconf magic only relies on PATH, so update it if tools dir is specified
18805OLD_PATH="$PATH"
18806if test "x$TOOLS_DIR" != x; then
18807  PATH=$TOOLS_DIR:$PATH
18808fi
18809
18810
18811### Locate C compiler (CC)
18812
18813# On windows, only cl.exe is supported.
18814# On Solaris, cc is preferred to gcc.
18815# Elsewhere, gcc is preferred to cc.
18816
18817if test "x$CC" != x; then
18818  COMPILER_CHECK_LIST="$CC"
18819elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18820  COMPILER_CHECK_LIST="cl"
18821elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
18822  COMPILER_CHECK_LIST="cc gcc"
18823else
18824  COMPILER_CHECK_LIST="gcc cc"
18825fi
18826
18827
18828  COMPILER_NAME=C
18829
18830  CC=
18831  # If TOOLS_DIR is set, check for all compiler names in there first
18832  # before checking the rest of the PATH.
18833  if test -n "$TOOLS_DIR"; then
18834    PATH_save="$PATH"
18835    PATH="$TOOLS_DIR"
18836    for ac_prog in $COMPILER_CHECK_LIST
18837do
18838  # Extract the first word of "$ac_prog", so it can be a program name with args.
18839set dummy $ac_prog; ac_word=$2
18840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18841$as_echo_n "checking for $ac_word... " >&6; }
18842if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
18843  $as_echo_n "(cached) " >&6
18844else
18845  case $TOOLS_DIR_CC in
18846  [\\/]* | ?:[\\/]*)
18847  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
18848  ;;
18849  *)
18850  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18851for as_dir in $PATH
18852do
18853  IFS=$as_save_IFS
18854  test -z "$as_dir" && as_dir=.
18855    for ac_exec_ext in '' $ac_executable_extensions; do
18856  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18857    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
18858    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18859    break 2
18860  fi
18861done
18862  done
18863IFS=$as_save_IFS
18864
18865  ;;
18866esac
18867fi
18868TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
18869if test -n "$TOOLS_DIR_CC"; then
18870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
18871$as_echo "$TOOLS_DIR_CC" >&6; }
18872else
18873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18874$as_echo "no" >&6; }
18875fi
18876
18877
18878  test -n "$TOOLS_DIR_CC" && break
18879done
18880
18881    CC=$TOOLS_DIR_CC
18882    PATH="$PATH_save"
18883  fi
18884
18885  # AC_PATH_PROGS can't be run multiple times with the same variable,
18886  # so create a new name for this run.
18887  if test "x$CC" = x; then
18888    for ac_prog in $COMPILER_CHECK_LIST
18889do
18890  # Extract the first word of "$ac_prog", so it can be a program name with args.
18891set dummy $ac_prog; ac_word=$2
18892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18893$as_echo_n "checking for $ac_word... " >&6; }
18894if ${ac_cv_path_POTENTIAL_CC+:} false; then :
18895  $as_echo_n "(cached) " >&6
18896else
18897  case $POTENTIAL_CC in
18898  [\\/]* | ?:[\\/]*)
18899  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
18900  ;;
18901  *)
18902  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18903for as_dir in $PATH
18904do
18905  IFS=$as_save_IFS
18906  test -z "$as_dir" && as_dir=.
18907    for ac_exec_ext in '' $ac_executable_extensions; do
18908  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18909    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
18910    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18911    break 2
18912  fi
18913done
18914  done
18915IFS=$as_save_IFS
18916
18917  ;;
18918esac
18919fi
18920POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
18921if test -n "$POTENTIAL_CC"; then
18922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
18923$as_echo "$POTENTIAL_CC" >&6; }
18924else
18925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18926$as_echo "no" >&6; }
18927fi
18928
18929
18930  test -n "$POTENTIAL_CC" && break
18931done
18932
18933    CC=$POTENTIAL_CC
18934  fi
18935
18936  if test "x$CC" = x; then
18937
18938    # Print a helpful message on how to acquire the necessary build dependency.
18939    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
18940    MISSING_DEPENDENCY=devkit
18941    PKGHANDLER_COMMAND=
18942
18943    case $PKGHANDLER in
18944	apt-get)
18945                apt_help     $MISSING_DEPENDENCY ;;
18946    yum)
18947                yum_help     $MISSING_DEPENDENCY ;;
18948	port)
18949                port_help    $MISSING_DEPENDENCY ;;
18950	pkgutil)
18951                pkgutil_help $MISSING_DEPENDENCY ;;
18952	pkgadd)
18953                pkgadd_help  $MISSING_DEPENDENCY ;;
18954    * )
18955      break ;;
18956    esac
18957
18958    if test "x$PKGHANDLER_COMMAND" != x; then
18959        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
18960    fi
18961
18962      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
18963  fi
18964
18965  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18966
18967  # First separate the path from the arguments. This will split at the first
18968  # space.
18969  complete="$CC"
18970  path="${complete%% *}"
18971  tmp="$complete EOL"
18972  arguments="${tmp#* }"
18973
18974  # Input might be given as Windows format, start by converting to
18975  # unix format.
18976  new_path=`$CYGPATH -u "$path"`
18977
18978  # Now try to locate executable using which
18979  new_path=`$WHICH "$new_path" 2> /dev/null`
18980  # bat and cmd files are not always considered executable in cygwin causing which
18981  # to not find them
18982  if test "x$new_path" = x \
18983           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18984           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18985    new_path=`$CYGPATH -u "$path"`
18986  fi
18987  if test "x$new_path" = x; then
18988    # Oops. Which didn't find the executable.
18989    # The splitting of arguments from the executable at a space might have been incorrect,
18990    # since paths with space are more likely in Windows. Give it another try with the whole
18991    # argument.
18992    path="$complete"
18993    arguments="EOL"
18994    new_path=`$CYGPATH -u "$path"`
18995    new_path=`$WHICH "$new_path" 2> /dev/null`
18996    # bat and cmd files are not always considered executable in cygwin causing which
18997    # to not find them
18998    if test "x$new_path" = x \
18999             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19000             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19001      new_path=`$CYGPATH -u "$path"`
19002    fi
19003    if test "x$new_path" = x; then
19004      # It's still not found. Now this is an unrecoverable error.
19005      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19006$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19007      has_space=`$ECHO "$complete" | $GREP " "`
19008      if test "x$has_space" != x; then
19009        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19010$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19011      fi
19012      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19013    fi
19014  fi
19015
19016  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19017  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19018  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19019  # "foo.exe" is OK but "foo" is an error.
19020  #
19021  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19022  # It is also a way to make sure we got the proper file name for the real test later on.
19023  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19024  if test "x$test_shortpath" = x; then
19025    # Short path failed, file does not exist as specified.
19026    # Try adding .exe or .cmd
19027    if test -f "${new_path}.exe"; then
19028       input_to_shortpath="${new_path}.exe"
19029    elif test -f "${new_path}.cmd"; then
19030       input_to_shortpath="${new_path}.cmd"
19031    else
19032      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
19033$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
19034      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19035$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19036      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19037    fi
19038  else
19039    input_to_shortpath="$new_path"
19040  fi
19041
19042  # Call helper function which possibly converts this using DOS-style short mode.
19043  # If so, the updated path is stored in $new_path.
19044  new_path="$input_to_shortpath"
19045
19046  input_path="$input_to_shortpath"
19047  # Check if we need to convert this using DOS-style short mode. If the path
19048  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19049  # take no chances and rewrite it.
19050  # Note: m4 eats our [], so we need to use [ and ] instead.
19051  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19052  if test "x$has_forbidden_chars" != x; then
19053    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19054    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19055    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19056    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19057      # Going to short mode and back again did indeed matter. Since short mode is
19058      # case insensitive, let's make it lowercase to improve readability.
19059      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19060      # Now convert it back to Unix-stile (cygpath)
19061      input_path=`$CYGPATH -u "$shortmode_path"`
19062      new_path="$input_path"
19063    fi
19064  fi
19065
19066  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19067  if test "x$test_cygdrive_prefix" = x; then
19068    # As a simple fix, exclude /usr/bin since it's not a real path.
19069    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19070      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19071      # a path prefixed by /cygdrive for fixpath to work.
19072      new_path="$CYGWIN_ROOT_PATH$input_path"
19073    fi
19074  fi
19075
19076  # remove trailing .exe if any
19077  new_path="${new_path/%.exe/}"
19078
19079  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19080
19081  # First separate the path from the arguments. This will split at the first
19082  # space.
19083  complete="$CC"
19084  path="${complete%% *}"
19085  tmp="$complete EOL"
19086  arguments="${tmp#* }"
19087
19088  # Input might be given as Windows format, start by converting to
19089  # unix format.
19090  new_path="$path"
19091
19092  windows_path="$new_path"
19093  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19094    unix_path=`$CYGPATH -u "$windows_path"`
19095    new_path="$unix_path"
19096  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19097    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19098    new_path="$unix_path"
19099  fi
19100
19101
19102  # Now try to locate executable using which
19103  new_path=`$WHICH "$new_path" 2> /dev/null`
19104
19105  if test "x$new_path" = x; then
19106    # Oops. Which didn't find the executable.
19107    # The splitting of arguments from the executable at a space might have been incorrect,
19108    # since paths with space are more likely in Windows. Give it another try with the whole
19109    # argument.
19110    path="$complete"
19111    arguments="EOL"
19112    new_path="$path"
19113
19114  windows_path="$new_path"
19115  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19116    unix_path=`$CYGPATH -u "$windows_path"`
19117    new_path="$unix_path"
19118  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19119    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19120    new_path="$unix_path"
19121  fi
19122
19123
19124    new_path=`$WHICH "$new_path" 2> /dev/null`
19125
19126    if test "x$new_path" = x; then
19127      # It's still not found. Now this is an unrecoverable error.
19128      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19129$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19130      has_space=`$ECHO "$complete" | $GREP " "`
19131      if test "x$has_space" != x; then
19132        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19133$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19134      fi
19135      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19136    fi
19137  fi
19138
19139  # Now new_path has a complete unix path to the binary
19140  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19141    # Keep paths in /bin as-is, but remove trailing .exe if any
19142    new_path="${new_path/%.exe/}"
19143    # Do not save /bin paths to all_fixpath_prefixes!
19144  else
19145    # Not in mixed or Windows style, start by that.
19146    new_path=`cmd //c echo $new_path`
19147
19148  input_path="$new_path"
19149  # Check if we need to convert this using DOS-style short mode. If the path
19150  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19151  # take no chances and rewrite it.
19152  # Note: m4 eats our [], so we need to use [ and ] instead.
19153  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19154  if test "x$has_forbidden_chars" != x; then
19155    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19156    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19157  fi
19158
19159    # Output is in $new_path
19160
19161  windows_path="$new_path"
19162  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19163    unix_path=`$CYGPATH -u "$windows_path"`
19164    new_path="$unix_path"
19165  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19166    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19167    new_path="$unix_path"
19168  fi
19169
19170    # remove trailing .exe if any
19171    new_path="${new_path/%.exe/}"
19172
19173    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19174    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19175  fi
19176
19177  else
19178    # We're on a posix platform. Hooray! :)
19179    # First separate the path from the arguments. This will split at the first
19180    # space.
19181    complete="$CC"
19182    path="${complete%% *}"
19183    tmp="$complete EOL"
19184    arguments="${tmp#* }"
19185
19186    # Cannot rely on the command "which" here since it doesn't always work.
19187    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19188    if test -z "$is_absolute_path"; then
19189      # Path to executable is not absolute. Find it.
19190      IFS_save="$IFS"
19191      IFS=:
19192      for p in $PATH; do
19193        if test -f "$p/$path" && test -x "$p/$path"; then
19194          new_path="$p/$path"
19195          break
19196        fi
19197      done
19198      IFS="$IFS_save"
19199    else
19200      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
19201$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
19202      new_path="$path"
19203    fi
19204
19205    if test "x$new_path" = x; then
19206        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19207$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19208        has_space=`$ECHO "$complete" | $GREP " "`
19209        if test "x$has_space" != x; then
19210          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19211$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19212        fi
19213        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19214      fi
19215  fi
19216
19217      # Now join together the path and the arguments once again
19218      if test "x$arguments" != xEOL; then
19219        new_complete="$new_path ${arguments% *}"
19220      else
19221        new_complete="$new_path"
19222      fi
19223
19224  if test "x$complete" != "x$new_complete"; then
19225      CC="$new_complete"
19226      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
19227$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
19228    fi
19229
19230  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
19231$as_echo_n "checking resolved symbolic links for CC... " >&6; }
19232  TEST_COMPILER="$CC"
19233
19234    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19235        # Follow a chain of symbolic links. Use readlink
19236        # where it exists, else fall back to horribly
19237        # complicated shell code.
19238        if test "x$READLINK_TESTED" != yes; then
19239            # On MacOSX there is a readlink tool with a different
19240            # purpose than the GNU readlink tool. Check the found readlink.
19241            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19242            if test "x$ISGNU" = x; then
19243                 # A readlink that we do not know how to use.
19244                 # Are there other non-GNU readlinks out there?
19245                 READLINK_TESTED=yes
19246                 READLINK=
19247            fi
19248        fi
19249
19250        if test "x$READLINK" != x; then
19251            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19252        else
19253            # Save the current directory for restoring afterwards
19254            STARTDIR=$PWD
19255            COUNTER=0
19256            sym_link_dir=`$DIRNAME $TEST_COMPILER`
19257            sym_link_file=`$BASENAME $TEST_COMPILER`
19258            cd $sym_link_dir
19259            # Use -P flag to resolve symlinks in directories.
19260            cd `$THEPWDCMD -P`
19261            sym_link_dir=`$THEPWDCMD -P`
19262            # Resolve file symlinks
19263            while test $COUNTER -lt 20; do
19264                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19265                if test "x$ISLINK" == x; then
19266                    # This is not a symbolic link! We are done!
19267                    break
19268                fi
19269                # Again resolve directory symlinks since the target of the just found
19270                # link could be in a different directory
19271                cd `$DIRNAME $ISLINK`
19272                sym_link_dir=`$THEPWDCMD -P`
19273                sym_link_file=`$BASENAME $ISLINK`
19274                let COUNTER=COUNTER+1
19275            done
19276            cd $STARTDIR
19277            TEST_COMPILER=$sym_link_dir/$sym_link_file
19278        fi
19279    fi
19280
19281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19282$as_echo "$TEST_COMPILER" >&6; }
19283  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19284$as_echo_n "checking if CC is disguised ccache... " >&6; }
19285
19286  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19287  if test "x$COMPILER_BASENAME" = "xccache"; then
19288    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19289$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19290    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19291    # We want to control ccache invocation ourselves, so ignore this cc and try
19292    # searching again.
19293
19294    # Remove the path to the fake ccache cc from the PATH
19295    RETRY_COMPILER_SAVED_PATH="$PATH"
19296    COMPILER_DIRNAME=`$DIRNAME $CC`
19297    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19298
19299    # Try again looking for our compiler
19300    if test -n "$ac_tool_prefix"; then
19301  for ac_prog in $COMPILER_CHECK_LIST
19302  do
19303    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19304set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19306$as_echo_n "checking for $ac_word... " >&6; }
19307if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
19308  $as_echo_n "(cached) " >&6
19309else
19310  if test -n "$PROPER_COMPILER_CC"; then
19311  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19312else
19313as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19314for as_dir in $PATH
19315do
19316  IFS=$as_save_IFS
19317  test -z "$as_dir" && as_dir=.
19318    for ac_exec_ext in '' $ac_executable_extensions; do
19319  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19320    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19321    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19322    break 2
19323  fi
19324done
19325  done
19326IFS=$as_save_IFS
19327
19328fi
19329fi
19330PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19331if test -n "$PROPER_COMPILER_CC"; then
19332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19333$as_echo "$PROPER_COMPILER_CC" >&6; }
19334else
19335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19336$as_echo "no" >&6; }
19337fi
19338
19339
19340    test -n "$PROPER_COMPILER_CC" && break
19341  done
19342fi
19343if test -z "$PROPER_COMPILER_CC"; then
19344  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19345  for ac_prog in $COMPILER_CHECK_LIST
19346do
19347  # Extract the first word of "$ac_prog", so it can be a program name with args.
19348set dummy $ac_prog; ac_word=$2
19349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19350$as_echo_n "checking for $ac_word... " >&6; }
19351if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
19352  $as_echo_n "(cached) " >&6
19353else
19354  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19355  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19356else
19357as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19358for as_dir in $PATH
19359do
19360  IFS=$as_save_IFS
19361  test -z "$as_dir" && as_dir=.
19362    for ac_exec_ext in '' $ac_executable_extensions; do
19363  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19364    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19365    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19366    break 2
19367  fi
19368done
19369  done
19370IFS=$as_save_IFS
19371
19372fi
19373fi
19374ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19375if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19377$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19378else
19379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19380$as_echo "no" >&6; }
19381fi
19382
19383
19384  test -n "$ac_ct_PROPER_COMPILER_CC" && break
19385done
19386
19387  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19388    PROPER_COMPILER_CC=""
19389  else
19390    case $cross_compiling:$ac_tool_warned in
19391yes:)
19392{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19393$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19394ac_tool_warned=yes ;;
19395esac
19396    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19397  fi
19398fi
19399
19400
19401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19402
19403  # First separate the path from the arguments. This will split at the first
19404  # space.
19405  complete="$PROPER_COMPILER_CC"
19406  path="${complete%% *}"
19407  tmp="$complete EOL"
19408  arguments="${tmp#* }"
19409
19410  # Input might be given as Windows format, start by converting to
19411  # unix format.
19412  new_path=`$CYGPATH -u "$path"`
19413
19414  # Now try to locate executable using which
19415  new_path=`$WHICH "$new_path" 2> /dev/null`
19416  # bat and cmd files are not always considered executable in cygwin causing which
19417  # to not find them
19418  if test "x$new_path" = x \
19419           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19420           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19421    new_path=`$CYGPATH -u "$path"`
19422  fi
19423  if test "x$new_path" = x; then
19424    # Oops. Which didn't find the executable.
19425    # The splitting of arguments from the executable at a space might have been incorrect,
19426    # since paths with space are more likely in Windows. Give it another try with the whole
19427    # argument.
19428    path="$complete"
19429    arguments="EOL"
19430    new_path=`$CYGPATH -u "$path"`
19431    new_path=`$WHICH "$new_path" 2> /dev/null`
19432    # bat and cmd files are not always considered executable in cygwin causing which
19433    # to not find them
19434    if test "x$new_path" = x \
19435             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19436             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19437      new_path=`$CYGPATH -u "$path"`
19438    fi
19439    if test "x$new_path" = x; then
19440      # It's still not found. Now this is an unrecoverable error.
19441      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19442$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19443      has_space=`$ECHO "$complete" | $GREP " "`
19444      if test "x$has_space" != x; then
19445        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19446$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19447      fi
19448      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19449    fi
19450  fi
19451
19452  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19453  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19454  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19455  # "foo.exe" is OK but "foo" is an error.
19456  #
19457  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19458  # It is also a way to make sure we got the proper file name for the real test later on.
19459  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19460  if test "x$test_shortpath" = x; then
19461    # Short path failed, file does not exist as specified.
19462    # Try adding .exe or .cmd
19463    if test -f "${new_path}.exe"; then
19464       input_to_shortpath="${new_path}.exe"
19465    elif test -f "${new_path}.cmd"; then
19466       input_to_shortpath="${new_path}.cmd"
19467    else
19468      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
19469$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
19470      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19471$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19472      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19473    fi
19474  else
19475    input_to_shortpath="$new_path"
19476  fi
19477
19478  # Call helper function which possibly converts this using DOS-style short mode.
19479  # If so, the updated path is stored in $new_path.
19480  new_path="$input_to_shortpath"
19481
19482  input_path="$input_to_shortpath"
19483  # Check if we need to convert this using DOS-style short mode. If the path
19484  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19485  # take no chances and rewrite it.
19486  # Note: m4 eats our [], so we need to use [ and ] instead.
19487  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19488  if test "x$has_forbidden_chars" != x; then
19489    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19490    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19491    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19492    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19493      # Going to short mode and back again did indeed matter. Since short mode is
19494      # case insensitive, let's make it lowercase to improve readability.
19495      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19496      # Now convert it back to Unix-stile (cygpath)
19497      input_path=`$CYGPATH -u "$shortmode_path"`
19498      new_path="$input_path"
19499    fi
19500  fi
19501
19502  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19503  if test "x$test_cygdrive_prefix" = x; then
19504    # As a simple fix, exclude /usr/bin since it's not a real path.
19505    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19506      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19507      # a path prefixed by /cygdrive for fixpath to work.
19508      new_path="$CYGWIN_ROOT_PATH$input_path"
19509    fi
19510  fi
19511
19512  # remove trailing .exe if any
19513  new_path="${new_path/%.exe/}"
19514
19515  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19516
19517  # First separate the path from the arguments. This will split at the first
19518  # space.
19519  complete="$PROPER_COMPILER_CC"
19520  path="${complete%% *}"
19521  tmp="$complete EOL"
19522  arguments="${tmp#* }"
19523
19524  # Input might be given as Windows format, start by converting to
19525  # unix format.
19526  new_path="$path"
19527
19528  windows_path="$new_path"
19529  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19530    unix_path=`$CYGPATH -u "$windows_path"`
19531    new_path="$unix_path"
19532  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19533    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19534    new_path="$unix_path"
19535  fi
19536
19537
19538  # Now try to locate executable using which
19539  new_path=`$WHICH "$new_path" 2> /dev/null`
19540
19541  if test "x$new_path" = x; then
19542    # Oops. Which didn't find the executable.
19543    # The splitting of arguments from the executable at a space might have been incorrect,
19544    # since paths with space are more likely in Windows. Give it another try with the whole
19545    # argument.
19546    path="$complete"
19547    arguments="EOL"
19548    new_path="$path"
19549
19550  windows_path="$new_path"
19551  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19552    unix_path=`$CYGPATH -u "$windows_path"`
19553    new_path="$unix_path"
19554  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19555    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19556    new_path="$unix_path"
19557  fi
19558
19559
19560    new_path=`$WHICH "$new_path" 2> /dev/null`
19561
19562    if test "x$new_path" = x; then
19563      # It's still not found. Now this is an unrecoverable error.
19564      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19565$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19566      has_space=`$ECHO "$complete" | $GREP " "`
19567      if test "x$has_space" != x; then
19568        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19569$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19570      fi
19571      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19572    fi
19573  fi
19574
19575  # Now new_path has a complete unix path to the binary
19576  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19577    # Keep paths in /bin as-is, but remove trailing .exe if any
19578    new_path="${new_path/%.exe/}"
19579    # Do not save /bin paths to all_fixpath_prefixes!
19580  else
19581    # Not in mixed or Windows style, start by that.
19582    new_path=`cmd //c echo $new_path`
19583
19584  input_path="$new_path"
19585  # Check if we need to convert this using DOS-style short mode. If the path
19586  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19587  # take no chances and rewrite it.
19588  # Note: m4 eats our [], so we need to use [ and ] instead.
19589  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19590  if test "x$has_forbidden_chars" != x; then
19591    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19592    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19593  fi
19594
19595    # Output is in $new_path
19596
19597  windows_path="$new_path"
19598  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19599    unix_path=`$CYGPATH -u "$windows_path"`
19600    new_path="$unix_path"
19601  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19602    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19603    new_path="$unix_path"
19604  fi
19605
19606    # remove trailing .exe if any
19607    new_path="${new_path/%.exe/}"
19608
19609    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19610    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19611  fi
19612
19613  else
19614    # We're on a posix platform. Hooray! :)
19615    # First separate the path from the arguments. This will split at the first
19616    # space.
19617    complete="$PROPER_COMPILER_CC"
19618    path="${complete%% *}"
19619    tmp="$complete EOL"
19620    arguments="${tmp#* }"
19621
19622    # Cannot rely on the command "which" here since it doesn't always work.
19623    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19624    if test -z "$is_absolute_path"; then
19625      # Path to executable is not absolute. Find it.
19626      IFS_save="$IFS"
19627      IFS=:
19628      for p in $PATH; do
19629        if test -f "$p/$path" && test -x "$p/$path"; then
19630          new_path="$p/$path"
19631          break
19632        fi
19633      done
19634      IFS="$IFS_save"
19635    else
19636      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
19637$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
19638      new_path="$path"
19639    fi
19640
19641    if test "x$new_path" = x; then
19642        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19643$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19644        has_space=`$ECHO "$complete" | $GREP " "`
19645        if test "x$has_space" != x; then
19646          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19647$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19648        fi
19649        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19650      fi
19651  fi
19652
19653      # Now join together the path and the arguments once again
19654      if test "x$arguments" != xEOL; then
19655        new_complete="$new_path ${arguments% *}"
19656      else
19657        new_complete="$new_path"
19658      fi
19659
19660  if test "x$complete" != "x$new_complete"; then
19661      PROPER_COMPILER_CC="$new_complete"
19662      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
19663$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
19664    fi
19665
19666    PATH="$RETRY_COMPILER_SAVED_PATH"
19667
19668    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
19669$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
19670
19671    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19672        # Follow a chain of symbolic links. Use readlink
19673        # where it exists, else fall back to horribly
19674        # complicated shell code.
19675        if test "x$READLINK_TESTED" != yes; then
19676            # On MacOSX there is a readlink tool with a different
19677            # purpose than the GNU readlink tool. Check the found readlink.
19678            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19679            if test "x$ISGNU" = x; then
19680                 # A readlink that we do not know how to use.
19681                 # Are there other non-GNU readlinks out there?
19682                 READLINK_TESTED=yes
19683                 READLINK=
19684            fi
19685        fi
19686
19687        if test "x$READLINK" != x; then
19688            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
19689        else
19690            # Save the current directory for restoring afterwards
19691            STARTDIR=$PWD
19692            COUNTER=0
19693            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
19694            sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
19695            cd $sym_link_dir
19696            # Use -P flag to resolve symlinks in directories.
19697            cd `$THEPWDCMD -P`
19698            sym_link_dir=`$THEPWDCMD -P`
19699            # Resolve file symlinks
19700            while test $COUNTER -lt 20; do
19701                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19702                if test "x$ISLINK" == x; then
19703                    # This is not a symbolic link! We are done!
19704                    break
19705                fi
19706                # Again resolve directory symlinks since the target of the just found
19707                # link could be in a different directory
19708                cd `$DIRNAME $ISLINK`
19709                sym_link_dir=`$THEPWDCMD -P`
19710                sym_link_file=`$BASENAME $ISLINK`
19711                let COUNTER=COUNTER+1
19712            done
19713            cd $STARTDIR
19714            PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
19715        fi
19716    fi
19717
19718    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19719$as_echo "$PROPER_COMPILER_CC" >&6; }
19720    CC="$PROPER_COMPILER_CC"
19721  else
19722    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
19723$as_echo "no, keeping CC" >&6; }
19724    CC="$TEST_COMPILER"
19725  fi
19726
19727  COMPILER=$CC
19728  COMPILER_NAME=$COMPILER_NAME
19729
19730  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
19731    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
19732    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
19733    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
19734    if test $? -ne 0; then
19735      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19736
19737      { $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
19738$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
19739      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
19740$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
19741      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19742    else
19743      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
19744      COMPILER_VENDOR="Sun Studio"
19745    fi
19746  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
19747    # First line typically looks something like:
19748    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
19749    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
19750    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
19751    COMPILER_VENDOR="Microsoft CL.EXE"
19752    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
19753    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
19754      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
19755        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
19756      fi
19757    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
19758      if test "x$COMPILER_CPU_TEST" != "xx64"; then
19759        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
19760      fi
19761    fi
19762  else
19763    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19764    # Check that this is likely to be GCC.
19765    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
19766    if test $? -ne 0; then
19767      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
19768$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
19769      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
19770$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
19771      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19772    fi
19773
19774    # First line typically looks something like:
19775    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
19776    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
19777    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
19778  fi
19779  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
19780  CC_VERSION="$COMPILER_VERSION"
19781  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
19782  CC_VENDOR="$COMPILER_VENDOR"
19783
19784  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
19785$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
19786
19787
19788# Now that we have resolved CC ourself, let autoconf have its go at it
19789ac_ext=c
19790ac_cpp='$CPP $CPPFLAGS'
19791ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19792ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19793ac_compiler_gnu=$ac_cv_c_compiler_gnu
19794if test -n "$ac_tool_prefix"; then
19795  for ac_prog in $CC
19796  do
19797    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19798set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19800$as_echo_n "checking for $ac_word... " >&6; }
19801if ${ac_cv_prog_CC+:} false; then :
19802  $as_echo_n "(cached) " >&6
19803else
19804  if test -n "$CC"; then
19805  ac_cv_prog_CC="$CC" # Let the user override the test.
19806else
19807as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19808for as_dir in $PATH
19809do
19810  IFS=$as_save_IFS
19811  test -z "$as_dir" && as_dir=.
19812    for ac_exec_ext in '' $ac_executable_extensions; do
19813  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19814    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
19815    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19816    break 2
19817  fi
19818done
19819  done
19820IFS=$as_save_IFS
19821
19822fi
19823fi
19824CC=$ac_cv_prog_CC
19825if test -n "$CC"; then
19826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
19827$as_echo "$CC" >&6; }
19828else
19829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19830$as_echo "no" >&6; }
19831fi
19832
19833
19834    test -n "$CC" && break
19835  done
19836fi
19837if test -z "$CC"; then
19838  ac_ct_CC=$CC
19839  for ac_prog in $CC
19840do
19841  # Extract the first word of "$ac_prog", so it can be a program name with args.
19842set dummy $ac_prog; ac_word=$2
19843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19844$as_echo_n "checking for $ac_word... " >&6; }
19845if ${ac_cv_prog_ac_ct_CC+:} false; then :
19846  $as_echo_n "(cached) " >&6
19847else
19848  if test -n "$ac_ct_CC"; then
19849  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
19850else
19851as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19852for as_dir in $PATH
19853do
19854  IFS=$as_save_IFS
19855  test -z "$as_dir" && as_dir=.
19856    for ac_exec_ext in '' $ac_executable_extensions; do
19857  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19858    ac_cv_prog_ac_ct_CC="$ac_prog"
19859    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19860    break 2
19861  fi
19862done
19863  done
19864IFS=$as_save_IFS
19865
19866fi
19867fi
19868ac_ct_CC=$ac_cv_prog_ac_ct_CC
19869if test -n "$ac_ct_CC"; then
19870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
19871$as_echo "$ac_ct_CC" >&6; }
19872else
19873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19874$as_echo "no" >&6; }
19875fi
19876
19877
19878  test -n "$ac_ct_CC" && break
19879done
19880
19881  if test "x$ac_ct_CC" = x; then
19882    CC=""
19883  else
19884    case $cross_compiling:$ac_tool_warned in
19885yes:)
19886{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19887$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19888ac_tool_warned=yes ;;
19889esac
19890    CC=$ac_ct_CC
19891  fi
19892fi
19893
19894
19895test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19896$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19897as_fn_error $? "no acceptable C compiler found in \$PATH
19898See \`config.log' for more details" "$LINENO" 5; }
19899
19900# Provide some information about the compiler.
19901$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
19902set X $ac_compile
19903ac_compiler=$2
19904for ac_option in --version -v -V -qversion; do
19905  { { ac_try="$ac_compiler $ac_option >&5"
19906case "(($ac_try" in
19907  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19908  *) ac_try_echo=$ac_try;;
19909esac
19910eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19911$as_echo "$ac_try_echo"; } >&5
19912  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
19913  ac_status=$?
19914  if test -s conftest.err; then
19915    sed '10a\
19916... rest of stderr output deleted ...
19917         10q' conftest.err >conftest.er1
19918    cat conftest.er1 >&5
19919  fi
19920  rm -f conftest.er1 conftest.err
19921  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19922  test $ac_status = 0; }
19923done
19924
19925cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19926/* end confdefs.h.  */
19927
19928int
19929main ()
19930{
19931
19932  ;
19933  return 0;
19934}
19935_ACEOF
19936ac_clean_files_save=$ac_clean_files
19937ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
19938# Try to create an executable without -o first, disregard a.out.
19939# It will help us diagnose broken compilers, and finding out an intuition
19940# of exeext.
19941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
19942$as_echo_n "checking whether the C compiler works... " >&6; }
19943ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
19944
19945# The possible output files:
19946ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
19947
19948ac_rmfiles=
19949for ac_file in $ac_files
19950do
19951  case $ac_file in
19952    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19953    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
19954  esac
19955done
19956rm -f $ac_rmfiles
19957
19958if { { ac_try="$ac_link_default"
19959case "(($ac_try" in
19960  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19961  *) ac_try_echo=$ac_try;;
19962esac
19963eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19964$as_echo "$ac_try_echo"; } >&5
19965  (eval "$ac_link_default") 2>&5
19966  ac_status=$?
19967  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19968  test $ac_status = 0; }; then :
19969  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
19970# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
19971# in a Makefile.  We should not override ac_cv_exeext if it was cached,
19972# so that the user can short-circuit this test for compilers unknown to
19973# Autoconf.
19974for ac_file in $ac_files ''
19975do
19976  test -f "$ac_file" || continue
19977  case $ac_file in
19978    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
19979	;;
19980    [ab].out )
19981	# We found the default executable, but exeext='' is most
19982	# certainly right.
19983	break;;
19984    *.* )
19985	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
19986	then :; else
19987	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19988	fi
19989	# We set ac_cv_exeext here because the later test for it is not
19990	# safe: cross compilers may not add the suffix if given an `-o'
19991	# argument, so we may need to know it at that point already.
19992	# Even if this section looks crufty: it has the advantage of
19993	# actually working.
19994	break;;
19995    * )
19996	break;;
19997  esac
19998done
19999test "$ac_cv_exeext" = no && ac_cv_exeext=
20000
20001else
20002  ac_file=''
20003fi
20004if test -z "$ac_file"; then :
20005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20006$as_echo "no" >&6; }
20007$as_echo "$as_me: failed program was:" >&5
20008sed 's/^/| /' conftest.$ac_ext >&5
20009
20010{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20011$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20012as_fn_error 77 "C compiler cannot create executables
20013See \`config.log' for more details" "$LINENO" 5; }
20014else
20015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20016$as_echo "yes" >&6; }
20017fi
20018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
20019$as_echo_n "checking for C compiler default output file name... " >&6; }
20020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
20021$as_echo "$ac_file" >&6; }
20022ac_exeext=$ac_cv_exeext
20023
20024rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
20025ac_clean_files=$ac_clean_files_save
20026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
20027$as_echo_n "checking for suffix of executables... " >&6; }
20028if { { ac_try="$ac_link"
20029case "(($ac_try" in
20030  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20031  *) ac_try_echo=$ac_try;;
20032esac
20033eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20034$as_echo "$ac_try_echo"; } >&5
20035  (eval "$ac_link") 2>&5
20036  ac_status=$?
20037  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20038  test $ac_status = 0; }; then :
20039  # If both `conftest.exe' and `conftest' are `present' (well, observable)
20040# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
20041# work properly (i.e., refer to `conftest.exe'), while it won't with
20042# `rm'.
20043for ac_file in conftest.exe conftest conftest.*; do
20044  test -f "$ac_file" || continue
20045  case $ac_file in
20046    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20047    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20048	  break;;
20049    * ) break;;
20050  esac
20051done
20052else
20053  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20054$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20055as_fn_error $? "cannot compute suffix of executables: cannot compile and link
20056See \`config.log' for more details" "$LINENO" 5; }
20057fi
20058rm -f conftest conftest$ac_cv_exeext
20059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
20060$as_echo "$ac_cv_exeext" >&6; }
20061
20062rm -f conftest.$ac_ext
20063EXEEXT=$ac_cv_exeext
20064ac_exeext=$EXEEXT
20065cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20066/* end confdefs.h.  */
20067#include <stdio.h>
20068int
20069main ()
20070{
20071FILE *f = fopen ("conftest.out", "w");
20072 return ferror (f) || fclose (f) != 0;
20073
20074  ;
20075  return 0;
20076}
20077_ACEOF
20078ac_clean_files="$ac_clean_files conftest.out"
20079# Check that the compiler produces executables we can run.  If not, either
20080# the compiler is broken, or we cross compile.
20081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
20082$as_echo_n "checking whether we are cross compiling... " >&6; }
20083if test "$cross_compiling" != yes; then
20084  { { ac_try="$ac_link"
20085case "(($ac_try" in
20086  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20087  *) ac_try_echo=$ac_try;;
20088esac
20089eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20090$as_echo "$ac_try_echo"; } >&5
20091  (eval "$ac_link") 2>&5
20092  ac_status=$?
20093  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20094  test $ac_status = 0; }
20095  if { ac_try='./conftest$ac_cv_exeext'
20096  { { case "(($ac_try" in
20097  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20098  *) ac_try_echo=$ac_try;;
20099esac
20100eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20101$as_echo "$ac_try_echo"; } >&5
20102  (eval "$ac_try") 2>&5
20103  ac_status=$?
20104  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20105  test $ac_status = 0; }; }; then
20106    cross_compiling=no
20107  else
20108    if test "$cross_compiling" = maybe; then
20109	cross_compiling=yes
20110    else
20111	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20112$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20113as_fn_error $? "cannot run C compiled programs.
20114If you meant to cross compile, use \`--host'.
20115See \`config.log' for more details" "$LINENO" 5; }
20116    fi
20117  fi
20118fi
20119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
20120$as_echo "$cross_compiling" >&6; }
20121
20122rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
20123ac_clean_files=$ac_clean_files_save
20124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
20125$as_echo_n "checking for suffix of object files... " >&6; }
20126if ${ac_cv_objext+:} false; then :
20127  $as_echo_n "(cached) " >&6
20128else
20129  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20130/* end confdefs.h.  */
20131
20132int
20133main ()
20134{
20135
20136  ;
20137  return 0;
20138}
20139_ACEOF
20140rm -f conftest.o conftest.obj
20141if { { ac_try="$ac_compile"
20142case "(($ac_try" in
20143  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20144  *) ac_try_echo=$ac_try;;
20145esac
20146eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20147$as_echo "$ac_try_echo"; } >&5
20148  (eval "$ac_compile") 2>&5
20149  ac_status=$?
20150  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20151  test $ac_status = 0; }; then :
20152  for ac_file in conftest.o conftest.obj conftest.*; do
20153  test -f "$ac_file" || continue;
20154  case $ac_file in
20155    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
20156    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
20157       break;;
20158  esac
20159done
20160else
20161  $as_echo "$as_me: failed program was:" >&5
20162sed 's/^/| /' conftest.$ac_ext >&5
20163
20164{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20165$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20166as_fn_error $? "cannot compute suffix of object files: cannot compile
20167See \`config.log' for more details" "$LINENO" 5; }
20168fi
20169rm -f conftest.$ac_cv_objext conftest.$ac_ext
20170fi
20171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
20172$as_echo "$ac_cv_objext" >&6; }
20173OBJEXT=$ac_cv_objext
20174ac_objext=$OBJEXT
20175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
20176$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
20177if ${ac_cv_c_compiler_gnu+:} false; then :
20178  $as_echo_n "(cached) " >&6
20179else
20180  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20181/* end confdefs.h.  */
20182
20183int
20184main ()
20185{
20186#ifndef __GNUC__
20187       choke me
20188#endif
20189
20190  ;
20191  return 0;
20192}
20193_ACEOF
20194if ac_fn_c_try_compile "$LINENO"; then :
20195  ac_compiler_gnu=yes
20196else
20197  ac_compiler_gnu=no
20198fi
20199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20200ac_cv_c_compiler_gnu=$ac_compiler_gnu
20201
20202fi
20203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
20204$as_echo "$ac_cv_c_compiler_gnu" >&6; }
20205if test $ac_compiler_gnu = yes; then
20206  GCC=yes
20207else
20208  GCC=
20209fi
20210ac_test_CFLAGS=${CFLAGS+set}
20211ac_save_CFLAGS=$CFLAGS
20212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
20213$as_echo_n "checking whether $CC accepts -g... " >&6; }
20214if ${ac_cv_prog_cc_g+:} false; then :
20215  $as_echo_n "(cached) " >&6
20216else
20217  ac_save_c_werror_flag=$ac_c_werror_flag
20218   ac_c_werror_flag=yes
20219   ac_cv_prog_cc_g=no
20220   CFLAGS="-g"
20221   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20222/* end confdefs.h.  */
20223
20224int
20225main ()
20226{
20227
20228  ;
20229  return 0;
20230}
20231_ACEOF
20232if ac_fn_c_try_compile "$LINENO"; then :
20233  ac_cv_prog_cc_g=yes
20234else
20235  CFLAGS=""
20236      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20237/* end confdefs.h.  */
20238
20239int
20240main ()
20241{
20242
20243  ;
20244  return 0;
20245}
20246_ACEOF
20247if ac_fn_c_try_compile "$LINENO"; then :
20248
20249else
20250  ac_c_werror_flag=$ac_save_c_werror_flag
20251	 CFLAGS="-g"
20252	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20253/* end confdefs.h.  */
20254
20255int
20256main ()
20257{
20258
20259  ;
20260  return 0;
20261}
20262_ACEOF
20263if ac_fn_c_try_compile "$LINENO"; then :
20264  ac_cv_prog_cc_g=yes
20265fi
20266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20267fi
20268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20269fi
20270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20271   ac_c_werror_flag=$ac_save_c_werror_flag
20272fi
20273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20274$as_echo "$ac_cv_prog_cc_g" >&6; }
20275if test "$ac_test_CFLAGS" = set; then
20276  CFLAGS=$ac_save_CFLAGS
20277elif test $ac_cv_prog_cc_g = yes; then
20278  if test "$GCC" = yes; then
20279    CFLAGS="-g -O2"
20280  else
20281    CFLAGS="-g"
20282  fi
20283else
20284  if test "$GCC" = yes; then
20285    CFLAGS="-O2"
20286  else
20287    CFLAGS=
20288  fi
20289fi
20290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20291$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20292if ${ac_cv_prog_cc_c89+:} false; then :
20293  $as_echo_n "(cached) " >&6
20294else
20295  ac_cv_prog_cc_c89=no
20296ac_save_CC=$CC
20297cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20298/* end confdefs.h.  */
20299#include <stdarg.h>
20300#include <stdio.h>
20301struct stat;
20302/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20303struct buf { int x; };
20304FILE * (*rcsopen) (struct buf *, struct stat *, int);
20305static char *e (p, i)
20306     char **p;
20307     int i;
20308{
20309  return p[i];
20310}
20311static char *f (char * (*g) (char **, int), char **p, ...)
20312{
20313  char *s;
20314  va_list v;
20315  va_start (v,p);
20316  s = g (p, va_arg (v,int));
20317  va_end (v);
20318  return s;
20319}
20320
20321/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20322   function prototypes and stuff, but not '\xHH' hex character constants.
20323   These don't provoke an error unfortunately, instead are silently treated
20324   as 'x'.  The following induces an error, until -std is added to get
20325   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20326   array size at least.  It's necessary to write '\x00'==0 to get something
20327   that's true only with -std.  */
20328int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20329
20330/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20331   inside strings and character constants.  */
20332#define FOO(x) 'x'
20333int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20334
20335int test (int i, double x);
20336struct s1 {int (*f) (int a);};
20337struct s2 {int (*f) (double a);};
20338int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20339int argc;
20340char **argv;
20341int
20342main ()
20343{
20344return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20345  ;
20346  return 0;
20347}
20348_ACEOF
20349for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20350	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20351do
20352  CC="$ac_save_CC $ac_arg"
20353  if ac_fn_c_try_compile "$LINENO"; then :
20354  ac_cv_prog_cc_c89=$ac_arg
20355fi
20356rm -f core conftest.err conftest.$ac_objext
20357  test "x$ac_cv_prog_cc_c89" != "xno" && break
20358done
20359rm -f conftest.$ac_ext
20360CC=$ac_save_CC
20361
20362fi
20363# AC_CACHE_VAL
20364case "x$ac_cv_prog_cc_c89" in
20365  x)
20366    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20367$as_echo "none needed" >&6; } ;;
20368  xno)
20369    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20370$as_echo "unsupported" >&6; } ;;
20371  *)
20372    CC="$CC $ac_cv_prog_cc_c89"
20373    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20374$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20375esac
20376if test "x$ac_cv_prog_cc_c89" != xno; then :
20377
20378fi
20379
20380ac_ext=cpp
20381ac_cpp='$CXXCPP $CPPFLAGS'
20382ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20383ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20384ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20385
20386
20387### Locate C++ compiler (CXX)
20388
20389if test "x$CXX" != x; then
20390  COMPILER_CHECK_LIST="$CXX"
20391elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20392  COMPILER_CHECK_LIST="cl"
20393elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20394  COMPILER_CHECK_LIST="CC g++"
20395else
20396  COMPILER_CHECK_LIST="g++ CC"
20397fi
20398
20399
20400  COMPILER_NAME=C++
20401
20402  CXX=
20403  # If TOOLS_DIR is set, check for all compiler names in there first
20404  # before checking the rest of the PATH.
20405  if test -n "$TOOLS_DIR"; then
20406    PATH_save="$PATH"
20407    PATH="$TOOLS_DIR"
20408    for ac_prog in $COMPILER_CHECK_LIST
20409do
20410  # Extract the first word of "$ac_prog", so it can be a program name with args.
20411set dummy $ac_prog; ac_word=$2
20412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20413$as_echo_n "checking for $ac_word... " >&6; }
20414if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
20415  $as_echo_n "(cached) " >&6
20416else
20417  case $TOOLS_DIR_CXX in
20418  [\\/]* | ?:[\\/]*)
20419  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20420  ;;
20421  *)
20422  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20423for as_dir in $PATH
20424do
20425  IFS=$as_save_IFS
20426  test -z "$as_dir" && as_dir=.
20427    for ac_exec_ext in '' $ac_executable_extensions; do
20428  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20429    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20430    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20431    break 2
20432  fi
20433done
20434  done
20435IFS=$as_save_IFS
20436
20437  ;;
20438esac
20439fi
20440TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
20441if test -n "$TOOLS_DIR_CXX"; then
20442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
20443$as_echo "$TOOLS_DIR_CXX" >&6; }
20444else
20445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20446$as_echo "no" >&6; }
20447fi
20448
20449
20450  test -n "$TOOLS_DIR_CXX" && break
20451done
20452
20453    CXX=$TOOLS_DIR_CXX
20454    PATH="$PATH_save"
20455  fi
20456
20457  # AC_PATH_PROGS can't be run multiple times with the same variable,
20458  # so create a new name for this run.
20459  if test "x$CXX" = x; then
20460    for ac_prog in $COMPILER_CHECK_LIST
20461do
20462  # Extract the first word of "$ac_prog", so it can be a program name with args.
20463set dummy $ac_prog; ac_word=$2
20464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20465$as_echo_n "checking for $ac_word... " >&6; }
20466if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
20467  $as_echo_n "(cached) " >&6
20468else
20469  case $POTENTIAL_CXX in
20470  [\\/]* | ?:[\\/]*)
20471  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20472  ;;
20473  *)
20474  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20475for as_dir in $PATH
20476do
20477  IFS=$as_save_IFS
20478  test -z "$as_dir" && as_dir=.
20479    for ac_exec_ext in '' $ac_executable_extensions; do
20480  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20481    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20482    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20483    break 2
20484  fi
20485done
20486  done
20487IFS=$as_save_IFS
20488
20489  ;;
20490esac
20491fi
20492POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20493if test -n "$POTENTIAL_CXX"; then
20494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20495$as_echo "$POTENTIAL_CXX" >&6; }
20496else
20497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20498$as_echo "no" >&6; }
20499fi
20500
20501
20502  test -n "$POTENTIAL_CXX" && break
20503done
20504
20505    CXX=$POTENTIAL_CXX
20506  fi
20507
20508  if test "x$CXX" = x; then
20509
20510    # Print a helpful message on how to acquire the necessary build dependency.
20511    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
20512    MISSING_DEPENDENCY=devkit
20513    PKGHANDLER_COMMAND=
20514
20515    case $PKGHANDLER in
20516	apt-get)
20517                apt_help     $MISSING_DEPENDENCY ;;
20518    yum)
20519                yum_help     $MISSING_DEPENDENCY ;;
20520	port)
20521                port_help    $MISSING_DEPENDENCY ;;
20522	pkgutil)
20523                pkgutil_help $MISSING_DEPENDENCY ;;
20524	pkgadd)
20525                pkgadd_help  $MISSING_DEPENDENCY ;;
20526    * )
20527      break ;;
20528    esac
20529
20530    if test "x$PKGHANDLER_COMMAND" != x; then
20531        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
20532    fi
20533
20534      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
20535  fi
20536
20537  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20538
20539  # First separate the path from the arguments. This will split at the first
20540  # space.
20541  complete="$CXX"
20542  path="${complete%% *}"
20543  tmp="$complete EOL"
20544  arguments="${tmp#* }"
20545
20546  # Input might be given as Windows format, start by converting to
20547  # unix format.
20548  new_path=`$CYGPATH -u "$path"`
20549
20550  # Now try to locate executable using which
20551  new_path=`$WHICH "$new_path" 2> /dev/null`
20552  # bat and cmd files are not always considered executable in cygwin causing which
20553  # to not find them
20554  if test "x$new_path" = x \
20555           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20556           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20557    new_path=`$CYGPATH -u "$path"`
20558  fi
20559  if test "x$new_path" = x; then
20560    # Oops. Which didn't find the executable.
20561    # The splitting of arguments from the executable at a space might have been incorrect,
20562    # since paths with space are more likely in Windows. Give it another try with the whole
20563    # argument.
20564    path="$complete"
20565    arguments="EOL"
20566    new_path=`$CYGPATH -u "$path"`
20567    new_path=`$WHICH "$new_path" 2> /dev/null`
20568    # bat and cmd files are not always considered executable in cygwin causing which
20569    # to not find them
20570    if test "x$new_path" = x \
20571             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20572             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20573      new_path=`$CYGPATH -u "$path"`
20574    fi
20575    if test "x$new_path" = x; then
20576      # It's still not found. Now this is an unrecoverable error.
20577      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20578$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20579      has_space=`$ECHO "$complete" | $GREP " "`
20580      if test "x$has_space" != x; then
20581        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20582$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20583      fi
20584      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20585    fi
20586  fi
20587
20588  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20589  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20590  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20591  # "foo.exe" is OK but "foo" is an error.
20592  #
20593  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20594  # It is also a way to make sure we got the proper file name for the real test later on.
20595  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20596  if test "x$test_shortpath" = x; then
20597    # Short path failed, file does not exist as specified.
20598    # Try adding .exe or .cmd
20599    if test -f "${new_path}.exe"; then
20600       input_to_shortpath="${new_path}.exe"
20601    elif test -f "${new_path}.cmd"; then
20602       input_to_shortpath="${new_path}.cmd"
20603    else
20604      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
20605$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
20606      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20607$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20608      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20609    fi
20610  else
20611    input_to_shortpath="$new_path"
20612  fi
20613
20614  # Call helper function which possibly converts this using DOS-style short mode.
20615  # If so, the updated path is stored in $new_path.
20616  new_path="$input_to_shortpath"
20617
20618  input_path="$input_to_shortpath"
20619  # Check if we need to convert this using DOS-style short mode. If the path
20620  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20621  # take no chances and rewrite it.
20622  # Note: m4 eats our [], so we need to use [ and ] instead.
20623  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20624  if test "x$has_forbidden_chars" != x; then
20625    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20626    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20627    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20628    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20629      # Going to short mode and back again did indeed matter. Since short mode is
20630      # case insensitive, let's make it lowercase to improve readability.
20631      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20632      # Now convert it back to Unix-stile (cygpath)
20633      input_path=`$CYGPATH -u "$shortmode_path"`
20634      new_path="$input_path"
20635    fi
20636  fi
20637
20638  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20639  if test "x$test_cygdrive_prefix" = x; then
20640    # As a simple fix, exclude /usr/bin since it's not a real path.
20641    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20642      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20643      # a path prefixed by /cygdrive for fixpath to work.
20644      new_path="$CYGWIN_ROOT_PATH$input_path"
20645    fi
20646  fi
20647
20648  # remove trailing .exe if any
20649  new_path="${new_path/%.exe/}"
20650
20651  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20652
20653  # First separate the path from the arguments. This will split at the first
20654  # space.
20655  complete="$CXX"
20656  path="${complete%% *}"
20657  tmp="$complete EOL"
20658  arguments="${tmp#* }"
20659
20660  # Input might be given as Windows format, start by converting to
20661  # unix format.
20662  new_path="$path"
20663
20664  windows_path="$new_path"
20665  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20666    unix_path=`$CYGPATH -u "$windows_path"`
20667    new_path="$unix_path"
20668  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20669    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20670    new_path="$unix_path"
20671  fi
20672
20673
20674  # Now try to locate executable using which
20675  new_path=`$WHICH "$new_path" 2> /dev/null`
20676
20677  if test "x$new_path" = x; then
20678    # Oops. Which didn't find the executable.
20679    # The splitting of arguments from the executable at a space might have been incorrect,
20680    # since paths with space are more likely in Windows. Give it another try with the whole
20681    # argument.
20682    path="$complete"
20683    arguments="EOL"
20684    new_path="$path"
20685
20686  windows_path="$new_path"
20687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20688    unix_path=`$CYGPATH -u "$windows_path"`
20689    new_path="$unix_path"
20690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20691    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20692    new_path="$unix_path"
20693  fi
20694
20695
20696    new_path=`$WHICH "$new_path" 2> /dev/null`
20697
20698    if test "x$new_path" = x; then
20699      # It's still not found. Now this is an unrecoverable error.
20700      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20701$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20702      has_space=`$ECHO "$complete" | $GREP " "`
20703      if test "x$has_space" != x; then
20704        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20705$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20706      fi
20707      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20708    fi
20709  fi
20710
20711  # Now new_path has a complete unix path to the binary
20712  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20713    # Keep paths in /bin as-is, but remove trailing .exe if any
20714    new_path="${new_path/%.exe/}"
20715    # Do not save /bin paths to all_fixpath_prefixes!
20716  else
20717    # Not in mixed or Windows style, start by that.
20718    new_path=`cmd //c echo $new_path`
20719
20720  input_path="$new_path"
20721  # Check if we need to convert this using DOS-style short mode. If the path
20722  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20723  # take no chances and rewrite it.
20724  # Note: m4 eats our [], so we need to use [ and ] instead.
20725  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20726  if test "x$has_forbidden_chars" != x; then
20727    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20728    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20729  fi
20730
20731    # Output is in $new_path
20732
20733  windows_path="$new_path"
20734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20735    unix_path=`$CYGPATH -u "$windows_path"`
20736    new_path="$unix_path"
20737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20738    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20739    new_path="$unix_path"
20740  fi
20741
20742    # remove trailing .exe if any
20743    new_path="${new_path/%.exe/}"
20744
20745    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20746    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20747  fi
20748
20749  else
20750    # We're on a posix platform. Hooray! :)
20751    # First separate the path from the arguments. This will split at the first
20752    # space.
20753    complete="$CXX"
20754    path="${complete%% *}"
20755    tmp="$complete EOL"
20756    arguments="${tmp#* }"
20757
20758    # Cannot rely on the command "which" here since it doesn't always work.
20759    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20760    if test -z "$is_absolute_path"; then
20761      # Path to executable is not absolute. Find it.
20762      IFS_save="$IFS"
20763      IFS=:
20764      for p in $PATH; do
20765        if test -f "$p/$path" && test -x "$p/$path"; then
20766          new_path="$p/$path"
20767          break
20768        fi
20769      done
20770      IFS="$IFS_save"
20771    else
20772      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
20773$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
20774      new_path="$path"
20775    fi
20776
20777    if test "x$new_path" = x; then
20778        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20779$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20780        has_space=`$ECHO "$complete" | $GREP " "`
20781        if test "x$has_space" != x; then
20782          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20783$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20784        fi
20785        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20786      fi
20787  fi
20788
20789      # Now join together the path and the arguments once again
20790      if test "x$arguments" != xEOL; then
20791        new_complete="$new_path ${arguments% *}"
20792      else
20793        new_complete="$new_path"
20794      fi
20795
20796  if test "x$complete" != "x$new_complete"; then
20797      CXX="$new_complete"
20798      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
20799$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
20800    fi
20801
20802  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
20803$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
20804  TEST_COMPILER="$CXX"
20805
20806    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20807        # Follow a chain of symbolic links. Use readlink
20808        # where it exists, else fall back to horribly
20809        # complicated shell code.
20810        if test "x$READLINK_TESTED" != yes; then
20811            # On MacOSX there is a readlink tool with a different
20812            # purpose than the GNU readlink tool. Check the found readlink.
20813            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20814            if test "x$ISGNU" = x; then
20815                 # A readlink that we do not know how to use.
20816                 # Are there other non-GNU readlinks out there?
20817                 READLINK_TESTED=yes
20818                 READLINK=
20819            fi
20820        fi
20821
20822        if test "x$READLINK" != x; then
20823            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
20824        else
20825            # Save the current directory for restoring afterwards
20826            STARTDIR=$PWD
20827            COUNTER=0
20828            sym_link_dir=`$DIRNAME $TEST_COMPILER`
20829            sym_link_file=`$BASENAME $TEST_COMPILER`
20830            cd $sym_link_dir
20831            # Use -P flag to resolve symlinks in directories.
20832            cd `$THEPWDCMD -P`
20833            sym_link_dir=`$THEPWDCMD -P`
20834            # Resolve file symlinks
20835            while test $COUNTER -lt 20; do
20836                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20837                if test "x$ISLINK" == x; then
20838                    # This is not a symbolic link! We are done!
20839                    break
20840                fi
20841                # Again resolve directory symlinks since the target of the just found
20842                # link could be in a different directory
20843                cd `$DIRNAME $ISLINK`
20844                sym_link_dir=`$THEPWDCMD -P`
20845                sym_link_file=`$BASENAME $ISLINK`
20846                let COUNTER=COUNTER+1
20847            done
20848            cd $STARTDIR
20849            TEST_COMPILER=$sym_link_dir/$sym_link_file
20850        fi
20851    fi
20852
20853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
20854$as_echo "$TEST_COMPILER" >&6; }
20855  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
20856$as_echo_n "checking if CXX is disguised ccache... " >&6; }
20857
20858  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
20859  if test "x$COMPILER_BASENAME" = "xccache"; then
20860    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
20861$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
20862    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
20863    # We want to control ccache invocation ourselves, so ignore this cc and try
20864    # searching again.
20865
20866    # Remove the path to the fake ccache cc from the PATH
20867    RETRY_COMPILER_SAVED_PATH="$PATH"
20868    COMPILER_DIRNAME=`$DIRNAME $CXX`
20869    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
20870
20871    # Try again looking for our compiler
20872    if test -n "$ac_tool_prefix"; then
20873  for ac_prog in $COMPILER_CHECK_LIST
20874  do
20875    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20876set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20878$as_echo_n "checking for $ac_word... " >&6; }
20879if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
20880  $as_echo_n "(cached) " >&6
20881else
20882  if test -n "$PROPER_COMPILER_CXX"; then
20883  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
20884else
20885as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20886for as_dir in $PATH
20887do
20888  IFS=$as_save_IFS
20889  test -z "$as_dir" && as_dir=.
20890    for ac_exec_ext in '' $ac_executable_extensions; do
20891  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20892    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
20893    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20894    break 2
20895  fi
20896done
20897  done
20898IFS=$as_save_IFS
20899
20900fi
20901fi
20902PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
20903if test -n "$PROPER_COMPILER_CXX"; then
20904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20905$as_echo "$PROPER_COMPILER_CXX" >&6; }
20906else
20907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20908$as_echo "no" >&6; }
20909fi
20910
20911
20912    test -n "$PROPER_COMPILER_CXX" && break
20913  done
20914fi
20915if test -z "$PROPER_COMPILER_CXX"; then
20916  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
20917  for ac_prog in $COMPILER_CHECK_LIST
20918do
20919  # Extract the first word of "$ac_prog", so it can be a program name with args.
20920set dummy $ac_prog; ac_word=$2
20921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20922$as_echo_n "checking for $ac_word... " >&6; }
20923if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
20924  $as_echo_n "(cached) " >&6
20925else
20926  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20927  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
20928else
20929as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20930for as_dir in $PATH
20931do
20932  IFS=$as_save_IFS
20933  test -z "$as_dir" && as_dir=.
20934    for ac_exec_ext in '' $ac_executable_extensions; do
20935  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20936    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
20937    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20938    break 2
20939  fi
20940done
20941  done
20942IFS=$as_save_IFS
20943
20944fi
20945fi
20946ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
20947if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
20949$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
20950else
20951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20952$as_echo "no" >&6; }
20953fi
20954
20955
20956  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
20957done
20958
20959  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
20960    PROPER_COMPILER_CXX=""
20961  else
20962    case $cross_compiling:$ac_tool_warned in
20963yes:)
20964{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20965$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20966ac_tool_warned=yes ;;
20967esac
20968    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
20969  fi
20970fi
20971
20972
20973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20974
20975  # First separate the path from the arguments. This will split at the first
20976  # space.
20977  complete="$PROPER_COMPILER_CXX"
20978  path="${complete%% *}"
20979  tmp="$complete EOL"
20980  arguments="${tmp#* }"
20981
20982  # Input might be given as Windows format, start by converting to
20983  # unix format.
20984  new_path=`$CYGPATH -u "$path"`
20985
20986  # Now try to locate executable using which
20987  new_path=`$WHICH "$new_path" 2> /dev/null`
20988  # bat and cmd files are not always considered executable in cygwin causing which
20989  # to not find them
20990  if test "x$new_path" = x \
20991           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20992           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20993    new_path=`$CYGPATH -u "$path"`
20994  fi
20995  if test "x$new_path" = x; then
20996    # Oops. Which didn't find the executable.
20997    # The splitting of arguments from the executable at a space might have been incorrect,
20998    # since paths with space are more likely in Windows. Give it another try with the whole
20999    # argument.
21000    path="$complete"
21001    arguments="EOL"
21002    new_path=`$CYGPATH -u "$path"`
21003    new_path=`$WHICH "$new_path" 2> /dev/null`
21004    # bat and cmd files are not always considered executable in cygwin causing which
21005    # to not find them
21006    if test "x$new_path" = x \
21007             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21008             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21009      new_path=`$CYGPATH -u "$path"`
21010    fi
21011    if test "x$new_path" = x; then
21012      # It's still not found. Now this is an unrecoverable error.
21013      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21014$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21015      has_space=`$ECHO "$complete" | $GREP " "`
21016      if test "x$has_space" != x; then
21017        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21018$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21019      fi
21020      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21021    fi
21022  fi
21023
21024  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21025  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21026  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21027  # "foo.exe" is OK but "foo" is an error.
21028  #
21029  # This test is therefore slightly more accurate than "test -f" to check for file presence.
21030  # It is also a way to make sure we got the proper file name for the real test later on.
21031  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21032  if test "x$test_shortpath" = x; then
21033    # Short path failed, file does not exist as specified.
21034    # Try adding .exe or .cmd
21035    if test -f "${new_path}.exe"; then
21036       input_to_shortpath="${new_path}.exe"
21037    elif test -f "${new_path}.cmd"; then
21038       input_to_shortpath="${new_path}.cmd"
21039    else
21040      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
21041$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
21042      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21043$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21044      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21045    fi
21046  else
21047    input_to_shortpath="$new_path"
21048  fi
21049
21050  # Call helper function which possibly converts this using DOS-style short mode.
21051  # If so, the updated path is stored in $new_path.
21052  new_path="$input_to_shortpath"
21053
21054  input_path="$input_to_shortpath"
21055  # Check if we need to convert this using DOS-style short mode. If the path
21056  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21057  # take no chances and rewrite it.
21058  # Note: m4 eats our [], so we need to use [ and ] instead.
21059  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21060  if test "x$has_forbidden_chars" != x; then
21061    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21062    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21063    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21064    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21065      # Going to short mode and back again did indeed matter. Since short mode is
21066      # case insensitive, let's make it lowercase to improve readability.
21067      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21068      # Now convert it back to Unix-stile (cygpath)
21069      input_path=`$CYGPATH -u "$shortmode_path"`
21070      new_path="$input_path"
21071    fi
21072  fi
21073
21074  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21075  if test "x$test_cygdrive_prefix" = x; then
21076    # As a simple fix, exclude /usr/bin since it's not a real path.
21077    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21078      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21079      # a path prefixed by /cygdrive for fixpath to work.
21080      new_path="$CYGWIN_ROOT_PATH$input_path"
21081    fi
21082  fi
21083
21084  # remove trailing .exe if any
21085  new_path="${new_path/%.exe/}"
21086
21087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21088
21089  # First separate the path from the arguments. This will split at the first
21090  # space.
21091  complete="$PROPER_COMPILER_CXX"
21092  path="${complete%% *}"
21093  tmp="$complete EOL"
21094  arguments="${tmp#* }"
21095
21096  # Input might be given as Windows format, start by converting to
21097  # unix format.
21098  new_path="$path"
21099
21100  windows_path="$new_path"
21101  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21102    unix_path=`$CYGPATH -u "$windows_path"`
21103    new_path="$unix_path"
21104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21105    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21106    new_path="$unix_path"
21107  fi
21108
21109
21110  # Now try to locate executable using which
21111  new_path=`$WHICH "$new_path" 2> /dev/null`
21112
21113  if test "x$new_path" = x; then
21114    # Oops. Which didn't find the executable.
21115    # The splitting of arguments from the executable at a space might have been incorrect,
21116    # since paths with space are more likely in Windows. Give it another try with the whole
21117    # argument.
21118    path="$complete"
21119    arguments="EOL"
21120    new_path="$path"
21121
21122  windows_path="$new_path"
21123  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21124    unix_path=`$CYGPATH -u "$windows_path"`
21125    new_path="$unix_path"
21126  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21127    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21128    new_path="$unix_path"
21129  fi
21130
21131
21132    new_path=`$WHICH "$new_path" 2> /dev/null`
21133
21134    if test "x$new_path" = x; then
21135      # It's still not found. Now this is an unrecoverable error.
21136      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21137$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21138      has_space=`$ECHO "$complete" | $GREP " "`
21139      if test "x$has_space" != x; then
21140        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21141$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21142      fi
21143      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21144    fi
21145  fi
21146
21147  # Now new_path has a complete unix path to the binary
21148  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21149    # Keep paths in /bin as-is, but remove trailing .exe if any
21150    new_path="${new_path/%.exe/}"
21151    # Do not save /bin paths to all_fixpath_prefixes!
21152  else
21153    # Not in mixed or Windows style, start by that.
21154    new_path=`cmd //c echo $new_path`
21155
21156  input_path="$new_path"
21157  # Check if we need to convert this using DOS-style short mode. If the path
21158  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21159  # take no chances and rewrite it.
21160  # Note: m4 eats our [], so we need to use [ and ] instead.
21161  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21162  if test "x$has_forbidden_chars" != x; then
21163    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21164    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21165  fi
21166
21167    # Output is in $new_path
21168
21169  windows_path="$new_path"
21170  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21171    unix_path=`$CYGPATH -u "$windows_path"`
21172    new_path="$unix_path"
21173  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21174    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21175    new_path="$unix_path"
21176  fi
21177
21178    # remove trailing .exe if any
21179    new_path="${new_path/%.exe/}"
21180
21181    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21182    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21183  fi
21184
21185  else
21186    # We're on a posix platform. Hooray! :)
21187    # First separate the path from the arguments. This will split at the first
21188    # space.
21189    complete="$PROPER_COMPILER_CXX"
21190    path="${complete%% *}"
21191    tmp="$complete EOL"
21192    arguments="${tmp#* }"
21193
21194    # Cannot rely on the command "which" here since it doesn't always work.
21195    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21196    if test -z "$is_absolute_path"; then
21197      # Path to executable is not absolute. Find it.
21198      IFS_save="$IFS"
21199      IFS=:
21200      for p in $PATH; do
21201        if test -f "$p/$path" && test -x "$p/$path"; then
21202          new_path="$p/$path"
21203          break
21204        fi
21205      done
21206      IFS="$IFS_save"
21207    else
21208      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
21209$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
21210      new_path="$path"
21211    fi
21212
21213    if test "x$new_path" = x; then
21214        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21215$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21216        has_space=`$ECHO "$complete" | $GREP " "`
21217        if test "x$has_space" != x; then
21218          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21219$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21220        fi
21221        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21222      fi
21223  fi
21224
21225      # Now join together the path and the arguments once again
21226      if test "x$arguments" != xEOL; then
21227        new_complete="$new_path ${arguments% *}"
21228      else
21229        new_complete="$new_path"
21230      fi
21231
21232  if test "x$complete" != "x$new_complete"; then
21233      PROPER_COMPILER_CXX="$new_complete"
21234      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
21235$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
21236    fi
21237
21238    PATH="$RETRY_COMPILER_SAVED_PATH"
21239
21240    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
21241$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
21242
21243    if test "x$OPENJDK_BUILD_OS" != xwindows; then
21244        # Follow a chain of symbolic links. Use readlink
21245        # where it exists, else fall back to horribly
21246        # complicated shell code.
21247        if test "x$READLINK_TESTED" != yes; then
21248            # On MacOSX there is a readlink tool with a different
21249            # purpose than the GNU readlink tool. Check the found readlink.
21250            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21251            if test "x$ISGNU" = x; then
21252                 # A readlink that we do not know how to use.
21253                 # Are there other non-GNU readlinks out there?
21254                 READLINK_TESTED=yes
21255                 READLINK=
21256            fi
21257        fi
21258
21259        if test "x$READLINK" != x; then
21260            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21261        else
21262            # Save the current directory for restoring afterwards
21263            STARTDIR=$PWD
21264            COUNTER=0
21265            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21266            sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21267            cd $sym_link_dir
21268            # Use -P flag to resolve symlinks in directories.
21269            cd `$THEPWDCMD -P`
21270            sym_link_dir=`$THEPWDCMD -P`
21271            # Resolve file symlinks
21272            while test $COUNTER -lt 20; do
21273                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21274                if test "x$ISLINK" == x; then
21275                    # This is not a symbolic link! We are done!
21276                    break
21277                fi
21278                # Again resolve directory symlinks since the target of the just found
21279                # link could be in a different directory
21280                cd `$DIRNAME $ISLINK`
21281                sym_link_dir=`$THEPWDCMD -P`
21282                sym_link_file=`$BASENAME $ISLINK`
21283                let COUNTER=COUNTER+1
21284            done
21285            cd $STARTDIR
21286            PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21287        fi
21288    fi
21289
21290    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21291$as_echo "$PROPER_COMPILER_CXX" >&6; }
21292    CXX="$PROPER_COMPILER_CXX"
21293  else
21294    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21295$as_echo "no, keeping CXX" >&6; }
21296    CXX="$TEST_COMPILER"
21297  fi
21298
21299  COMPILER=$CXX
21300  COMPILER_NAME=$COMPILER_NAME
21301
21302  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21303    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21304    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21305    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21306    if test $? -ne 0; then
21307      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21308
21309      { $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
21310$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21311      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21312$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21313      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21314    else
21315      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21316      COMPILER_VENDOR="Sun Studio"
21317    fi
21318  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21319    # First line typically looks something like:
21320    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
21321    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
21322    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21323    COMPILER_VENDOR="Microsoft CL.EXE"
21324    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21325    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21326      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21327        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21328      fi
21329    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21330      if test "x$COMPILER_CPU_TEST" != "xx64"; then
21331        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21332      fi
21333    fi
21334  else
21335    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21336    # Check that this is likely to be GCC.
21337    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21338    if test $? -ne 0; then
21339      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21340$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21341      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21342$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21343      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21344    fi
21345
21346    # First line typically looks something like:
21347    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21348    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21349    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21350  fi
21351  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21352  CXX_VERSION="$COMPILER_VERSION"
21353  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21354  CXX_VENDOR="$COMPILER_VENDOR"
21355
21356  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21357$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21358
21359
21360# Now that we have resolved CXX ourself, let autoconf have its go at it
21361ac_ext=cpp
21362ac_cpp='$CXXCPP $CPPFLAGS'
21363ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21364ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21365ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21366if test -z "$CXX"; then
21367  if test -n "$CCC"; then
21368    CXX=$CCC
21369  else
21370    if test -n "$ac_tool_prefix"; then
21371  for ac_prog in $CXX
21372  do
21373    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21374set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21376$as_echo_n "checking for $ac_word... " >&6; }
21377if ${ac_cv_prog_CXX+:} false; then :
21378  $as_echo_n "(cached) " >&6
21379else
21380  if test -n "$CXX"; then
21381  ac_cv_prog_CXX="$CXX" # Let the user override the test.
21382else
21383as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21384for as_dir in $PATH
21385do
21386  IFS=$as_save_IFS
21387  test -z "$as_dir" && as_dir=.
21388    for ac_exec_ext in '' $ac_executable_extensions; do
21389  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21390    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21391    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21392    break 2
21393  fi
21394done
21395  done
21396IFS=$as_save_IFS
21397
21398fi
21399fi
21400CXX=$ac_cv_prog_CXX
21401if test -n "$CXX"; then
21402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21403$as_echo "$CXX" >&6; }
21404else
21405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21406$as_echo "no" >&6; }
21407fi
21408
21409
21410    test -n "$CXX" && break
21411  done
21412fi
21413if test -z "$CXX"; then
21414  ac_ct_CXX=$CXX
21415  for ac_prog in $CXX
21416do
21417  # Extract the first word of "$ac_prog", so it can be a program name with args.
21418set dummy $ac_prog; ac_word=$2
21419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21420$as_echo_n "checking for $ac_word... " >&6; }
21421if ${ac_cv_prog_ac_ct_CXX+:} false; then :
21422  $as_echo_n "(cached) " >&6
21423else
21424  if test -n "$ac_ct_CXX"; then
21425  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
21426else
21427as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21428for as_dir in $PATH
21429do
21430  IFS=$as_save_IFS
21431  test -z "$as_dir" && as_dir=.
21432    for ac_exec_ext in '' $ac_executable_extensions; do
21433  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21434    ac_cv_prog_ac_ct_CXX="$ac_prog"
21435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21436    break 2
21437  fi
21438done
21439  done
21440IFS=$as_save_IFS
21441
21442fi
21443fi
21444ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
21445if test -n "$ac_ct_CXX"; then
21446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
21447$as_echo "$ac_ct_CXX" >&6; }
21448else
21449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21450$as_echo "no" >&6; }
21451fi
21452
21453
21454  test -n "$ac_ct_CXX" && break
21455done
21456
21457  if test "x$ac_ct_CXX" = x; then
21458    CXX="g++"
21459  else
21460    case $cross_compiling:$ac_tool_warned in
21461yes:)
21462{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21463$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21464ac_tool_warned=yes ;;
21465esac
21466    CXX=$ac_ct_CXX
21467  fi
21468fi
21469
21470  fi
21471fi
21472# Provide some information about the compiler.
21473$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
21474set X $ac_compile
21475ac_compiler=$2
21476for ac_option in --version -v -V -qversion; do
21477  { { ac_try="$ac_compiler $ac_option >&5"
21478case "(($ac_try" in
21479  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21480  *) ac_try_echo=$ac_try;;
21481esac
21482eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21483$as_echo "$ac_try_echo"; } >&5
21484  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21485  ac_status=$?
21486  if test -s conftest.err; then
21487    sed '10a\
21488... rest of stderr output deleted ...
21489         10q' conftest.err >conftest.er1
21490    cat conftest.er1 >&5
21491  fi
21492  rm -f conftest.er1 conftest.err
21493  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21494  test $ac_status = 0; }
21495done
21496
21497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
21498$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
21499if ${ac_cv_cxx_compiler_gnu+:} false; then :
21500  $as_echo_n "(cached) " >&6
21501else
21502  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21503/* end confdefs.h.  */
21504
21505int
21506main ()
21507{
21508#ifndef __GNUC__
21509       choke me
21510#endif
21511
21512  ;
21513  return 0;
21514}
21515_ACEOF
21516if ac_fn_cxx_try_compile "$LINENO"; then :
21517  ac_compiler_gnu=yes
21518else
21519  ac_compiler_gnu=no
21520fi
21521rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21522ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
21523
21524fi
21525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
21526$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
21527if test $ac_compiler_gnu = yes; then
21528  GXX=yes
21529else
21530  GXX=
21531fi
21532ac_test_CXXFLAGS=${CXXFLAGS+set}
21533ac_save_CXXFLAGS=$CXXFLAGS
21534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
21535$as_echo_n "checking whether $CXX accepts -g... " >&6; }
21536if ${ac_cv_prog_cxx_g+:} false; then :
21537  $as_echo_n "(cached) " >&6
21538else
21539  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
21540   ac_cxx_werror_flag=yes
21541   ac_cv_prog_cxx_g=no
21542   CXXFLAGS="-g"
21543   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21544/* end confdefs.h.  */
21545
21546int
21547main ()
21548{
21549
21550  ;
21551  return 0;
21552}
21553_ACEOF
21554if ac_fn_cxx_try_compile "$LINENO"; then :
21555  ac_cv_prog_cxx_g=yes
21556else
21557  CXXFLAGS=""
21558      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21559/* end confdefs.h.  */
21560
21561int
21562main ()
21563{
21564
21565  ;
21566  return 0;
21567}
21568_ACEOF
21569if ac_fn_cxx_try_compile "$LINENO"; then :
21570
21571else
21572  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21573	 CXXFLAGS="-g"
21574	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21575/* end confdefs.h.  */
21576
21577int
21578main ()
21579{
21580
21581  ;
21582  return 0;
21583}
21584_ACEOF
21585if ac_fn_cxx_try_compile "$LINENO"; then :
21586  ac_cv_prog_cxx_g=yes
21587fi
21588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21589fi
21590rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21591fi
21592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21593   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21594fi
21595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
21596$as_echo "$ac_cv_prog_cxx_g" >&6; }
21597if test "$ac_test_CXXFLAGS" = set; then
21598  CXXFLAGS=$ac_save_CXXFLAGS
21599elif test $ac_cv_prog_cxx_g = yes; then
21600  if test "$GXX" = yes; then
21601    CXXFLAGS="-g -O2"
21602  else
21603    CXXFLAGS="-g"
21604  fi
21605else
21606  if test "$GXX" = yes; then
21607    CXXFLAGS="-O2"
21608  else
21609    CXXFLAGS=
21610  fi
21611fi
21612ac_ext=cpp
21613ac_cpp='$CXXCPP $CPPFLAGS'
21614ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21615ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21616ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21617
21618
21619### Locate other tools
21620
21621if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21622    ac_ext=m
21623ac_cpp='$OBJCPP $CPPFLAGS'
21624ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21625ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21626ac_compiler_gnu=$ac_cv_objc_compiler_gnu
21627if test -n "$ac_tool_prefix"; then
21628  for ac_prog in gcc objcc objc cc CC
21629  do
21630    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21631set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21633$as_echo_n "checking for $ac_word... " >&6; }
21634if ${ac_cv_prog_OBJC+:} false; then :
21635  $as_echo_n "(cached) " >&6
21636else
21637  if test -n "$OBJC"; then
21638  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
21639else
21640as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21641for as_dir in $PATH
21642do
21643  IFS=$as_save_IFS
21644  test -z "$as_dir" && as_dir=.
21645    for ac_exec_ext in '' $ac_executable_extensions; do
21646  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21647    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
21648    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21649    break 2
21650  fi
21651done
21652  done
21653IFS=$as_save_IFS
21654
21655fi
21656fi
21657OBJC=$ac_cv_prog_OBJC
21658if test -n "$OBJC"; then
21659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
21660$as_echo "$OBJC" >&6; }
21661else
21662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21663$as_echo "no" >&6; }
21664fi
21665
21666
21667    test -n "$OBJC" && break
21668  done
21669fi
21670if test -z "$OBJC"; then
21671  ac_ct_OBJC=$OBJC
21672  for ac_prog in gcc objcc objc cc CC
21673do
21674  # Extract the first word of "$ac_prog", so it can be a program name with args.
21675set dummy $ac_prog; ac_word=$2
21676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21677$as_echo_n "checking for $ac_word... " >&6; }
21678if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
21679  $as_echo_n "(cached) " >&6
21680else
21681  if test -n "$ac_ct_OBJC"; then
21682  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
21683else
21684as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21685for as_dir in $PATH
21686do
21687  IFS=$as_save_IFS
21688  test -z "$as_dir" && as_dir=.
21689    for ac_exec_ext in '' $ac_executable_extensions; do
21690  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21691    ac_cv_prog_ac_ct_OBJC="$ac_prog"
21692    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21693    break 2
21694  fi
21695done
21696  done
21697IFS=$as_save_IFS
21698
21699fi
21700fi
21701ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
21702if test -n "$ac_ct_OBJC"; then
21703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
21704$as_echo "$ac_ct_OBJC" >&6; }
21705else
21706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21707$as_echo "no" >&6; }
21708fi
21709
21710
21711  test -n "$ac_ct_OBJC" && break
21712done
21713
21714  if test "x$ac_ct_OBJC" = x; then
21715    OBJC="gcc"
21716  else
21717    case $cross_compiling:$ac_tool_warned in
21718yes:)
21719{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21720$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21721ac_tool_warned=yes ;;
21722esac
21723    OBJC=$ac_ct_OBJC
21724  fi
21725fi
21726
21727# Provide some information about the compiler.
21728$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
21729set X $ac_compile
21730ac_compiler=$2
21731for ac_option in --version -v -V -qversion; do
21732  { { ac_try="$ac_compiler $ac_option >&5"
21733case "(($ac_try" in
21734  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21735  *) ac_try_echo=$ac_try;;
21736esac
21737eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21738$as_echo "$ac_try_echo"; } >&5
21739  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21740  ac_status=$?
21741  if test -s conftest.err; then
21742    sed '10a\
21743... rest of stderr output deleted ...
21744         10q' conftest.err >conftest.er1
21745    cat conftest.er1 >&5
21746  fi
21747  rm -f conftest.er1 conftest.err
21748  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21749  test $ac_status = 0; }
21750done
21751
21752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
21753$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
21754if ${ac_cv_objc_compiler_gnu+:} false; then :
21755  $as_echo_n "(cached) " >&6
21756else
21757  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21758/* end confdefs.h.  */
21759
21760int
21761main ()
21762{
21763#ifndef __GNUC__
21764       choke me
21765#endif
21766
21767  ;
21768  return 0;
21769}
21770_ACEOF
21771if ac_fn_objc_try_compile "$LINENO"; then :
21772  ac_compiler_gnu=yes
21773else
21774  ac_compiler_gnu=no
21775fi
21776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21777ac_cv_objc_compiler_gnu=$ac_compiler_gnu
21778
21779fi
21780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
21781$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
21782if test $ac_compiler_gnu = yes; then
21783  GOBJC=yes
21784else
21785  GOBJC=
21786fi
21787ac_test_OBJCFLAGS=${OBJCFLAGS+set}
21788ac_save_OBJCFLAGS=$OBJCFLAGS
21789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
21790$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
21791if ${ac_cv_prog_objc_g+:} false; then :
21792  $as_echo_n "(cached) " >&6
21793else
21794  ac_save_objc_werror_flag=$ac_objc_werror_flag
21795   ac_objc_werror_flag=yes
21796   ac_cv_prog_objc_g=no
21797   OBJCFLAGS="-g"
21798   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21799/* end confdefs.h.  */
21800
21801int
21802main ()
21803{
21804
21805  ;
21806  return 0;
21807}
21808_ACEOF
21809if ac_fn_objc_try_compile "$LINENO"; then :
21810  ac_cv_prog_objc_g=yes
21811else
21812  OBJCFLAGS=""
21813      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21814/* end confdefs.h.  */
21815
21816int
21817main ()
21818{
21819
21820  ;
21821  return 0;
21822}
21823_ACEOF
21824if ac_fn_objc_try_compile "$LINENO"; then :
21825
21826else
21827  ac_objc_werror_flag=$ac_save_objc_werror_flag
21828	 OBJCFLAGS="-g"
21829	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21830/* end confdefs.h.  */
21831
21832int
21833main ()
21834{
21835
21836  ;
21837  return 0;
21838}
21839_ACEOF
21840if ac_fn_objc_try_compile "$LINENO"; then :
21841  ac_cv_prog_objc_g=yes
21842fi
21843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21844fi
21845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21846fi
21847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21848   ac_objc_werror_flag=$ac_save_objc_werror_flag
21849fi
21850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
21851$as_echo "$ac_cv_prog_objc_g" >&6; }
21852if test "$ac_test_OBJCFLAGS" = set; then
21853  OBJCFLAGS=$ac_save_OBJCFLAGS
21854elif test $ac_cv_prog_objc_g = yes; then
21855  if test "$GOBJC" = yes; then
21856    OBJCFLAGS="-g -O2"
21857  else
21858    OBJCFLAGS="-g"
21859  fi
21860else
21861  if test "$GOBJC" = yes; then
21862    OBJCFLAGS="-O2"
21863  else
21864    OBJCFLAGS=
21865  fi
21866fi
21867ac_ext=cpp
21868ac_cpp='$CXXCPP $CPPFLAGS'
21869ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21870ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21871ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21872
21873
21874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21875
21876  # First separate the path from the arguments. This will split at the first
21877  # space.
21878  complete="$OBJC"
21879  path="${complete%% *}"
21880  tmp="$complete EOL"
21881  arguments="${tmp#* }"
21882
21883  # Input might be given as Windows format, start by converting to
21884  # unix format.
21885  new_path=`$CYGPATH -u "$path"`
21886
21887  # Now try to locate executable using which
21888  new_path=`$WHICH "$new_path" 2> /dev/null`
21889  # bat and cmd files are not always considered executable in cygwin causing which
21890  # to not find them
21891  if test "x$new_path" = x \
21892           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21893           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21894    new_path=`$CYGPATH -u "$path"`
21895  fi
21896  if test "x$new_path" = x; then
21897    # Oops. Which didn't find the executable.
21898    # The splitting of arguments from the executable at a space might have been incorrect,
21899    # since paths with space are more likely in Windows. Give it another try with the whole
21900    # argument.
21901    path="$complete"
21902    arguments="EOL"
21903    new_path=`$CYGPATH -u "$path"`
21904    new_path=`$WHICH "$new_path" 2> /dev/null`
21905    # bat and cmd files are not always considered executable in cygwin causing which
21906    # to not find them
21907    if test "x$new_path" = x \
21908             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21909             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21910      new_path=`$CYGPATH -u "$path"`
21911    fi
21912    if test "x$new_path" = x; then
21913      # It's still not found. Now this is an unrecoverable error.
21914      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21915$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21916      has_space=`$ECHO "$complete" | $GREP " "`
21917      if test "x$has_space" != x; then
21918        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21919$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21920      fi
21921      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21922    fi
21923  fi
21924
21925  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21926  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21927  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21928  # "foo.exe" is OK but "foo" is an error.
21929  #
21930  # This test is therefore slightly more accurate than "test -f" to check for file presence.
21931  # It is also a way to make sure we got the proper file name for the real test later on.
21932  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21933  if test "x$test_shortpath" = x; then
21934    # Short path failed, file does not exist as specified.
21935    # Try adding .exe or .cmd
21936    if test -f "${new_path}.exe"; then
21937       input_to_shortpath="${new_path}.exe"
21938    elif test -f "${new_path}.cmd"; then
21939       input_to_shortpath="${new_path}.cmd"
21940    else
21941      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
21942$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
21943      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21944$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21945      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21946    fi
21947  else
21948    input_to_shortpath="$new_path"
21949  fi
21950
21951  # Call helper function which possibly converts this using DOS-style short mode.
21952  # If so, the updated path is stored in $new_path.
21953  new_path="$input_to_shortpath"
21954
21955  input_path="$input_to_shortpath"
21956  # Check if we need to convert this using DOS-style short mode. If the path
21957  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21958  # take no chances and rewrite it.
21959  # Note: m4 eats our [], so we need to use [ and ] instead.
21960  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21961  if test "x$has_forbidden_chars" != x; then
21962    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21963    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21964    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21965    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21966      # Going to short mode and back again did indeed matter. Since short mode is
21967      # case insensitive, let's make it lowercase to improve readability.
21968      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21969      # Now convert it back to Unix-stile (cygpath)
21970      input_path=`$CYGPATH -u "$shortmode_path"`
21971      new_path="$input_path"
21972    fi
21973  fi
21974
21975  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21976  if test "x$test_cygdrive_prefix" = x; then
21977    # As a simple fix, exclude /usr/bin since it's not a real path.
21978    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21979      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21980      # a path prefixed by /cygdrive for fixpath to work.
21981      new_path="$CYGWIN_ROOT_PATH$input_path"
21982    fi
21983  fi
21984
21985  # remove trailing .exe if any
21986  new_path="${new_path/%.exe/}"
21987
21988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21989
21990  # First separate the path from the arguments. This will split at the first
21991  # space.
21992  complete="$OBJC"
21993  path="${complete%% *}"
21994  tmp="$complete EOL"
21995  arguments="${tmp#* }"
21996
21997  # Input might be given as Windows format, start by converting to
21998  # unix format.
21999  new_path="$path"
22000
22001  windows_path="$new_path"
22002  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22003    unix_path=`$CYGPATH -u "$windows_path"`
22004    new_path="$unix_path"
22005  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22006    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22007    new_path="$unix_path"
22008  fi
22009
22010
22011  # Now try to locate executable using which
22012  new_path=`$WHICH "$new_path" 2> /dev/null`
22013
22014  if test "x$new_path" = x; then
22015    # Oops. Which didn't find the executable.
22016    # The splitting of arguments from the executable at a space might have been incorrect,
22017    # since paths with space are more likely in Windows. Give it another try with the whole
22018    # argument.
22019    path="$complete"
22020    arguments="EOL"
22021    new_path="$path"
22022
22023  windows_path="$new_path"
22024  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22025    unix_path=`$CYGPATH -u "$windows_path"`
22026    new_path="$unix_path"
22027  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22028    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22029    new_path="$unix_path"
22030  fi
22031
22032
22033    new_path=`$WHICH "$new_path" 2> /dev/null`
22034
22035    if test "x$new_path" = x; then
22036      # It's still not found. Now this is an unrecoverable error.
22037      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22038$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22039      has_space=`$ECHO "$complete" | $GREP " "`
22040      if test "x$has_space" != x; then
22041        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22042$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22043      fi
22044      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22045    fi
22046  fi
22047
22048  # Now new_path has a complete unix path to the binary
22049  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22050    # Keep paths in /bin as-is, but remove trailing .exe if any
22051    new_path="${new_path/%.exe/}"
22052    # Do not save /bin paths to all_fixpath_prefixes!
22053  else
22054    # Not in mixed or Windows style, start by that.
22055    new_path=`cmd //c echo $new_path`
22056
22057  input_path="$new_path"
22058  # Check if we need to convert this using DOS-style short mode. If the path
22059  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22060  # take no chances and rewrite it.
22061  # Note: m4 eats our [], so we need to use [ and ] instead.
22062  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22063  if test "x$has_forbidden_chars" != x; then
22064    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22065    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22066  fi
22067
22068    # Output is in $new_path
22069
22070  windows_path="$new_path"
22071  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22072    unix_path=`$CYGPATH -u "$windows_path"`
22073    new_path="$unix_path"
22074  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22075    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22076    new_path="$unix_path"
22077  fi
22078
22079    # remove trailing .exe if any
22080    new_path="${new_path/%.exe/}"
22081
22082    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22083    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22084  fi
22085
22086  else
22087    # We're on a posix platform. Hooray! :)
22088    # First separate the path from the arguments. This will split at the first
22089    # space.
22090    complete="$OBJC"
22091    path="${complete%% *}"
22092    tmp="$complete EOL"
22093    arguments="${tmp#* }"
22094
22095    # Cannot rely on the command "which" here since it doesn't always work.
22096    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22097    if test -z "$is_absolute_path"; then
22098      # Path to executable is not absolute. Find it.
22099      IFS_save="$IFS"
22100      IFS=:
22101      for p in $PATH; do
22102        if test -f "$p/$path" && test -x "$p/$path"; then
22103          new_path="$p/$path"
22104          break
22105        fi
22106      done
22107      IFS="$IFS_save"
22108    else
22109      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
22110$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
22111      new_path="$path"
22112    fi
22113
22114    if test "x$new_path" = x; then
22115        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22116$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22117        has_space=`$ECHO "$complete" | $GREP " "`
22118        if test "x$has_space" != x; then
22119          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22120$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22121        fi
22122        as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22123      fi
22124  fi
22125
22126      # Now join together the path and the arguments once again
22127      if test "x$arguments" != xEOL; then
22128        new_complete="$new_path ${arguments% *}"
22129      else
22130        new_complete="$new_path"
22131      fi
22132
22133  if test "x$complete" != "x$new_complete"; then
22134      OBJC="$new_complete"
22135      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
22136$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
22137    fi
22138
22139else
22140    OBJC=
22141fi
22142
22143# Restore the flags to the user specified values.
22144# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
22145CFLAGS="$ORG_CFLAGS"
22146CXXFLAGS="$ORG_CXXFLAGS"
22147OBJCFLAGS="$ORG_OBJCFLAGS"
22148
22149LD="$CC"
22150LDEXE="$CC"
22151LDCXX="$CXX"
22152LDEXECXX="$CXX"
22153
22154# LDEXE is the linker to use, when creating executables.
22155
22156# Linking C++ libraries.
22157
22158# Linking C++ executables.
22159
22160
22161if test "x$OPENJDK_TARGET_OS" != xwindows; then
22162    if test -n "$ac_tool_prefix"; then
22163  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
22164set dummy ${ac_tool_prefix}ar; ac_word=$2
22165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22166$as_echo_n "checking for $ac_word... " >&6; }
22167if ${ac_cv_prog_AR+:} false; then :
22168  $as_echo_n "(cached) " >&6
22169else
22170  if test -n "$AR"; then
22171  ac_cv_prog_AR="$AR" # Let the user override the test.
22172else
22173as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22174for as_dir in $PATH
22175do
22176  IFS=$as_save_IFS
22177  test -z "$as_dir" && as_dir=.
22178    for ac_exec_ext in '' $ac_executable_extensions; do
22179  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22180    ac_cv_prog_AR="${ac_tool_prefix}ar"
22181    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22182    break 2
22183  fi
22184done
22185  done
22186IFS=$as_save_IFS
22187
22188fi
22189fi
22190AR=$ac_cv_prog_AR
22191if test -n "$AR"; then
22192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
22193$as_echo "$AR" >&6; }
22194else
22195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22196$as_echo "no" >&6; }
22197fi
22198
22199
22200fi
22201if test -z "$ac_cv_prog_AR"; then
22202  ac_ct_AR=$AR
22203  # Extract the first word of "ar", so it can be a program name with args.
22204set dummy ar; ac_word=$2
22205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22206$as_echo_n "checking for $ac_word... " >&6; }
22207if ${ac_cv_prog_ac_ct_AR+:} false; then :
22208  $as_echo_n "(cached) " >&6
22209else
22210  if test -n "$ac_ct_AR"; then
22211  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
22212else
22213as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22214for as_dir in $PATH
22215do
22216  IFS=$as_save_IFS
22217  test -z "$as_dir" && as_dir=.
22218    for ac_exec_ext in '' $ac_executable_extensions; do
22219  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22220    ac_cv_prog_ac_ct_AR="ar"
22221    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22222    break 2
22223  fi
22224done
22225  done
22226IFS=$as_save_IFS
22227
22228fi
22229fi
22230ac_ct_AR=$ac_cv_prog_ac_ct_AR
22231if test -n "$ac_ct_AR"; then
22232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
22233$as_echo "$ac_ct_AR" >&6; }
22234else
22235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22236$as_echo "no" >&6; }
22237fi
22238
22239  if test "x$ac_ct_AR" = x; then
22240    AR=""
22241  else
22242    case $cross_compiling:$ac_tool_warned in
22243yes:)
22244{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22245$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22246ac_tool_warned=yes ;;
22247esac
22248    AR=$ac_ct_AR
22249  fi
22250else
22251  AR="$ac_cv_prog_AR"
22252fi
22253
22254
22255  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22256
22257  # First separate the path from the arguments. This will split at the first
22258  # space.
22259  complete="$AR"
22260  path="${complete%% *}"
22261  tmp="$complete EOL"
22262  arguments="${tmp#* }"
22263
22264  # Input might be given as Windows format, start by converting to
22265  # unix format.
22266  new_path=`$CYGPATH -u "$path"`
22267
22268  # Now try to locate executable using which
22269  new_path=`$WHICH "$new_path" 2> /dev/null`
22270  # bat and cmd files are not always considered executable in cygwin causing which
22271  # to not find them
22272  if test "x$new_path" = x \
22273           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22274           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22275    new_path=`$CYGPATH -u "$path"`
22276  fi
22277  if test "x$new_path" = x; then
22278    # Oops. Which didn't find the executable.
22279    # The splitting of arguments from the executable at a space might have been incorrect,
22280    # since paths with space are more likely in Windows. Give it another try with the whole
22281    # argument.
22282    path="$complete"
22283    arguments="EOL"
22284    new_path=`$CYGPATH -u "$path"`
22285    new_path=`$WHICH "$new_path" 2> /dev/null`
22286    # bat and cmd files are not always considered executable in cygwin causing which
22287    # to not find them
22288    if test "x$new_path" = x \
22289             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22290             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22291      new_path=`$CYGPATH -u "$path"`
22292    fi
22293    if test "x$new_path" = x; then
22294      # It's still not found. Now this is an unrecoverable error.
22295      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22296$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22297      has_space=`$ECHO "$complete" | $GREP " "`
22298      if test "x$has_space" != x; then
22299        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22300$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22301      fi
22302      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22303    fi
22304  fi
22305
22306  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22307  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22308  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22309  # "foo.exe" is OK but "foo" is an error.
22310  #
22311  # This test is therefore slightly more accurate than "test -f" to check for file presence.
22312  # It is also a way to make sure we got the proper file name for the real test later on.
22313  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22314  if test "x$test_shortpath" = x; then
22315    # Short path failed, file does not exist as specified.
22316    # Try adding .exe or .cmd
22317    if test -f "${new_path}.exe"; then
22318       input_to_shortpath="${new_path}.exe"
22319    elif test -f "${new_path}.cmd"; then
22320       input_to_shortpath="${new_path}.cmd"
22321    else
22322      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22323$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22324      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22325$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22326      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22327    fi
22328  else
22329    input_to_shortpath="$new_path"
22330  fi
22331
22332  # Call helper function which possibly converts this using DOS-style short mode.
22333  # If so, the updated path is stored in $new_path.
22334  new_path="$input_to_shortpath"
22335
22336  input_path="$input_to_shortpath"
22337  # Check if we need to convert this using DOS-style short mode. If the path
22338  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22339  # take no chances and rewrite it.
22340  # Note: m4 eats our [], so we need to use [ and ] instead.
22341  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22342  if test "x$has_forbidden_chars" != x; then
22343    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22344    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22345    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22346    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22347      # Going to short mode and back again did indeed matter. Since short mode is
22348      # case insensitive, let's make it lowercase to improve readability.
22349      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22350      # Now convert it back to Unix-stile (cygpath)
22351      input_path=`$CYGPATH -u "$shortmode_path"`
22352      new_path="$input_path"
22353    fi
22354  fi
22355
22356  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22357  if test "x$test_cygdrive_prefix" = x; then
22358    # As a simple fix, exclude /usr/bin since it's not a real path.
22359    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22360      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22361      # a path prefixed by /cygdrive for fixpath to work.
22362      new_path="$CYGWIN_ROOT_PATH$input_path"
22363    fi
22364  fi
22365
22366  # remove trailing .exe if any
22367  new_path="${new_path/%.exe/}"
22368
22369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22370
22371  # First separate the path from the arguments. This will split at the first
22372  # space.
22373  complete="$AR"
22374  path="${complete%% *}"
22375  tmp="$complete EOL"
22376  arguments="${tmp#* }"
22377
22378  # Input might be given as Windows format, start by converting to
22379  # unix format.
22380  new_path="$path"
22381
22382  windows_path="$new_path"
22383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22384    unix_path=`$CYGPATH -u "$windows_path"`
22385    new_path="$unix_path"
22386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22387    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22388    new_path="$unix_path"
22389  fi
22390
22391
22392  # Now try to locate executable using which
22393  new_path=`$WHICH "$new_path" 2> /dev/null`
22394
22395  if test "x$new_path" = x; then
22396    # Oops. Which didn't find the executable.
22397    # The splitting of arguments from the executable at a space might have been incorrect,
22398    # since paths with space are more likely in Windows. Give it another try with the whole
22399    # argument.
22400    path="$complete"
22401    arguments="EOL"
22402    new_path="$path"
22403
22404  windows_path="$new_path"
22405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22406    unix_path=`$CYGPATH -u "$windows_path"`
22407    new_path="$unix_path"
22408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22409    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22410    new_path="$unix_path"
22411  fi
22412
22413
22414    new_path=`$WHICH "$new_path" 2> /dev/null`
22415
22416    if test "x$new_path" = x; then
22417      # It's still not found. Now this is an unrecoverable error.
22418      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22419$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22420      has_space=`$ECHO "$complete" | $GREP " "`
22421      if test "x$has_space" != x; then
22422        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22423$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22424      fi
22425      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22426    fi
22427  fi
22428
22429  # Now new_path has a complete unix path to the binary
22430  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22431    # Keep paths in /bin as-is, but remove trailing .exe if any
22432    new_path="${new_path/%.exe/}"
22433    # Do not save /bin paths to all_fixpath_prefixes!
22434  else
22435    # Not in mixed or Windows style, start by that.
22436    new_path=`cmd //c echo $new_path`
22437
22438  input_path="$new_path"
22439  # Check if we need to convert this using DOS-style short mode. If the path
22440  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22441  # take no chances and rewrite it.
22442  # Note: m4 eats our [], so we need to use [ and ] instead.
22443  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22444  if test "x$has_forbidden_chars" != x; then
22445    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22446    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22447  fi
22448
22449    # Output is in $new_path
22450
22451  windows_path="$new_path"
22452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22453    unix_path=`$CYGPATH -u "$windows_path"`
22454    new_path="$unix_path"
22455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22456    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22457    new_path="$unix_path"
22458  fi
22459
22460    # remove trailing .exe if any
22461    new_path="${new_path/%.exe/}"
22462
22463    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22464    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22465  fi
22466
22467  else
22468    # We're on a posix platform. Hooray! :)
22469    # First separate the path from the arguments. This will split at the first
22470    # space.
22471    complete="$AR"
22472    path="${complete%% *}"
22473    tmp="$complete EOL"
22474    arguments="${tmp#* }"
22475
22476    # Cannot rely on the command "which" here since it doesn't always work.
22477    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22478    if test -z "$is_absolute_path"; then
22479      # Path to executable is not absolute. Find it.
22480      IFS_save="$IFS"
22481      IFS=:
22482      for p in $PATH; do
22483        if test -f "$p/$path" && test -x "$p/$path"; then
22484          new_path="$p/$path"
22485          break
22486        fi
22487      done
22488      IFS="$IFS_save"
22489    else
22490      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
22491$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
22492      new_path="$path"
22493    fi
22494
22495    if test "x$new_path" = x; then
22496        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22497$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22498        has_space=`$ECHO "$complete" | $GREP " "`
22499        if test "x$has_space" != x; then
22500          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22501$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22502        fi
22503        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22504      fi
22505  fi
22506
22507      # Now join together the path and the arguments once again
22508      if test "x$arguments" != xEOL; then
22509        new_complete="$new_path ${arguments% *}"
22510      else
22511        new_complete="$new_path"
22512      fi
22513
22514  if test "x$complete" != "x$new_complete"; then
22515      AR="$new_complete"
22516      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
22517$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
22518    fi
22519
22520fi
22521if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22522    ARFLAGS="-r"
22523else
22524    ARFLAGS=""
22525fi
22526
22527
22528# For hotspot, we need these in Windows mixed path; other platforms keep them the same
22529HOTSPOT_CXX="$CXX"
22530HOTSPOT_LD="$LD"
22531
22532
22533
22534COMPILER_NAME=gcc
22535COMPILER_TYPE=CC
22536if test "x$OPENJDK_TARGET_OS" = xwindows; then :
22537
22538    # For now, assume that we are always compiling using cl.exe.
22539    CC_OUT_OPTION=-Fo
22540    EXE_OUT_OPTION=-out:
22541    LD_OUT_OPTION=-out:
22542    AR_OUT_OPTION=-out:
22543    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
22544    # program for something completely different.
22545    # Extract the first word of "link", so it can be a program name with args.
22546set dummy link; ac_word=$2
22547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22548$as_echo_n "checking for $ac_word... " >&6; }
22549if ${ac_cv_prog_WINLD+:} false; then :
22550  $as_echo_n "(cached) " >&6
22551else
22552  if test -n "$WINLD"; then
22553  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
22554else
22555  ac_prog_rejected=no
22556as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22557for as_dir in $PATH
22558do
22559  IFS=$as_save_IFS
22560  test -z "$as_dir" && as_dir=.
22561    for ac_exec_ext in '' $ac_executable_extensions; do
22562  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22563    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
22564       ac_prog_rejected=yes
22565       continue
22566     fi
22567    ac_cv_prog_WINLD="link"
22568    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22569    break 2
22570  fi
22571done
22572  done
22573IFS=$as_save_IFS
22574
22575if test $ac_prog_rejected = yes; then
22576  # We found a bogon in the path, so make sure we never use it.
22577  set dummy $ac_cv_prog_WINLD
22578  shift
22579  if test $# != 0; then
22580    # We chose a different compiler from the bogus one.
22581    # However, it has the same basename, so the bogon will be chosen
22582    # first if we set WINLD to just the basename; use the full file name.
22583    shift
22584    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
22585  fi
22586fi
22587fi
22588fi
22589WINLD=$ac_cv_prog_WINLD
22590if test -n "$WINLD"; then
22591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
22592$as_echo "$WINLD" >&6; }
22593else
22594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22595$as_echo "no" >&6; }
22596fi
22597
22598
22599    # Since we must ignore the first found link, WINLD will contain
22600    # the full path to the link.exe program.
22601
22602  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22603
22604  # First separate the path from the arguments. This will split at the first
22605  # space.
22606  complete="$WINLD"
22607  path="${complete%% *}"
22608  tmp="$complete EOL"
22609  arguments="${tmp#* }"
22610
22611  # Input might be given as Windows format, start by converting to
22612  # unix format.
22613  new_path=`$CYGPATH -u "$path"`
22614
22615  # Now try to locate executable using which
22616  new_path=`$WHICH "$new_path" 2> /dev/null`
22617  # bat and cmd files are not always considered executable in cygwin causing which
22618  # to not find them
22619  if test "x$new_path" = x \
22620           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22621           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22622    new_path=`$CYGPATH -u "$path"`
22623  fi
22624  if test "x$new_path" = x; then
22625    # Oops. Which didn't find the executable.
22626    # The splitting of arguments from the executable at a space might have been incorrect,
22627    # since paths with space are more likely in Windows. Give it another try with the whole
22628    # argument.
22629    path="$complete"
22630    arguments="EOL"
22631    new_path=`$CYGPATH -u "$path"`
22632    new_path=`$WHICH "$new_path" 2> /dev/null`
22633    # bat and cmd files are not always considered executable in cygwin causing which
22634    # to not find them
22635    if test "x$new_path" = x \
22636             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22637             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22638      new_path=`$CYGPATH -u "$path"`
22639    fi
22640    if test "x$new_path" = x; then
22641      # It's still not found. Now this is an unrecoverable error.
22642      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22643$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22644      has_space=`$ECHO "$complete" | $GREP " "`
22645      if test "x$has_space" != x; then
22646        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22647$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22648      fi
22649      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22650    fi
22651  fi
22652
22653  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22654  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22655  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22656  # "foo.exe" is OK but "foo" is an error.
22657  #
22658  # This test is therefore slightly more accurate than "test -f" to check for file presence.
22659  # It is also a way to make sure we got the proper file name for the real test later on.
22660  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22661  if test "x$test_shortpath" = x; then
22662    # Short path failed, file does not exist as specified.
22663    # Try adding .exe or .cmd
22664    if test -f "${new_path}.exe"; then
22665       input_to_shortpath="${new_path}.exe"
22666    elif test -f "${new_path}.cmd"; then
22667       input_to_shortpath="${new_path}.cmd"
22668    else
22669      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
22670$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
22671      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22672$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22673      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22674    fi
22675  else
22676    input_to_shortpath="$new_path"
22677  fi
22678
22679  # Call helper function which possibly converts this using DOS-style short mode.
22680  # If so, the updated path is stored in $new_path.
22681  new_path="$input_to_shortpath"
22682
22683  input_path="$input_to_shortpath"
22684  # Check if we need to convert this using DOS-style short mode. If the path
22685  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22686  # take no chances and rewrite it.
22687  # Note: m4 eats our [], so we need to use [ and ] instead.
22688  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22689  if test "x$has_forbidden_chars" != x; then
22690    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22691    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22692    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22693    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22694      # Going to short mode and back again did indeed matter. Since short mode is
22695      # case insensitive, let's make it lowercase to improve readability.
22696      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22697      # Now convert it back to Unix-stile (cygpath)
22698      input_path=`$CYGPATH -u "$shortmode_path"`
22699      new_path="$input_path"
22700    fi
22701  fi
22702
22703  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22704  if test "x$test_cygdrive_prefix" = x; then
22705    # As a simple fix, exclude /usr/bin since it's not a real path.
22706    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22707      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22708      # a path prefixed by /cygdrive for fixpath to work.
22709      new_path="$CYGWIN_ROOT_PATH$input_path"
22710    fi
22711  fi
22712
22713  # remove trailing .exe if any
22714  new_path="${new_path/%.exe/}"
22715
22716  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22717
22718  # First separate the path from the arguments. This will split at the first
22719  # space.
22720  complete="$WINLD"
22721  path="${complete%% *}"
22722  tmp="$complete EOL"
22723  arguments="${tmp#* }"
22724
22725  # Input might be given as Windows format, start by converting to
22726  # unix format.
22727  new_path="$path"
22728
22729  windows_path="$new_path"
22730  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22731    unix_path=`$CYGPATH -u "$windows_path"`
22732    new_path="$unix_path"
22733  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22734    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22735    new_path="$unix_path"
22736  fi
22737
22738
22739  # Now try to locate executable using which
22740  new_path=`$WHICH "$new_path" 2> /dev/null`
22741
22742  if test "x$new_path" = x; then
22743    # Oops. Which didn't find the executable.
22744    # The splitting of arguments from the executable at a space might have been incorrect,
22745    # since paths with space are more likely in Windows. Give it another try with the whole
22746    # argument.
22747    path="$complete"
22748    arguments="EOL"
22749    new_path="$path"
22750
22751  windows_path="$new_path"
22752  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22753    unix_path=`$CYGPATH -u "$windows_path"`
22754    new_path="$unix_path"
22755  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22756    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22757    new_path="$unix_path"
22758  fi
22759
22760
22761    new_path=`$WHICH "$new_path" 2> /dev/null`
22762
22763    if test "x$new_path" = x; then
22764      # It's still not found. Now this is an unrecoverable error.
22765      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22766$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22767      has_space=`$ECHO "$complete" | $GREP " "`
22768      if test "x$has_space" != x; then
22769        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22770$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22771      fi
22772      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22773    fi
22774  fi
22775
22776  # Now new_path has a complete unix path to the binary
22777  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22778    # Keep paths in /bin as-is, but remove trailing .exe if any
22779    new_path="${new_path/%.exe/}"
22780    # Do not save /bin paths to all_fixpath_prefixes!
22781  else
22782    # Not in mixed or Windows style, start by that.
22783    new_path=`cmd //c echo $new_path`
22784
22785  input_path="$new_path"
22786  # Check if we need to convert this using DOS-style short mode. If the path
22787  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22788  # take no chances and rewrite it.
22789  # Note: m4 eats our [], so we need to use [ and ] instead.
22790  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22791  if test "x$has_forbidden_chars" != x; then
22792    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22793    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22794  fi
22795
22796    # Output is in $new_path
22797
22798  windows_path="$new_path"
22799  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22800    unix_path=`$CYGPATH -u "$windows_path"`
22801    new_path="$unix_path"
22802  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22803    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22804    new_path="$unix_path"
22805  fi
22806
22807    # remove trailing .exe if any
22808    new_path="${new_path/%.exe/}"
22809
22810    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22811    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22812  fi
22813
22814  else
22815    # We're on a posix platform. Hooray! :)
22816    # First separate the path from the arguments. This will split at the first
22817    # space.
22818    complete="$WINLD"
22819    path="${complete%% *}"
22820    tmp="$complete EOL"
22821    arguments="${tmp#* }"
22822
22823    # Cannot rely on the command "which" here since it doesn't always work.
22824    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22825    if test -z "$is_absolute_path"; then
22826      # Path to executable is not absolute. Find it.
22827      IFS_save="$IFS"
22828      IFS=:
22829      for p in $PATH; do
22830        if test -f "$p/$path" && test -x "$p/$path"; then
22831          new_path="$p/$path"
22832          break
22833        fi
22834      done
22835      IFS="$IFS_save"
22836    else
22837      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
22838$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
22839      new_path="$path"
22840    fi
22841
22842    if test "x$new_path" = x; then
22843        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22844$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22845        has_space=`$ECHO "$complete" | $GREP " "`
22846        if test "x$has_space" != x; then
22847          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22848$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22849        fi
22850        as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22851      fi
22852  fi
22853
22854      # Now join together the path and the arguments once again
22855      if test "x$arguments" != xEOL; then
22856        new_complete="$new_path ${arguments% *}"
22857      else
22858        new_complete="$new_path"
22859      fi
22860
22861  if test "x$complete" != "x$new_complete"; then
22862      WINLD="$new_complete"
22863      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
22864$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
22865    fi
22866
22867    printf "Windows linker was found at $WINLD\n"
22868    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
22869$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
22870    "$WINLD" --version > /dev/null
22871    if test $? -eq 0 ; then
22872      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22873$as_echo "no" >&6; }
22874      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
22875    else
22876      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22877$as_echo "yes" >&6; }
22878    fi
22879    LD="$WINLD"
22880    LDEXE="$WINLD"
22881    LDCXX="$WINLD"
22882    LDEXECXX="$WINLD"
22883
22884    # Extract the first word of "mt", so it can be a program name with args.
22885set dummy mt; ac_word=$2
22886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22887$as_echo_n "checking for $ac_word... " >&6; }
22888if ${ac_cv_prog_MT+:} false; then :
22889  $as_echo_n "(cached) " >&6
22890else
22891  if test -n "$MT"; then
22892  ac_cv_prog_MT="$MT" # Let the user override the test.
22893else
22894  ac_prog_rejected=no
22895as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22896for as_dir in $PATH
22897do
22898  IFS=$as_save_IFS
22899  test -z "$as_dir" && as_dir=.
22900    for ac_exec_ext in '' $ac_executable_extensions; do
22901  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22902    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
22903       ac_prog_rejected=yes
22904       continue
22905     fi
22906    ac_cv_prog_MT="mt"
22907    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22908    break 2
22909  fi
22910done
22911  done
22912IFS=$as_save_IFS
22913
22914if test $ac_prog_rejected = yes; then
22915  # We found a bogon in the path, so make sure we never use it.
22916  set dummy $ac_cv_prog_MT
22917  shift
22918  if test $# != 0; then
22919    # We chose a different compiler from the bogus one.
22920    # However, it has the same basename, so the bogon will be chosen
22921    # first if we set MT to just the basename; use the full file name.
22922    shift
22923    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
22924  fi
22925fi
22926fi
22927fi
22928MT=$ac_cv_prog_MT
22929if test -n "$MT"; then
22930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
22931$as_echo "$MT" >&6; }
22932else
22933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22934$as_echo "no" >&6; }
22935fi
22936
22937
22938
22939  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22940
22941  # First separate the path from the arguments. This will split at the first
22942  # space.
22943  complete="$MT"
22944  path="${complete%% *}"
22945  tmp="$complete EOL"
22946  arguments="${tmp#* }"
22947
22948  # Input might be given as Windows format, start by converting to
22949  # unix format.
22950  new_path=`$CYGPATH -u "$path"`
22951
22952  # Now try to locate executable using which
22953  new_path=`$WHICH "$new_path" 2> /dev/null`
22954  # bat and cmd files are not always considered executable in cygwin causing which
22955  # to not find them
22956  if test "x$new_path" = x \
22957           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22958           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22959    new_path=`$CYGPATH -u "$path"`
22960  fi
22961  if test "x$new_path" = x; then
22962    # Oops. Which didn't find the executable.
22963    # The splitting of arguments from the executable at a space might have been incorrect,
22964    # since paths with space are more likely in Windows. Give it another try with the whole
22965    # argument.
22966    path="$complete"
22967    arguments="EOL"
22968    new_path=`$CYGPATH -u "$path"`
22969    new_path=`$WHICH "$new_path" 2> /dev/null`
22970    # bat and cmd files are not always considered executable in cygwin causing which
22971    # to not find them
22972    if test "x$new_path" = x \
22973             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22974             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22975      new_path=`$CYGPATH -u "$path"`
22976    fi
22977    if test "x$new_path" = x; then
22978      # It's still not found. Now this is an unrecoverable error.
22979      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22980$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22981      has_space=`$ECHO "$complete" | $GREP " "`
22982      if test "x$has_space" != x; then
22983        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22984$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22985      fi
22986      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22987    fi
22988  fi
22989
22990  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22991  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22992  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22993  # "foo.exe" is OK but "foo" is an error.
22994  #
22995  # This test is therefore slightly more accurate than "test -f" to check for file presence.
22996  # It is also a way to make sure we got the proper file name for the real test later on.
22997  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22998  if test "x$test_shortpath" = x; then
22999    # Short path failed, file does not exist as specified.
23000    # Try adding .exe or .cmd
23001    if test -f "${new_path}.exe"; then
23002       input_to_shortpath="${new_path}.exe"
23003    elif test -f "${new_path}.cmd"; then
23004       input_to_shortpath="${new_path}.cmd"
23005    else
23006      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
23007$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
23008      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23009$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23010      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23011    fi
23012  else
23013    input_to_shortpath="$new_path"
23014  fi
23015
23016  # Call helper function which possibly converts this using DOS-style short mode.
23017  # If so, the updated path is stored in $new_path.
23018  new_path="$input_to_shortpath"
23019
23020  input_path="$input_to_shortpath"
23021  # Check if we need to convert this using DOS-style short mode. If the path
23022  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23023  # take no chances and rewrite it.
23024  # Note: m4 eats our [], so we need to use [ and ] instead.
23025  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23026  if test "x$has_forbidden_chars" != x; then
23027    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23028    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23029    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23030    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23031      # Going to short mode and back again did indeed matter. Since short mode is
23032      # case insensitive, let's make it lowercase to improve readability.
23033      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23034      # Now convert it back to Unix-stile (cygpath)
23035      input_path=`$CYGPATH -u "$shortmode_path"`
23036      new_path="$input_path"
23037    fi
23038  fi
23039
23040  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23041  if test "x$test_cygdrive_prefix" = x; then
23042    # As a simple fix, exclude /usr/bin since it's not a real path.
23043    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23044      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23045      # a path prefixed by /cygdrive for fixpath to work.
23046      new_path="$CYGWIN_ROOT_PATH$input_path"
23047    fi
23048  fi
23049
23050  # remove trailing .exe if any
23051  new_path="${new_path/%.exe/}"
23052
23053  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23054
23055  # First separate the path from the arguments. This will split at the first
23056  # space.
23057  complete="$MT"
23058  path="${complete%% *}"
23059  tmp="$complete EOL"
23060  arguments="${tmp#* }"
23061
23062  # Input might be given as Windows format, start by converting to
23063  # unix format.
23064  new_path="$path"
23065
23066  windows_path="$new_path"
23067  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23068    unix_path=`$CYGPATH -u "$windows_path"`
23069    new_path="$unix_path"
23070  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23071    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23072    new_path="$unix_path"
23073  fi
23074
23075
23076  # Now try to locate executable using which
23077  new_path=`$WHICH "$new_path" 2> /dev/null`
23078
23079  if test "x$new_path" = x; then
23080    # Oops. Which didn't find the executable.
23081    # The splitting of arguments from the executable at a space might have been incorrect,
23082    # since paths with space are more likely in Windows. Give it another try with the whole
23083    # argument.
23084    path="$complete"
23085    arguments="EOL"
23086    new_path="$path"
23087
23088  windows_path="$new_path"
23089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23090    unix_path=`$CYGPATH -u "$windows_path"`
23091    new_path="$unix_path"
23092  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23093    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23094    new_path="$unix_path"
23095  fi
23096
23097
23098    new_path=`$WHICH "$new_path" 2> /dev/null`
23099
23100    if test "x$new_path" = x; then
23101      # It's still not found. Now this is an unrecoverable error.
23102      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23103$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23104      has_space=`$ECHO "$complete" | $GREP " "`
23105      if test "x$has_space" != x; then
23106        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23107$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23108      fi
23109      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23110    fi
23111  fi
23112
23113  # Now new_path has a complete unix path to the binary
23114  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23115    # Keep paths in /bin as-is, but remove trailing .exe if any
23116    new_path="${new_path/%.exe/}"
23117    # Do not save /bin paths to all_fixpath_prefixes!
23118  else
23119    # Not in mixed or Windows style, start by that.
23120    new_path=`cmd //c echo $new_path`
23121
23122  input_path="$new_path"
23123  # Check if we need to convert this using DOS-style short mode. If the path
23124  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23125  # take no chances and rewrite it.
23126  # Note: m4 eats our [], so we need to use [ and ] instead.
23127  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23128  if test "x$has_forbidden_chars" != x; then
23129    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23130    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23131  fi
23132
23133    # Output is in $new_path
23134
23135  windows_path="$new_path"
23136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23137    unix_path=`$CYGPATH -u "$windows_path"`
23138    new_path="$unix_path"
23139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23140    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23141    new_path="$unix_path"
23142  fi
23143
23144    # remove trailing .exe if any
23145    new_path="${new_path/%.exe/}"
23146
23147    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23148    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23149  fi
23150
23151  else
23152    # We're on a posix platform. Hooray! :)
23153    # First separate the path from the arguments. This will split at the first
23154    # space.
23155    complete="$MT"
23156    path="${complete%% *}"
23157    tmp="$complete EOL"
23158    arguments="${tmp#* }"
23159
23160    # Cannot rely on the command "which" here since it doesn't always work.
23161    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23162    if test -z "$is_absolute_path"; then
23163      # Path to executable is not absolute. Find it.
23164      IFS_save="$IFS"
23165      IFS=:
23166      for p in $PATH; do
23167        if test -f "$p/$path" && test -x "$p/$path"; then
23168          new_path="$p/$path"
23169          break
23170        fi
23171      done
23172      IFS="$IFS_save"
23173    else
23174      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
23175$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
23176      new_path="$path"
23177    fi
23178
23179    if test "x$new_path" = x; then
23180        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23181$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23182        has_space=`$ECHO "$complete" | $GREP " "`
23183        if test "x$has_space" != x; then
23184          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23185$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23186        fi
23187        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23188      fi
23189  fi
23190
23191      # Now join together the path and the arguments once again
23192      if test "x$arguments" != xEOL; then
23193        new_complete="$new_path ${arguments% *}"
23194      else
23195        new_complete="$new_path"
23196      fi
23197
23198  if test "x$complete" != "x$new_complete"; then
23199      MT="$new_complete"
23200      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
23201$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
23202    fi
23203
23204    # The resource compiler
23205    # Extract the first word of "rc", so it can be a program name with args.
23206set dummy rc; ac_word=$2
23207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23208$as_echo_n "checking for $ac_word... " >&6; }
23209if ${ac_cv_prog_RC+:} false; then :
23210  $as_echo_n "(cached) " >&6
23211else
23212  if test -n "$RC"; then
23213  ac_cv_prog_RC="$RC" # Let the user override the test.
23214else
23215  ac_prog_rejected=no
23216as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23217for as_dir in $PATH
23218do
23219  IFS=$as_save_IFS
23220  test -z "$as_dir" && as_dir=.
23221    for ac_exec_ext in '' $ac_executable_extensions; do
23222  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23223    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
23224       ac_prog_rejected=yes
23225       continue
23226     fi
23227    ac_cv_prog_RC="rc"
23228    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23229    break 2
23230  fi
23231done
23232  done
23233IFS=$as_save_IFS
23234
23235if test $ac_prog_rejected = yes; then
23236  # We found a bogon in the path, so make sure we never use it.
23237  set dummy $ac_cv_prog_RC
23238  shift
23239  if test $# != 0; then
23240    # We chose a different compiler from the bogus one.
23241    # However, it has the same basename, so the bogon will be chosen
23242    # first if we set RC to just the basename; use the full file name.
23243    shift
23244    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
23245  fi
23246fi
23247fi
23248fi
23249RC=$ac_cv_prog_RC
23250if test -n "$RC"; then
23251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23252$as_echo "$RC" >&6; }
23253else
23254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23255$as_echo "no" >&6; }
23256fi
23257
23258
23259
23260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23261
23262  # First separate the path from the arguments. This will split at the first
23263  # space.
23264  complete="$RC"
23265  path="${complete%% *}"
23266  tmp="$complete EOL"
23267  arguments="${tmp#* }"
23268
23269  # Input might be given as Windows format, start by converting to
23270  # unix format.
23271  new_path=`$CYGPATH -u "$path"`
23272
23273  # Now try to locate executable using which
23274  new_path=`$WHICH "$new_path" 2> /dev/null`
23275  # bat and cmd files are not always considered executable in cygwin causing which
23276  # to not find them
23277  if test "x$new_path" = x \
23278           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23279           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23280    new_path=`$CYGPATH -u "$path"`
23281  fi
23282  if test "x$new_path" = x; then
23283    # Oops. Which didn't find the executable.
23284    # The splitting of arguments from the executable at a space might have been incorrect,
23285    # since paths with space are more likely in Windows. Give it another try with the whole
23286    # argument.
23287    path="$complete"
23288    arguments="EOL"
23289    new_path=`$CYGPATH -u "$path"`
23290    new_path=`$WHICH "$new_path" 2> /dev/null`
23291    # bat and cmd files are not always considered executable in cygwin causing which
23292    # to not find them
23293    if test "x$new_path" = x \
23294             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23295             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23296      new_path=`$CYGPATH -u "$path"`
23297    fi
23298    if test "x$new_path" = x; then
23299      # It's still not found. Now this is an unrecoverable error.
23300      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23301$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23302      has_space=`$ECHO "$complete" | $GREP " "`
23303      if test "x$has_space" != x; then
23304        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23305$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23306      fi
23307      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23308    fi
23309  fi
23310
23311  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23312  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23313  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23314  # "foo.exe" is OK but "foo" is an error.
23315  #
23316  # This test is therefore slightly more accurate than "test -f" to check for file presence.
23317  # It is also a way to make sure we got the proper file name for the real test later on.
23318  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23319  if test "x$test_shortpath" = x; then
23320    # Short path failed, file does not exist as specified.
23321    # Try adding .exe or .cmd
23322    if test -f "${new_path}.exe"; then
23323       input_to_shortpath="${new_path}.exe"
23324    elif test -f "${new_path}.cmd"; then
23325       input_to_shortpath="${new_path}.cmd"
23326    else
23327      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23328$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23329      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23330$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23331      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23332    fi
23333  else
23334    input_to_shortpath="$new_path"
23335  fi
23336
23337  # Call helper function which possibly converts this using DOS-style short mode.
23338  # If so, the updated path is stored in $new_path.
23339  new_path="$input_to_shortpath"
23340
23341  input_path="$input_to_shortpath"
23342  # Check if we need to convert this using DOS-style short mode. If the path
23343  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23344  # take no chances and rewrite it.
23345  # Note: m4 eats our [], so we need to use [ and ] instead.
23346  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23347  if test "x$has_forbidden_chars" != x; then
23348    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23349    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23350    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23351    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23352      # Going to short mode and back again did indeed matter. Since short mode is
23353      # case insensitive, let's make it lowercase to improve readability.
23354      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23355      # Now convert it back to Unix-stile (cygpath)
23356      input_path=`$CYGPATH -u "$shortmode_path"`
23357      new_path="$input_path"
23358    fi
23359  fi
23360
23361  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23362  if test "x$test_cygdrive_prefix" = x; then
23363    # As a simple fix, exclude /usr/bin since it's not a real path.
23364    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23365      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23366      # a path prefixed by /cygdrive for fixpath to work.
23367      new_path="$CYGWIN_ROOT_PATH$input_path"
23368    fi
23369  fi
23370
23371  # remove trailing .exe if any
23372  new_path="${new_path/%.exe/}"
23373
23374  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23375
23376  # First separate the path from the arguments. This will split at the first
23377  # space.
23378  complete="$RC"
23379  path="${complete%% *}"
23380  tmp="$complete EOL"
23381  arguments="${tmp#* }"
23382
23383  # Input might be given as Windows format, start by converting to
23384  # unix format.
23385  new_path="$path"
23386
23387  windows_path="$new_path"
23388  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23389    unix_path=`$CYGPATH -u "$windows_path"`
23390    new_path="$unix_path"
23391  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23392    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23393    new_path="$unix_path"
23394  fi
23395
23396
23397  # Now try to locate executable using which
23398  new_path=`$WHICH "$new_path" 2> /dev/null`
23399
23400  if test "x$new_path" = x; then
23401    # Oops. Which didn't find the executable.
23402    # The splitting of arguments from the executable at a space might have been incorrect,
23403    # since paths with space are more likely in Windows. Give it another try with the whole
23404    # argument.
23405    path="$complete"
23406    arguments="EOL"
23407    new_path="$path"
23408
23409  windows_path="$new_path"
23410  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23411    unix_path=`$CYGPATH -u "$windows_path"`
23412    new_path="$unix_path"
23413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23414    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23415    new_path="$unix_path"
23416  fi
23417
23418
23419    new_path=`$WHICH "$new_path" 2> /dev/null`
23420
23421    if test "x$new_path" = x; then
23422      # It's still not found. Now this is an unrecoverable error.
23423      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23424$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23425      has_space=`$ECHO "$complete" | $GREP " "`
23426      if test "x$has_space" != x; then
23427        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23428$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23429      fi
23430      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23431    fi
23432  fi
23433
23434  # Now new_path has a complete unix path to the binary
23435  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23436    # Keep paths in /bin as-is, but remove trailing .exe if any
23437    new_path="${new_path/%.exe/}"
23438    # Do not save /bin paths to all_fixpath_prefixes!
23439  else
23440    # Not in mixed or Windows style, start by that.
23441    new_path=`cmd //c echo $new_path`
23442
23443  input_path="$new_path"
23444  # Check if we need to convert this using DOS-style short mode. If the path
23445  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23446  # take no chances and rewrite it.
23447  # Note: m4 eats our [], so we need to use [ and ] instead.
23448  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23449  if test "x$has_forbidden_chars" != x; then
23450    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23451    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23452  fi
23453
23454    # Output is in $new_path
23455
23456  windows_path="$new_path"
23457  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23458    unix_path=`$CYGPATH -u "$windows_path"`
23459    new_path="$unix_path"
23460  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23461    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23462    new_path="$unix_path"
23463  fi
23464
23465    # remove trailing .exe if any
23466    new_path="${new_path/%.exe/}"
23467
23468    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23469    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23470  fi
23471
23472  else
23473    # We're on a posix platform. Hooray! :)
23474    # First separate the path from the arguments. This will split at the first
23475    # space.
23476    complete="$RC"
23477    path="${complete%% *}"
23478    tmp="$complete EOL"
23479    arguments="${tmp#* }"
23480
23481    # Cannot rely on the command "which" here since it doesn't always work.
23482    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23483    if test -z "$is_absolute_path"; then
23484      # Path to executable is not absolute. Find it.
23485      IFS_save="$IFS"
23486      IFS=:
23487      for p in $PATH; do
23488        if test -f "$p/$path" && test -x "$p/$path"; then
23489          new_path="$p/$path"
23490          break
23491        fi
23492      done
23493      IFS="$IFS_save"
23494    else
23495      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
23496$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
23497      new_path="$path"
23498    fi
23499
23500    if test "x$new_path" = x; then
23501        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23502$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23503        has_space=`$ECHO "$complete" | $GREP " "`
23504        if test "x$has_space" != x; then
23505          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23506$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23507        fi
23508        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23509      fi
23510  fi
23511
23512      # Now join together the path and the arguments once again
23513      if test "x$arguments" != xEOL; then
23514        new_complete="$new_path ${arguments% *}"
23515      else
23516        new_complete="$new_path"
23517      fi
23518
23519  if test "x$complete" != "x$new_complete"; then
23520      RC="$new_complete"
23521      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
23522$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
23523    fi
23524
23525
23526    # For hotspot, we need these in Windows mixed path,
23527    # so rewrite them all. Need added .exe suffix.
23528    HOTSPOT_CXX="$CXX.exe"
23529    HOTSPOT_LD="$LD.exe"
23530    HOTSPOT_MT="$MT.exe"
23531    HOTSPOT_RC="$RC.exe"
23532
23533  unix_path="$HOTSPOT_CXX"
23534  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23535    windows_path=`$CYGPATH -m "$unix_path"`
23536    HOTSPOT_CXX="$windows_path"
23537  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23538    windows_path=`cmd //c echo $unix_path`
23539    HOTSPOT_CXX="$windows_path"
23540  fi
23541
23542
23543  unix_path="$HOTSPOT_LD"
23544  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23545    windows_path=`$CYGPATH -m "$unix_path"`
23546    HOTSPOT_LD="$windows_path"
23547  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23548    windows_path=`cmd //c echo $unix_path`
23549    HOTSPOT_LD="$windows_path"
23550  fi
23551
23552
23553  unix_path="$HOTSPOT_MT"
23554  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23555    windows_path=`$CYGPATH -m "$unix_path"`
23556    HOTSPOT_MT="$windows_path"
23557  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23558    windows_path=`cmd //c echo $unix_path`
23559    HOTSPOT_MT="$windows_path"
23560  fi
23561
23562
23563  unix_path="$HOTSPOT_RC"
23564  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23565    windows_path=`$CYGPATH -m "$unix_path"`
23566    HOTSPOT_RC="$windows_path"
23567  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23568    windows_path=`cmd //c echo $unix_path`
23569    HOTSPOT_RC="$windows_path"
23570  fi
23571
23572
23573
23574
23575    RC_FLAGS="-nologo -l 0x409 -r"
23576    if test "x$VARIANT" = xOPT; then :
23577
23578        RC_FLAGS="$RC_FLAGS -d NDEBUG"
23579
23580fi
23581
23582    # The version variables used to create RC_FLAGS may be overridden
23583    # in a custom configure script, or possibly the command line.
23584    # Let those variables be expanded at make time in spec.gmk.
23585    # The \$ are escaped to the shell, and the $(...) variables
23586    # are evaluated by make.
23587    RC_FLAGS="$RC_FLAGS \
23588        -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
23589        -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
23590        -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
23591        -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
23592        -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
23593        -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
23594        -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
23595
23596    # lib.exe is used to create static libraries.
23597    # Extract the first word of "lib", so it can be a program name with args.
23598set dummy lib; ac_word=$2
23599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23600$as_echo_n "checking for $ac_word... " >&6; }
23601if ${ac_cv_prog_WINAR+:} false; then :
23602  $as_echo_n "(cached) " >&6
23603else
23604  if test -n "$WINAR"; then
23605  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
23606else
23607as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23608for as_dir in $PATH
23609do
23610  IFS=$as_save_IFS
23611  test -z "$as_dir" && as_dir=.
23612    for ac_exec_ext in '' $ac_executable_extensions; do
23613  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23614    ac_cv_prog_WINAR="lib"
23615    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23616    break 2
23617  fi
23618done
23619  done
23620IFS=$as_save_IFS
23621
23622fi
23623fi
23624WINAR=$ac_cv_prog_WINAR
23625if test -n "$WINAR"; then
23626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
23627$as_echo "$WINAR" >&6; }
23628else
23629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23630$as_echo "no" >&6; }
23631fi
23632
23633
23634
23635  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23636
23637  # First separate the path from the arguments. This will split at the first
23638  # space.
23639  complete="$WINAR"
23640  path="${complete%% *}"
23641  tmp="$complete EOL"
23642  arguments="${tmp#* }"
23643
23644  # Input might be given as Windows format, start by converting to
23645  # unix format.
23646  new_path=`$CYGPATH -u "$path"`
23647
23648  # Now try to locate executable using which
23649  new_path=`$WHICH "$new_path" 2> /dev/null`
23650  # bat and cmd files are not always considered executable in cygwin causing which
23651  # to not find them
23652  if test "x$new_path" = x \
23653           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23654           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23655    new_path=`$CYGPATH -u "$path"`
23656  fi
23657  if test "x$new_path" = x; then
23658    # Oops. Which didn't find the executable.
23659    # The splitting of arguments from the executable at a space might have been incorrect,
23660    # since paths with space are more likely in Windows. Give it another try with the whole
23661    # argument.
23662    path="$complete"
23663    arguments="EOL"
23664    new_path=`$CYGPATH -u "$path"`
23665    new_path=`$WHICH "$new_path" 2> /dev/null`
23666    # bat and cmd files are not always considered executable in cygwin causing which
23667    # to not find them
23668    if test "x$new_path" = x \
23669             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23670             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23671      new_path=`$CYGPATH -u "$path"`
23672    fi
23673    if test "x$new_path" = x; then
23674      # It's still not found. Now this is an unrecoverable error.
23675      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23676$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23677      has_space=`$ECHO "$complete" | $GREP " "`
23678      if test "x$has_space" != x; then
23679        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23680$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23681      fi
23682      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23683    fi
23684  fi
23685
23686  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23687  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23688  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23689  # "foo.exe" is OK but "foo" is an error.
23690  #
23691  # This test is therefore slightly more accurate than "test -f" to check for file presence.
23692  # It is also a way to make sure we got the proper file name for the real test later on.
23693  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23694  if test "x$test_shortpath" = x; then
23695    # Short path failed, file does not exist as specified.
23696    # Try adding .exe or .cmd
23697    if test -f "${new_path}.exe"; then
23698       input_to_shortpath="${new_path}.exe"
23699    elif test -f "${new_path}.cmd"; then
23700       input_to_shortpath="${new_path}.cmd"
23701    else
23702      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
23703$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
23704      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23705$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23706      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23707    fi
23708  else
23709    input_to_shortpath="$new_path"
23710  fi
23711
23712  # Call helper function which possibly converts this using DOS-style short mode.
23713  # If so, the updated path is stored in $new_path.
23714  new_path="$input_to_shortpath"
23715
23716  input_path="$input_to_shortpath"
23717  # Check if we need to convert this using DOS-style short mode. If the path
23718  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23719  # take no chances and rewrite it.
23720  # Note: m4 eats our [], so we need to use [ and ] instead.
23721  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23722  if test "x$has_forbidden_chars" != x; then
23723    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23724    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23725    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23726    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23727      # Going to short mode and back again did indeed matter. Since short mode is
23728      # case insensitive, let's make it lowercase to improve readability.
23729      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23730      # Now convert it back to Unix-stile (cygpath)
23731      input_path=`$CYGPATH -u "$shortmode_path"`
23732      new_path="$input_path"
23733    fi
23734  fi
23735
23736  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23737  if test "x$test_cygdrive_prefix" = x; then
23738    # As a simple fix, exclude /usr/bin since it's not a real path.
23739    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23740      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23741      # a path prefixed by /cygdrive for fixpath to work.
23742      new_path="$CYGWIN_ROOT_PATH$input_path"
23743    fi
23744  fi
23745
23746  # remove trailing .exe if any
23747  new_path="${new_path/%.exe/}"
23748
23749  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23750
23751  # First separate the path from the arguments. This will split at the first
23752  # space.
23753  complete="$WINAR"
23754  path="${complete%% *}"
23755  tmp="$complete EOL"
23756  arguments="${tmp#* }"
23757
23758  # Input might be given as Windows format, start by converting to
23759  # unix format.
23760  new_path="$path"
23761
23762  windows_path="$new_path"
23763  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23764    unix_path=`$CYGPATH -u "$windows_path"`
23765    new_path="$unix_path"
23766  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23767    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23768    new_path="$unix_path"
23769  fi
23770
23771
23772  # Now try to locate executable using which
23773  new_path=`$WHICH "$new_path" 2> /dev/null`
23774
23775  if test "x$new_path" = x; then
23776    # Oops. Which didn't find the executable.
23777    # The splitting of arguments from the executable at a space might have been incorrect,
23778    # since paths with space are more likely in Windows. Give it another try with the whole
23779    # argument.
23780    path="$complete"
23781    arguments="EOL"
23782    new_path="$path"
23783
23784  windows_path="$new_path"
23785  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23786    unix_path=`$CYGPATH -u "$windows_path"`
23787    new_path="$unix_path"
23788  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23789    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23790    new_path="$unix_path"
23791  fi
23792
23793
23794    new_path=`$WHICH "$new_path" 2> /dev/null`
23795
23796    if test "x$new_path" = x; then
23797      # It's still not found. Now this is an unrecoverable error.
23798      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23799$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23800      has_space=`$ECHO "$complete" | $GREP " "`
23801      if test "x$has_space" != x; then
23802        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23803$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23804      fi
23805      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23806    fi
23807  fi
23808
23809  # Now new_path has a complete unix path to the binary
23810  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23811    # Keep paths in /bin as-is, but remove trailing .exe if any
23812    new_path="${new_path/%.exe/}"
23813    # Do not save /bin paths to all_fixpath_prefixes!
23814  else
23815    # Not in mixed or Windows style, start by that.
23816    new_path=`cmd //c echo $new_path`
23817
23818  input_path="$new_path"
23819  # Check if we need to convert this using DOS-style short mode. If the path
23820  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23821  # take no chances and rewrite it.
23822  # Note: m4 eats our [], so we need to use [ and ] instead.
23823  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23824  if test "x$has_forbidden_chars" != x; then
23825    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23826    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23827  fi
23828
23829    # Output is in $new_path
23830
23831  windows_path="$new_path"
23832  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23833    unix_path=`$CYGPATH -u "$windows_path"`
23834    new_path="$unix_path"
23835  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23836    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23837    new_path="$unix_path"
23838  fi
23839
23840    # remove trailing .exe if any
23841    new_path="${new_path/%.exe/}"
23842
23843    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23844    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23845  fi
23846
23847  else
23848    # We're on a posix platform. Hooray! :)
23849    # First separate the path from the arguments. This will split at the first
23850    # space.
23851    complete="$WINAR"
23852    path="${complete%% *}"
23853    tmp="$complete EOL"
23854    arguments="${tmp#* }"
23855
23856    # Cannot rely on the command "which" here since it doesn't always work.
23857    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23858    if test -z "$is_absolute_path"; then
23859      # Path to executable is not absolute. Find it.
23860      IFS_save="$IFS"
23861      IFS=:
23862      for p in $PATH; do
23863        if test -f "$p/$path" && test -x "$p/$path"; then
23864          new_path="$p/$path"
23865          break
23866        fi
23867      done
23868      IFS="$IFS_save"
23869    else
23870      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
23871$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
23872      new_path="$path"
23873    fi
23874
23875    if test "x$new_path" = x; then
23876        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23877$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23878        has_space=`$ECHO "$complete" | $GREP " "`
23879        if test "x$has_space" != x; then
23880          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23881$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23882        fi
23883        as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23884      fi
23885  fi
23886
23887      # Now join together the path and the arguments once again
23888      if test "x$arguments" != xEOL; then
23889        new_complete="$new_path ${arguments% *}"
23890      else
23891        new_complete="$new_path"
23892      fi
23893
23894  if test "x$complete" != "x$new_complete"; then
23895      WINAR="$new_complete"
23896      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
23897$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
23898    fi
23899
23900    AR="$WINAR"
23901    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
23902
23903    # Extract the first word of "dumpbin", so it can be a program name with args.
23904set dummy dumpbin; ac_word=$2
23905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23906$as_echo_n "checking for $ac_word... " >&6; }
23907if ${ac_cv_prog_DUMPBIN+:} false; then :
23908  $as_echo_n "(cached) " >&6
23909else
23910  if test -n "$DUMPBIN"; then
23911  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
23912else
23913as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23914for as_dir in $PATH
23915do
23916  IFS=$as_save_IFS
23917  test -z "$as_dir" && as_dir=.
23918    for ac_exec_ext in '' $ac_executable_extensions; do
23919  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23920    ac_cv_prog_DUMPBIN="dumpbin"
23921    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23922    break 2
23923  fi
23924done
23925  done
23926IFS=$as_save_IFS
23927
23928fi
23929fi
23930DUMPBIN=$ac_cv_prog_DUMPBIN
23931if test -n "$DUMPBIN"; then
23932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
23933$as_echo "$DUMPBIN" >&6; }
23934else
23935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23936$as_echo "no" >&6; }
23937fi
23938
23939
23940
23941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23942
23943  # First separate the path from the arguments. This will split at the first
23944  # space.
23945  complete="$DUMPBIN"
23946  path="${complete%% *}"
23947  tmp="$complete EOL"
23948  arguments="${tmp#* }"
23949
23950  # Input might be given as Windows format, start by converting to
23951  # unix format.
23952  new_path=`$CYGPATH -u "$path"`
23953
23954  # Now try to locate executable using which
23955  new_path=`$WHICH "$new_path" 2> /dev/null`
23956  # bat and cmd files are not always considered executable in cygwin causing which
23957  # to not find them
23958  if test "x$new_path" = x \
23959           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23960           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23961    new_path=`$CYGPATH -u "$path"`
23962  fi
23963  if test "x$new_path" = x; then
23964    # Oops. Which didn't find the executable.
23965    # The splitting of arguments from the executable at a space might have been incorrect,
23966    # since paths with space are more likely in Windows. Give it another try with the whole
23967    # argument.
23968    path="$complete"
23969    arguments="EOL"
23970    new_path=`$CYGPATH -u "$path"`
23971    new_path=`$WHICH "$new_path" 2> /dev/null`
23972    # bat and cmd files are not always considered executable in cygwin causing which
23973    # to not find them
23974    if test "x$new_path" = x \
23975             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23976             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23977      new_path=`$CYGPATH -u "$path"`
23978    fi
23979    if test "x$new_path" = x; then
23980      # It's still not found. Now this is an unrecoverable error.
23981      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23982$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23983      has_space=`$ECHO "$complete" | $GREP " "`
23984      if test "x$has_space" != x; then
23985        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23986$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23987      fi
23988      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23989    fi
23990  fi
23991
23992  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23993  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23994  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23995  # "foo.exe" is OK but "foo" is an error.
23996  #
23997  # This test is therefore slightly more accurate than "test -f" to check for file presence.
23998  # It is also a way to make sure we got the proper file name for the real test later on.
23999  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24000  if test "x$test_shortpath" = x; then
24001    # Short path failed, file does not exist as specified.
24002    # Try adding .exe or .cmd
24003    if test -f "${new_path}.exe"; then
24004       input_to_shortpath="${new_path}.exe"
24005    elif test -f "${new_path}.cmd"; then
24006       input_to_shortpath="${new_path}.cmd"
24007    else
24008      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
24009$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
24010      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24011$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24012      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24013    fi
24014  else
24015    input_to_shortpath="$new_path"
24016  fi
24017
24018  # Call helper function which possibly converts this using DOS-style short mode.
24019  # If so, the updated path is stored in $new_path.
24020  new_path="$input_to_shortpath"
24021
24022  input_path="$input_to_shortpath"
24023  # Check if we need to convert this using DOS-style short mode. If the path
24024  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24025  # take no chances and rewrite it.
24026  # Note: m4 eats our [], so we need to use [ and ] instead.
24027  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24028  if test "x$has_forbidden_chars" != x; then
24029    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24030    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24031    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24032    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24033      # Going to short mode and back again did indeed matter. Since short mode is
24034      # case insensitive, let's make it lowercase to improve readability.
24035      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24036      # Now convert it back to Unix-stile (cygpath)
24037      input_path=`$CYGPATH -u "$shortmode_path"`
24038      new_path="$input_path"
24039    fi
24040  fi
24041
24042  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24043  if test "x$test_cygdrive_prefix" = x; then
24044    # As a simple fix, exclude /usr/bin since it's not a real path.
24045    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24046      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24047      # a path prefixed by /cygdrive for fixpath to work.
24048      new_path="$CYGWIN_ROOT_PATH$input_path"
24049    fi
24050  fi
24051
24052  # remove trailing .exe if any
24053  new_path="${new_path/%.exe/}"
24054
24055  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24056
24057  # First separate the path from the arguments. This will split at the first
24058  # space.
24059  complete="$DUMPBIN"
24060  path="${complete%% *}"
24061  tmp="$complete EOL"
24062  arguments="${tmp#* }"
24063
24064  # Input might be given as Windows format, start by converting to
24065  # unix format.
24066  new_path="$path"
24067
24068  windows_path="$new_path"
24069  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24070    unix_path=`$CYGPATH -u "$windows_path"`
24071    new_path="$unix_path"
24072  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24073    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24074    new_path="$unix_path"
24075  fi
24076
24077
24078  # Now try to locate executable using which
24079  new_path=`$WHICH "$new_path" 2> /dev/null`
24080
24081  if test "x$new_path" = x; then
24082    # Oops. Which didn't find the executable.
24083    # The splitting of arguments from the executable at a space might have been incorrect,
24084    # since paths with space are more likely in Windows. Give it another try with the whole
24085    # argument.
24086    path="$complete"
24087    arguments="EOL"
24088    new_path="$path"
24089
24090  windows_path="$new_path"
24091  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24092    unix_path=`$CYGPATH -u "$windows_path"`
24093    new_path="$unix_path"
24094  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24095    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24096    new_path="$unix_path"
24097  fi
24098
24099
24100    new_path=`$WHICH "$new_path" 2> /dev/null`
24101
24102    if test "x$new_path" = x; then
24103      # It's still not found. Now this is an unrecoverable error.
24104      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24105$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24106      has_space=`$ECHO "$complete" | $GREP " "`
24107      if test "x$has_space" != x; then
24108        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24109$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24110      fi
24111      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24112    fi
24113  fi
24114
24115  # Now new_path has a complete unix path to the binary
24116  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24117    # Keep paths in /bin as-is, but remove trailing .exe if any
24118    new_path="${new_path/%.exe/}"
24119    # Do not save /bin paths to all_fixpath_prefixes!
24120  else
24121    # Not in mixed or Windows style, start by that.
24122    new_path=`cmd //c echo $new_path`
24123
24124  input_path="$new_path"
24125  # Check if we need to convert this using DOS-style short mode. If the path
24126  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24127  # take no chances and rewrite it.
24128  # Note: m4 eats our [], so we need to use [ and ] instead.
24129  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24130  if test "x$has_forbidden_chars" != x; then
24131    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24132    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24133  fi
24134
24135    # Output is in $new_path
24136
24137  windows_path="$new_path"
24138  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24139    unix_path=`$CYGPATH -u "$windows_path"`
24140    new_path="$unix_path"
24141  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24142    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24143    new_path="$unix_path"
24144  fi
24145
24146    # remove trailing .exe if any
24147    new_path="${new_path/%.exe/}"
24148
24149    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24150    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24151  fi
24152
24153  else
24154    # We're on a posix platform. Hooray! :)
24155    # First separate the path from the arguments. This will split at the first
24156    # space.
24157    complete="$DUMPBIN"
24158    path="${complete%% *}"
24159    tmp="$complete EOL"
24160    arguments="${tmp#* }"
24161
24162    # Cannot rely on the command "which" here since it doesn't always work.
24163    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24164    if test -z "$is_absolute_path"; then
24165      # Path to executable is not absolute. Find it.
24166      IFS_save="$IFS"
24167      IFS=:
24168      for p in $PATH; do
24169        if test -f "$p/$path" && test -x "$p/$path"; then
24170          new_path="$p/$path"
24171          break
24172        fi
24173      done
24174      IFS="$IFS_save"
24175    else
24176      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
24177$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
24178      new_path="$path"
24179    fi
24180
24181    if test "x$new_path" = x; then
24182        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24183$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24184        has_space=`$ECHO "$complete" | $GREP " "`
24185        if test "x$has_space" != x; then
24186          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24187$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24188        fi
24189        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24190      fi
24191  fi
24192
24193      # Now join together the path and the arguments once again
24194      if test "x$arguments" != xEOL; then
24195        new_complete="$new_path ${arguments% *}"
24196      else
24197        new_complete="$new_path"
24198      fi
24199
24200  if test "x$complete" != "x$new_complete"; then
24201      DUMPBIN="$new_complete"
24202      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
24203$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
24204    fi
24205
24206
24207    COMPILER_TYPE=CL
24208    CCXXFLAGS="$CCXXFLAGS -nologo"
24209
24210fi
24211
24212
24213
24214ac_ext=c
24215ac_cpp='$CPP $CPPFLAGS'
24216ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24217ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24218ac_compiler_gnu=$ac_cv_c_compiler_gnu
24219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
24220$as_echo_n "checking how to run the C preprocessor... " >&6; }
24221# On Suns, sometimes $CPP names a directory.
24222if test -n "$CPP" && test -d "$CPP"; then
24223  CPP=
24224fi
24225if test -z "$CPP"; then
24226  if ${ac_cv_prog_CPP+:} false; then :
24227  $as_echo_n "(cached) " >&6
24228else
24229      # Double quotes because CPP needs to be expanded
24230    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
24231    do
24232      ac_preproc_ok=false
24233for ac_c_preproc_warn_flag in '' yes
24234do
24235  # Use a header file that comes with gcc, so configuring glibc
24236  # with a fresh cross-compiler works.
24237  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24238  # <limits.h> exists even on freestanding compilers.
24239  # On the NeXT, cc -E runs the code through the compiler's parser,
24240  # not just through cpp. "Syntax error" is here to catch this case.
24241  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24242/* end confdefs.h.  */
24243#ifdef __STDC__
24244# include <limits.h>
24245#else
24246# include <assert.h>
24247#endif
24248		     Syntax error
24249_ACEOF
24250if ac_fn_c_try_cpp "$LINENO"; then :
24251
24252else
24253  # Broken: fails on valid input.
24254continue
24255fi
24256rm -f conftest.err conftest.i conftest.$ac_ext
24257
24258  # OK, works on sane cases.  Now check whether nonexistent headers
24259  # can be detected and how.
24260  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24261/* end confdefs.h.  */
24262#include <ac_nonexistent.h>
24263_ACEOF
24264if ac_fn_c_try_cpp "$LINENO"; then :
24265  # Broken: success on invalid input.
24266continue
24267else
24268  # Passes both tests.
24269ac_preproc_ok=:
24270break
24271fi
24272rm -f conftest.err conftest.i conftest.$ac_ext
24273
24274done
24275# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24276rm -f conftest.i conftest.err conftest.$ac_ext
24277if $ac_preproc_ok; then :
24278  break
24279fi
24280
24281    done
24282    ac_cv_prog_CPP=$CPP
24283
24284fi
24285  CPP=$ac_cv_prog_CPP
24286else
24287  ac_cv_prog_CPP=$CPP
24288fi
24289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
24290$as_echo "$CPP" >&6; }
24291ac_preproc_ok=false
24292for ac_c_preproc_warn_flag in '' yes
24293do
24294  # Use a header file that comes with gcc, so configuring glibc
24295  # with a fresh cross-compiler works.
24296  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24297  # <limits.h> exists even on freestanding compilers.
24298  # On the NeXT, cc -E runs the code through the compiler's parser,
24299  # not just through cpp. "Syntax error" is here to catch this case.
24300  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24301/* end confdefs.h.  */
24302#ifdef __STDC__
24303# include <limits.h>
24304#else
24305# include <assert.h>
24306#endif
24307		     Syntax error
24308_ACEOF
24309if ac_fn_c_try_cpp "$LINENO"; then :
24310
24311else
24312  # Broken: fails on valid input.
24313continue
24314fi
24315rm -f conftest.err conftest.i conftest.$ac_ext
24316
24317  # OK, works on sane cases.  Now check whether nonexistent headers
24318  # can be detected and how.
24319  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24320/* end confdefs.h.  */
24321#include <ac_nonexistent.h>
24322_ACEOF
24323if ac_fn_c_try_cpp "$LINENO"; then :
24324  # Broken: success on invalid input.
24325continue
24326else
24327  # Passes both tests.
24328ac_preproc_ok=:
24329break
24330fi
24331rm -f conftest.err conftest.i conftest.$ac_ext
24332
24333done
24334# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24335rm -f conftest.i conftest.err conftest.$ac_ext
24336if $ac_preproc_ok; then :
24337
24338else
24339  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24340$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24341as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
24342See \`config.log' for more details" "$LINENO" 5; }
24343fi
24344
24345ac_ext=cpp
24346ac_cpp='$CXXCPP $CPPFLAGS'
24347ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24348ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24349ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24350
24351
24352  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24353
24354  # First separate the path from the arguments. This will split at the first
24355  # space.
24356  complete="$CPP"
24357  path="${complete%% *}"
24358  tmp="$complete EOL"
24359  arguments="${tmp#* }"
24360
24361  # Input might be given as Windows format, start by converting to
24362  # unix format.
24363  new_path=`$CYGPATH -u "$path"`
24364
24365  # Now try to locate executable using which
24366  new_path=`$WHICH "$new_path" 2> /dev/null`
24367  # bat and cmd files are not always considered executable in cygwin causing which
24368  # to not find them
24369  if test "x$new_path" = x \
24370           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24371           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24372    new_path=`$CYGPATH -u "$path"`
24373  fi
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=`$CYGPATH -u "$path"`
24382    new_path=`$WHICH "$new_path" 2> /dev/null`
24383    # bat and cmd files are not always considered executable in cygwin causing which
24384    # to not find them
24385    if test "x$new_path" = x \
24386             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24387             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24388      new_path=`$CYGPATH -u "$path"`
24389    fi
24390    if test "x$new_path" = x; then
24391      # It's still not found. Now this is an unrecoverable error.
24392      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24393$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24394      has_space=`$ECHO "$complete" | $GREP " "`
24395      if test "x$has_space" != x; then
24396        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24397$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24398      fi
24399      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24400    fi
24401  fi
24402
24403  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24404  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24405  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24406  # "foo.exe" is OK but "foo" is an error.
24407  #
24408  # This test is therefore slightly more accurate than "test -f" to check for file presence.
24409  # It is also a way to make sure we got the proper file name for the real test later on.
24410  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24411  if test "x$test_shortpath" = x; then
24412    # Short path failed, file does not exist as specified.
24413    # Try adding .exe or .cmd
24414    if test -f "${new_path}.exe"; then
24415       input_to_shortpath="${new_path}.exe"
24416    elif test -f "${new_path}.cmd"; then
24417       input_to_shortpath="${new_path}.cmd"
24418    else
24419      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
24420$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
24421      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24422$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24423      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24424    fi
24425  else
24426    input_to_shortpath="$new_path"
24427  fi
24428
24429  # Call helper function which possibly converts this using DOS-style short mode.
24430  # If so, the updated path is stored in $new_path.
24431  new_path="$input_to_shortpath"
24432
24433  input_path="$input_to_shortpath"
24434  # Check if we need to convert this using DOS-style short mode. If the path
24435  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24436  # take no chances and rewrite it.
24437  # Note: m4 eats our [], so we need to use [ and ] instead.
24438  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24439  if test "x$has_forbidden_chars" != x; then
24440    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24441    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24442    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24443    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24444      # Going to short mode and back again did indeed matter. Since short mode is
24445      # case insensitive, let's make it lowercase to improve readability.
24446      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24447      # Now convert it back to Unix-stile (cygpath)
24448      input_path=`$CYGPATH -u "$shortmode_path"`
24449      new_path="$input_path"
24450    fi
24451  fi
24452
24453  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24454  if test "x$test_cygdrive_prefix" = x; then
24455    # As a simple fix, exclude /usr/bin since it's not a real path.
24456    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24457      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24458      # a path prefixed by /cygdrive for fixpath to work.
24459      new_path="$CYGWIN_ROOT_PATH$input_path"
24460    fi
24461  fi
24462
24463  # remove trailing .exe if any
24464  new_path="${new_path/%.exe/}"
24465
24466  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24467
24468  # First separate the path from the arguments. This will split at the first
24469  # space.
24470  complete="$CPP"
24471  path="${complete%% *}"
24472  tmp="$complete EOL"
24473  arguments="${tmp#* }"
24474
24475  # Input might be given as Windows format, start by converting to
24476  # unix format.
24477  new_path="$path"
24478
24479  windows_path="$new_path"
24480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24481    unix_path=`$CYGPATH -u "$windows_path"`
24482    new_path="$unix_path"
24483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24484    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24485    new_path="$unix_path"
24486  fi
24487
24488
24489  # Now try to locate executable using which
24490  new_path=`$WHICH "$new_path" 2> /dev/null`
24491
24492  if test "x$new_path" = x; then
24493    # Oops. Which didn't find the executable.
24494    # The splitting of arguments from the executable at a space might have been incorrect,
24495    # since paths with space are more likely in Windows. Give it another try with the whole
24496    # argument.
24497    path="$complete"
24498    arguments="EOL"
24499    new_path="$path"
24500
24501  windows_path="$new_path"
24502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24503    unix_path=`$CYGPATH -u "$windows_path"`
24504    new_path="$unix_path"
24505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24506    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24507    new_path="$unix_path"
24508  fi
24509
24510
24511    new_path=`$WHICH "$new_path" 2> /dev/null`
24512
24513    if test "x$new_path" = x; then
24514      # It's still not found. Now this is an unrecoverable error.
24515      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24516$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24517      has_space=`$ECHO "$complete" | $GREP " "`
24518      if test "x$has_space" != x; then
24519        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24520$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24521      fi
24522      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24523    fi
24524  fi
24525
24526  # Now new_path has a complete unix path to the binary
24527  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24528    # Keep paths in /bin as-is, but remove trailing .exe if any
24529    new_path="${new_path/%.exe/}"
24530    # Do not save /bin paths to all_fixpath_prefixes!
24531  else
24532    # Not in mixed or Windows style, start by that.
24533    new_path=`cmd //c echo $new_path`
24534
24535  input_path="$new_path"
24536  # Check if we need to convert this using DOS-style short mode. If the path
24537  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24538  # take no chances and rewrite it.
24539  # Note: m4 eats our [], so we need to use [ and ] instead.
24540  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24541  if test "x$has_forbidden_chars" != x; then
24542    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24543    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24544  fi
24545
24546    # Output is in $new_path
24547
24548  windows_path="$new_path"
24549  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24550    unix_path=`$CYGPATH -u "$windows_path"`
24551    new_path="$unix_path"
24552  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24553    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24554    new_path="$unix_path"
24555  fi
24556
24557    # remove trailing .exe if any
24558    new_path="${new_path/%.exe/}"
24559
24560    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24561    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24562  fi
24563
24564  else
24565    # We're on a posix platform. Hooray! :)
24566    # First separate the path from the arguments. This will split at the first
24567    # space.
24568    complete="$CPP"
24569    path="${complete%% *}"
24570    tmp="$complete EOL"
24571    arguments="${tmp#* }"
24572
24573    # Cannot rely on the command "which" here since it doesn't always work.
24574    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24575    if test -z "$is_absolute_path"; then
24576      # Path to executable is not absolute. Find it.
24577      IFS_save="$IFS"
24578      IFS=:
24579      for p in $PATH; do
24580        if test -f "$p/$path" && test -x "$p/$path"; then
24581          new_path="$p/$path"
24582          break
24583        fi
24584      done
24585      IFS="$IFS_save"
24586    else
24587      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
24588$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
24589      new_path="$path"
24590    fi
24591
24592    if test "x$new_path" = x; then
24593        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24594$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24595        has_space=`$ECHO "$complete" | $GREP " "`
24596        if test "x$has_space" != x; then
24597          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24598$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24599        fi
24600        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24601      fi
24602  fi
24603
24604      # Now join together the path and the arguments once again
24605      if test "x$arguments" != xEOL; then
24606        new_complete="$new_path ${arguments% *}"
24607      else
24608        new_complete="$new_path"
24609      fi
24610
24611  if test "x$complete" != "x$new_complete"; then
24612      CPP="$new_complete"
24613      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
24614$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
24615    fi
24616
24617
24618ac_ext=cpp
24619ac_cpp='$CXXCPP $CPPFLAGS'
24620ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24621ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24622ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
24624$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
24625if test -z "$CXXCPP"; then
24626  if ${ac_cv_prog_CXXCPP+:} false; then :
24627  $as_echo_n "(cached) " >&6
24628else
24629      # Double quotes because CXXCPP needs to be expanded
24630    for CXXCPP in "$CXX -E" "/lib/cpp"
24631    do
24632      ac_preproc_ok=false
24633for ac_cxx_preproc_warn_flag in '' yes
24634do
24635  # Use a header file that comes with gcc, so configuring glibc
24636  # with a fresh cross-compiler works.
24637  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24638  # <limits.h> exists even on freestanding compilers.
24639  # On the NeXT, cc -E runs the code through the compiler's parser,
24640  # not just through cpp. "Syntax error" is here to catch this case.
24641  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24642/* end confdefs.h.  */
24643#ifdef __STDC__
24644# include <limits.h>
24645#else
24646# include <assert.h>
24647#endif
24648		     Syntax error
24649_ACEOF
24650if ac_fn_cxx_try_cpp "$LINENO"; then :
24651
24652else
24653  # Broken: fails on valid input.
24654continue
24655fi
24656rm -f conftest.err conftest.i conftest.$ac_ext
24657
24658  # OK, works on sane cases.  Now check whether nonexistent headers
24659  # can be detected and how.
24660  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24661/* end confdefs.h.  */
24662#include <ac_nonexistent.h>
24663_ACEOF
24664if ac_fn_cxx_try_cpp "$LINENO"; then :
24665  # Broken: success on invalid input.
24666continue
24667else
24668  # Passes both tests.
24669ac_preproc_ok=:
24670break
24671fi
24672rm -f conftest.err conftest.i conftest.$ac_ext
24673
24674done
24675# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24676rm -f conftest.i conftest.err conftest.$ac_ext
24677if $ac_preproc_ok; then :
24678  break
24679fi
24680
24681    done
24682    ac_cv_prog_CXXCPP=$CXXCPP
24683
24684fi
24685  CXXCPP=$ac_cv_prog_CXXCPP
24686else
24687  ac_cv_prog_CXXCPP=$CXXCPP
24688fi
24689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
24690$as_echo "$CXXCPP" >&6; }
24691ac_preproc_ok=false
24692for ac_cxx_preproc_warn_flag in '' yes
24693do
24694  # Use a header file that comes with gcc, so configuring glibc
24695  # with a fresh cross-compiler works.
24696  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24697  # <limits.h> exists even on freestanding compilers.
24698  # On the NeXT, cc -E runs the code through the compiler's parser,
24699  # not just through cpp. "Syntax error" is here to catch this case.
24700  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24701/* end confdefs.h.  */
24702#ifdef __STDC__
24703# include <limits.h>
24704#else
24705# include <assert.h>
24706#endif
24707		     Syntax error
24708_ACEOF
24709if ac_fn_cxx_try_cpp "$LINENO"; then :
24710
24711else
24712  # Broken: fails on valid input.
24713continue
24714fi
24715rm -f conftest.err conftest.i conftest.$ac_ext
24716
24717  # OK, works on sane cases.  Now check whether nonexistent headers
24718  # can be detected and how.
24719  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24720/* end confdefs.h.  */
24721#include <ac_nonexistent.h>
24722_ACEOF
24723if ac_fn_cxx_try_cpp "$LINENO"; then :
24724  # Broken: success on invalid input.
24725continue
24726else
24727  # Passes both tests.
24728ac_preproc_ok=:
24729break
24730fi
24731rm -f conftest.err conftest.i conftest.$ac_ext
24732
24733done
24734# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24735rm -f conftest.i conftest.err conftest.$ac_ext
24736if $ac_preproc_ok; then :
24737
24738else
24739  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24740$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24741as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
24742See \`config.log' for more details" "$LINENO" 5; }
24743fi
24744
24745ac_ext=cpp
24746ac_cpp='$CXXCPP $CPPFLAGS'
24747ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24748ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24749ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24750
24751
24752  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24753
24754  # First separate the path from the arguments. This will split at the first
24755  # space.
24756  complete="$CXXCPP"
24757  path="${complete%% *}"
24758  tmp="$complete EOL"
24759  arguments="${tmp#* }"
24760
24761  # Input might be given as Windows format, start by converting to
24762  # unix format.
24763  new_path=`$CYGPATH -u "$path"`
24764
24765  # Now try to locate executable using which
24766  new_path=`$WHICH "$new_path" 2> /dev/null`
24767  # bat and cmd files are not always considered executable in cygwin causing which
24768  # to not find them
24769  if test "x$new_path" = x \
24770           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24771           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24772    new_path=`$CYGPATH -u "$path"`
24773  fi
24774  if test "x$new_path" = x; then
24775    # Oops. Which didn't find the executable.
24776    # The splitting of arguments from the executable at a space might have been incorrect,
24777    # since paths with space are more likely in Windows. Give it another try with the whole
24778    # argument.
24779    path="$complete"
24780    arguments="EOL"
24781    new_path=`$CYGPATH -u "$path"`
24782    new_path=`$WHICH "$new_path" 2> /dev/null`
24783    # bat and cmd files are not always considered executable in cygwin causing which
24784    # to not find them
24785    if test "x$new_path" = x \
24786             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24787             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24788      new_path=`$CYGPATH -u "$path"`
24789    fi
24790    if test "x$new_path" = x; then
24791      # It's still not found. Now this is an unrecoverable error.
24792      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24793$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24794      has_space=`$ECHO "$complete" | $GREP " "`
24795      if test "x$has_space" != x; then
24796        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24797$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24798      fi
24799      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24800    fi
24801  fi
24802
24803  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24804  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24805  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24806  # "foo.exe" is OK but "foo" is an error.
24807  #
24808  # This test is therefore slightly more accurate than "test -f" to check for file presence.
24809  # It is also a way to make sure we got the proper file name for the real test later on.
24810  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24811  if test "x$test_shortpath" = x; then
24812    # Short path failed, file does not exist as specified.
24813    # Try adding .exe or .cmd
24814    if test -f "${new_path}.exe"; then
24815       input_to_shortpath="${new_path}.exe"
24816    elif test -f "${new_path}.cmd"; then
24817       input_to_shortpath="${new_path}.cmd"
24818    else
24819      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
24820$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
24821      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24822$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24823      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24824    fi
24825  else
24826    input_to_shortpath="$new_path"
24827  fi
24828
24829  # Call helper function which possibly converts this using DOS-style short mode.
24830  # If so, the updated path is stored in $new_path.
24831  new_path="$input_to_shortpath"
24832
24833  input_path="$input_to_shortpath"
24834  # Check if we need to convert this using DOS-style short mode. If the path
24835  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24836  # take no chances and rewrite it.
24837  # Note: m4 eats our [], so we need to use [ and ] instead.
24838  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24839  if test "x$has_forbidden_chars" != x; then
24840    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24841    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24842    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24843    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24844      # Going to short mode and back again did indeed matter. Since short mode is
24845      # case insensitive, let's make it lowercase to improve readability.
24846      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24847      # Now convert it back to Unix-stile (cygpath)
24848      input_path=`$CYGPATH -u "$shortmode_path"`
24849      new_path="$input_path"
24850    fi
24851  fi
24852
24853  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24854  if test "x$test_cygdrive_prefix" = x; then
24855    # As a simple fix, exclude /usr/bin since it's not a real path.
24856    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24857      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24858      # a path prefixed by /cygdrive for fixpath to work.
24859      new_path="$CYGWIN_ROOT_PATH$input_path"
24860    fi
24861  fi
24862
24863  # remove trailing .exe if any
24864  new_path="${new_path/%.exe/}"
24865
24866  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24867
24868  # First separate the path from the arguments. This will split at the first
24869  # space.
24870  complete="$CXXCPP"
24871  path="${complete%% *}"
24872  tmp="$complete EOL"
24873  arguments="${tmp#* }"
24874
24875  # Input might be given as Windows format, start by converting to
24876  # unix format.
24877  new_path="$path"
24878
24879  windows_path="$new_path"
24880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24881    unix_path=`$CYGPATH -u "$windows_path"`
24882    new_path="$unix_path"
24883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24884    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24885    new_path="$unix_path"
24886  fi
24887
24888
24889  # Now try to locate executable using which
24890  new_path=`$WHICH "$new_path" 2> /dev/null`
24891
24892  if test "x$new_path" = x; then
24893    # Oops. Which didn't find the executable.
24894    # The splitting of arguments from the executable at a space might have been incorrect,
24895    # since paths with space are more likely in Windows. Give it another try with the whole
24896    # argument.
24897    path="$complete"
24898    arguments="EOL"
24899    new_path="$path"
24900
24901  windows_path="$new_path"
24902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24903    unix_path=`$CYGPATH -u "$windows_path"`
24904    new_path="$unix_path"
24905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24906    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24907    new_path="$unix_path"
24908  fi
24909
24910
24911    new_path=`$WHICH "$new_path" 2> /dev/null`
24912
24913    if test "x$new_path" = x; then
24914      # It's still not found. Now this is an unrecoverable error.
24915      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24916$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24917      has_space=`$ECHO "$complete" | $GREP " "`
24918      if test "x$has_space" != x; then
24919        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24920$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24921      fi
24922      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24923    fi
24924  fi
24925
24926  # Now new_path has a complete unix path to the binary
24927  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24928    # Keep paths in /bin as-is, but remove trailing .exe if any
24929    new_path="${new_path/%.exe/}"
24930    # Do not save /bin paths to all_fixpath_prefixes!
24931  else
24932    # Not in mixed or Windows style, start by that.
24933    new_path=`cmd //c echo $new_path`
24934
24935  input_path="$new_path"
24936  # Check if we need to convert this using DOS-style short mode. If the path
24937  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24938  # take no chances and rewrite it.
24939  # Note: m4 eats our [], so we need to use [ and ] instead.
24940  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24941  if test "x$has_forbidden_chars" != x; then
24942    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24943    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24944  fi
24945
24946    # Output is in $new_path
24947
24948  windows_path="$new_path"
24949  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24950    unix_path=`$CYGPATH -u "$windows_path"`
24951    new_path="$unix_path"
24952  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24953    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24954    new_path="$unix_path"
24955  fi
24956
24957    # remove trailing .exe if any
24958    new_path="${new_path/%.exe/}"
24959
24960    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24961    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24962  fi
24963
24964  else
24965    # We're on a posix platform. Hooray! :)
24966    # First separate the path from the arguments. This will split at the first
24967    # space.
24968    complete="$CXXCPP"
24969    path="${complete%% *}"
24970    tmp="$complete EOL"
24971    arguments="${tmp#* }"
24972
24973    # Cannot rely on the command "which" here since it doesn't always work.
24974    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24975    if test -z "$is_absolute_path"; then
24976      # Path to executable is not absolute. Find it.
24977      IFS_save="$IFS"
24978      IFS=:
24979      for p in $PATH; do
24980        if test -f "$p/$path" && test -x "$p/$path"; then
24981          new_path="$p/$path"
24982          break
24983        fi
24984      done
24985      IFS="$IFS_save"
24986    else
24987      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
24988$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
24989      new_path="$path"
24990    fi
24991
24992    if test "x$new_path" = x; then
24993        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24994$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24995        has_space=`$ECHO "$complete" | $GREP " "`
24996        if test "x$has_space" != x; then
24997          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24998$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24999        fi
25000        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25001      fi
25002  fi
25003
25004      # Now join together the path and the arguments once again
25005      if test "x$arguments" != xEOL; then
25006        new_complete="$new_path ${arguments% *}"
25007      else
25008        new_complete="$new_path"
25009      fi
25010
25011  if test "x$complete" != "x$new_complete"; then
25012      CXXCPP="$new_complete"
25013      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
25014$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
25015    fi
25016
25017
25018if test "x$COMPILE_TYPE" != "xcross"; then
25019    # If we are not cross compiling, use the same compilers for
25020    # building the build platform executables. The cross-compilation
25021    # case needed to be done earlier, but this can only be done after
25022    # the native tools have been localized.
25023    BUILD_CC="$CC"
25024    BUILD_CXX="$CXX"
25025    BUILD_LD="$LD"
25026fi
25027
25028# for solaris we really need solaris tools, and not gnu equivalent
25029#   these seems to normally reside in /usr/ccs/bin so add that to path before
25030#   starting to probe
25031#
25032#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
25033#         so that it can be overriden --with-tools-dir
25034if test "x$OPENJDK_BUILD_OS" = xsolaris; then
25035    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
25036fi
25037
25038# Find the right assembler.
25039if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25040    # Extract the first word of "as", so it can be a program name with args.
25041set dummy as; ac_word=$2
25042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25043$as_echo_n "checking for $ac_word... " >&6; }
25044if ${ac_cv_path_AS+:} false; then :
25045  $as_echo_n "(cached) " >&6
25046else
25047  case $AS in
25048  [\\/]* | ?:[\\/]*)
25049  ac_cv_path_AS="$AS" # Let the user override the test with a path.
25050  ;;
25051  *)
25052  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25053for as_dir in $PATH
25054do
25055  IFS=$as_save_IFS
25056  test -z "$as_dir" && as_dir=.
25057    for ac_exec_ext in '' $ac_executable_extensions; do
25058  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25059    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
25060    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25061    break 2
25062  fi
25063done
25064  done
25065IFS=$as_save_IFS
25066
25067  ;;
25068esac
25069fi
25070AS=$ac_cv_path_AS
25071if test -n "$AS"; then
25072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
25073$as_echo "$AS" >&6; }
25074else
25075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25076$as_echo "no" >&6; }
25077fi
25078
25079
25080
25081  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25082
25083  # First separate the path from the arguments. This will split at the first
25084  # space.
25085  complete="$AS"
25086  path="${complete%% *}"
25087  tmp="$complete EOL"
25088  arguments="${tmp#* }"
25089
25090  # Input might be given as Windows format, start by converting to
25091  # unix format.
25092  new_path=`$CYGPATH -u "$path"`
25093
25094  # Now try to locate executable using which
25095  new_path=`$WHICH "$new_path" 2> /dev/null`
25096  # bat and cmd files are not always considered executable in cygwin causing which
25097  # to not find them
25098  if test "x$new_path" = x \
25099           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25100           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25101    new_path=`$CYGPATH -u "$path"`
25102  fi
25103  if test "x$new_path" = x; then
25104    # Oops. Which didn't find the executable.
25105    # The splitting of arguments from the executable at a space might have been incorrect,
25106    # since paths with space are more likely in Windows. Give it another try with the whole
25107    # argument.
25108    path="$complete"
25109    arguments="EOL"
25110    new_path=`$CYGPATH -u "$path"`
25111    new_path=`$WHICH "$new_path" 2> /dev/null`
25112    # bat and cmd files are not always considered executable in cygwin causing which
25113    # to not find them
25114    if test "x$new_path" = x \
25115             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25116             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25117      new_path=`$CYGPATH -u "$path"`
25118    fi
25119    if test "x$new_path" = x; then
25120      # It's still not found. Now this is an unrecoverable error.
25121      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25122$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25123      has_space=`$ECHO "$complete" | $GREP " "`
25124      if test "x$has_space" != x; then
25125        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25126$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25127      fi
25128      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25129    fi
25130  fi
25131
25132  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25133  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25134  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25135  # "foo.exe" is OK but "foo" is an error.
25136  #
25137  # This test is therefore slightly more accurate than "test -f" to check for file presence.
25138  # It is also a way to make sure we got the proper file name for the real test later on.
25139  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25140  if test "x$test_shortpath" = x; then
25141    # Short path failed, file does not exist as specified.
25142    # Try adding .exe or .cmd
25143    if test -f "${new_path}.exe"; then
25144       input_to_shortpath="${new_path}.exe"
25145    elif test -f "${new_path}.cmd"; then
25146       input_to_shortpath="${new_path}.cmd"
25147    else
25148      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
25149$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
25150      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25151$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25152      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25153    fi
25154  else
25155    input_to_shortpath="$new_path"
25156  fi
25157
25158  # Call helper function which possibly converts this using DOS-style short mode.
25159  # If so, the updated path is stored in $new_path.
25160  new_path="$input_to_shortpath"
25161
25162  input_path="$input_to_shortpath"
25163  # Check if we need to convert this using DOS-style short mode. If the path
25164  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25165  # take no chances and rewrite it.
25166  # Note: m4 eats our [], so we need to use [ and ] instead.
25167  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25168  if test "x$has_forbidden_chars" != x; then
25169    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25170    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25171    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25172    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25173      # Going to short mode and back again did indeed matter. Since short mode is
25174      # case insensitive, let's make it lowercase to improve readability.
25175      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25176      # Now convert it back to Unix-stile (cygpath)
25177      input_path=`$CYGPATH -u "$shortmode_path"`
25178      new_path="$input_path"
25179    fi
25180  fi
25181
25182  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25183  if test "x$test_cygdrive_prefix" = x; then
25184    # As a simple fix, exclude /usr/bin since it's not a real path.
25185    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25186      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25187      # a path prefixed by /cygdrive for fixpath to work.
25188      new_path="$CYGWIN_ROOT_PATH$input_path"
25189    fi
25190  fi
25191
25192  # remove trailing .exe if any
25193  new_path="${new_path/%.exe/}"
25194
25195  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25196
25197  # First separate the path from the arguments. This will split at the first
25198  # space.
25199  complete="$AS"
25200  path="${complete%% *}"
25201  tmp="$complete EOL"
25202  arguments="${tmp#* }"
25203
25204  # Input might be given as Windows format, start by converting to
25205  # unix format.
25206  new_path="$path"
25207
25208  windows_path="$new_path"
25209  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25210    unix_path=`$CYGPATH -u "$windows_path"`
25211    new_path="$unix_path"
25212  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25213    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25214    new_path="$unix_path"
25215  fi
25216
25217
25218  # Now try to locate executable using which
25219  new_path=`$WHICH "$new_path" 2> /dev/null`
25220
25221  if test "x$new_path" = x; then
25222    # Oops. Which didn't find the executable.
25223    # The splitting of arguments from the executable at a space might have been incorrect,
25224    # since paths with space are more likely in Windows. Give it another try with the whole
25225    # argument.
25226    path="$complete"
25227    arguments="EOL"
25228    new_path="$path"
25229
25230  windows_path="$new_path"
25231  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25232    unix_path=`$CYGPATH -u "$windows_path"`
25233    new_path="$unix_path"
25234  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25235    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25236    new_path="$unix_path"
25237  fi
25238
25239
25240    new_path=`$WHICH "$new_path" 2> /dev/null`
25241
25242    if test "x$new_path" = x; then
25243      # It's still not found. Now this is an unrecoverable error.
25244      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25245$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25246      has_space=`$ECHO "$complete" | $GREP " "`
25247      if test "x$has_space" != x; then
25248        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25249$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25250      fi
25251      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25252    fi
25253  fi
25254
25255  # Now new_path has a complete unix path to the binary
25256  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25257    # Keep paths in /bin as-is, but remove trailing .exe if any
25258    new_path="${new_path/%.exe/}"
25259    # Do not save /bin paths to all_fixpath_prefixes!
25260  else
25261    # Not in mixed or Windows style, start by that.
25262    new_path=`cmd //c echo $new_path`
25263
25264  input_path="$new_path"
25265  # Check if we need to convert this using DOS-style short mode. If the path
25266  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25267  # take no chances and rewrite it.
25268  # Note: m4 eats our [], so we need to use [ and ] instead.
25269  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25270  if test "x$has_forbidden_chars" != x; then
25271    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25272    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25273  fi
25274
25275    # Output is in $new_path
25276
25277  windows_path="$new_path"
25278  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25279    unix_path=`$CYGPATH -u "$windows_path"`
25280    new_path="$unix_path"
25281  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25282    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25283    new_path="$unix_path"
25284  fi
25285
25286    # remove trailing .exe if any
25287    new_path="${new_path/%.exe/}"
25288
25289    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25290    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25291  fi
25292
25293  else
25294    # We're on a posix platform. Hooray! :)
25295    # First separate the path from the arguments. This will split at the first
25296    # space.
25297    complete="$AS"
25298    path="${complete%% *}"
25299    tmp="$complete EOL"
25300    arguments="${tmp#* }"
25301
25302    # Cannot rely on the command "which" here since it doesn't always work.
25303    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25304    if test -z "$is_absolute_path"; then
25305      # Path to executable is not absolute. Find it.
25306      IFS_save="$IFS"
25307      IFS=:
25308      for p in $PATH; do
25309        if test -f "$p/$path" && test -x "$p/$path"; then
25310          new_path="$p/$path"
25311          break
25312        fi
25313      done
25314      IFS="$IFS_save"
25315    else
25316      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
25317$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
25318      new_path="$path"
25319    fi
25320
25321    if test "x$new_path" = x; then
25322        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25323$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25324        has_space=`$ECHO "$complete" | $GREP " "`
25325        if test "x$has_space" != x; then
25326          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25327$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25328        fi
25329        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25330      fi
25331  fi
25332
25333      # Now join together the path and the arguments once again
25334      if test "x$arguments" != xEOL; then
25335        new_complete="$new_path ${arguments% *}"
25336      else
25337        new_complete="$new_path"
25338      fi
25339
25340  if test "x$complete" != "x$new_complete"; then
25341      AS="$new_complete"
25342      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
25343$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
25344    fi
25345
25346else
25347    AS="$CC -c"
25348fi
25349
25350
25351if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25352    # Extract the first word of "nm", so it can be a program name with args.
25353set dummy nm; ac_word=$2
25354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25355$as_echo_n "checking for $ac_word... " >&6; }
25356if ${ac_cv_path_NM+:} false; then :
25357  $as_echo_n "(cached) " >&6
25358else
25359  case $NM in
25360  [\\/]* | ?:[\\/]*)
25361  ac_cv_path_NM="$NM" # Let the user override the test with a path.
25362  ;;
25363  *)
25364  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25365for as_dir in $PATH
25366do
25367  IFS=$as_save_IFS
25368  test -z "$as_dir" && as_dir=.
25369    for ac_exec_ext in '' $ac_executable_extensions; do
25370  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25371    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
25372    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25373    break 2
25374  fi
25375done
25376  done
25377IFS=$as_save_IFS
25378
25379  ;;
25380esac
25381fi
25382NM=$ac_cv_path_NM
25383if test -n "$NM"; then
25384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25385$as_echo "$NM" >&6; }
25386else
25387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25388$as_echo "no" >&6; }
25389fi
25390
25391
25392
25393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25394
25395  # First separate the path from the arguments. This will split at the first
25396  # space.
25397  complete="$NM"
25398  path="${complete%% *}"
25399  tmp="$complete EOL"
25400  arguments="${tmp#* }"
25401
25402  # Input might be given as Windows format, start by converting to
25403  # unix format.
25404  new_path=`$CYGPATH -u "$path"`
25405
25406  # Now try to locate executable using which
25407  new_path=`$WHICH "$new_path" 2> /dev/null`
25408  # bat and cmd files are not always considered executable in cygwin causing which
25409  # to not find them
25410  if test "x$new_path" = x \
25411           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25412           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25413    new_path=`$CYGPATH -u "$path"`
25414  fi
25415  if test "x$new_path" = x; then
25416    # Oops. Which didn't find the executable.
25417    # The splitting of arguments from the executable at a space might have been incorrect,
25418    # since paths with space are more likely in Windows. Give it another try with the whole
25419    # argument.
25420    path="$complete"
25421    arguments="EOL"
25422    new_path=`$CYGPATH -u "$path"`
25423    new_path=`$WHICH "$new_path" 2> /dev/null`
25424    # bat and cmd files are not always considered executable in cygwin causing which
25425    # to not find them
25426    if test "x$new_path" = x \
25427             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25428             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25429      new_path=`$CYGPATH -u "$path"`
25430    fi
25431    if test "x$new_path" = x; then
25432      # It's still not found. Now this is an unrecoverable error.
25433      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25434$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25435      has_space=`$ECHO "$complete" | $GREP " "`
25436      if test "x$has_space" != x; then
25437        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25438$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25439      fi
25440      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25441    fi
25442  fi
25443
25444  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25445  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25446  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25447  # "foo.exe" is OK but "foo" is an error.
25448  #
25449  # This test is therefore slightly more accurate than "test -f" to check for file presence.
25450  # It is also a way to make sure we got the proper file name for the real test later on.
25451  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25452  if test "x$test_shortpath" = x; then
25453    # Short path failed, file does not exist as specified.
25454    # Try adding .exe or .cmd
25455    if test -f "${new_path}.exe"; then
25456       input_to_shortpath="${new_path}.exe"
25457    elif test -f "${new_path}.cmd"; then
25458       input_to_shortpath="${new_path}.cmd"
25459    else
25460      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25461$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25462      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25463$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25464      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25465    fi
25466  else
25467    input_to_shortpath="$new_path"
25468  fi
25469
25470  # Call helper function which possibly converts this using DOS-style short mode.
25471  # If so, the updated path is stored in $new_path.
25472  new_path="$input_to_shortpath"
25473
25474  input_path="$input_to_shortpath"
25475  # Check if we need to convert this using DOS-style short mode. If the path
25476  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25477  # take no chances and rewrite it.
25478  # Note: m4 eats our [], so we need to use [ and ] instead.
25479  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25480  if test "x$has_forbidden_chars" != x; then
25481    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25482    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25483    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25484    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25485      # Going to short mode and back again did indeed matter. Since short mode is
25486      # case insensitive, let's make it lowercase to improve readability.
25487      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25488      # Now convert it back to Unix-stile (cygpath)
25489      input_path=`$CYGPATH -u "$shortmode_path"`
25490      new_path="$input_path"
25491    fi
25492  fi
25493
25494  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25495  if test "x$test_cygdrive_prefix" = x; then
25496    # As a simple fix, exclude /usr/bin since it's not a real path.
25497    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25498      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25499      # a path prefixed by /cygdrive for fixpath to work.
25500      new_path="$CYGWIN_ROOT_PATH$input_path"
25501    fi
25502  fi
25503
25504  # remove trailing .exe if any
25505  new_path="${new_path/%.exe/}"
25506
25507  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25508
25509  # First separate the path from the arguments. This will split at the first
25510  # space.
25511  complete="$NM"
25512  path="${complete%% *}"
25513  tmp="$complete EOL"
25514  arguments="${tmp#* }"
25515
25516  # Input might be given as Windows format, start by converting to
25517  # unix format.
25518  new_path="$path"
25519
25520  windows_path="$new_path"
25521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25522    unix_path=`$CYGPATH -u "$windows_path"`
25523    new_path="$unix_path"
25524  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25525    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25526    new_path="$unix_path"
25527  fi
25528
25529
25530  # Now try to locate executable using which
25531  new_path=`$WHICH "$new_path" 2> /dev/null`
25532
25533  if test "x$new_path" = x; then
25534    # Oops. Which didn't find the executable.
25535    # The splitting of arguments from the executable at a space might have been incorrect,
25536    # since paths with space are more likely in Windows. Give it another try with the whole
25537    # argument.
25538    path="$complete"
25539    arguments="EOL"
25540    new_path="$path"
25541
25542  windows_path="$new_path"
25543  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25544    unix_path=`$CYGPATH -u "$windows_path"`
25545    new_path="$unix_path"
25546  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25547    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25548    new_path="$unix_path"
25549  fi
25550
25551
25552    new_path=`$WHICH "$new_path" 2> /dev/null`
25553
25554    if test "x$new_path" = x; then
25555      # It's still not found. Now this is an unrecoverable error.
25556      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25557$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25558      has_space=`$ECHO "$complete" | $GREP " "`
25559      if test "x$has_space" != x; then
25560        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25561$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25562      fi
25563      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25564    fi
25565  fi
25566
25567  # Now new_path has a complete unix path to the binary
25568  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25569    # Keep paths in /bin as-is, but remove trailing .exe if any
25570    new_path="${new_path/%.exe/}"
25571    # Do not save /bin paths to all_fixpath_prefixes!
25572  else
25573    # Not in mixed or Windows style, start by that.
25574    new_path=`cmd //c echo $new_path`
25575
25576  input_path="$new_path"
25577  # Check if we need to convert this using DOS-style short mode. If the path
25578  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25579  # take no chances and rewrite it.
25580  # Note: m4 eats our [], so we need to use [ and ] instead.
25581  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25582  if test "x$has_forbidden_chars" != x; then
25583    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25584    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25585  fi
25586
25587    # Output is in $new_path
25588
25589  windows_path="$new_path"
25590  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25591    unix_path=`$CYGPATH -u "$windows_path"`
25592    new_path="$unix_path"
25593  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25594    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25595    new_path="$unix_path"
25596  fi
25597
25598    # remove trailing .exe if any
25599    new_path="${new_path/%.exe/}"
25600
25601    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25602    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25603  fi
25604
25605  else
25606    # We're on a posix platform. Hooray! :)
25607    # First separate the path from the arguments. This will split at the first
25608    # space.
25609    complete="$NM"
25610    path="${complete%% *}"
25611    tmp="$complete EOL"
25612    arguments="${tmp#* }"
25613
25614    # Cannot rely on the command "which" here since it doesn't always work.
25615    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25616    if test -z "$is_absolute_path"; then
25617      # Path to executable is not absolute. Find it.
25618      IFS_save="$IFS"
25619      IFS=:
25620      for p in $PATH; do
25621        if test -f "$p/$path" && test -x "$p/$path"; then
25622          new_path="$p/$path"
25623          break
25624        fi
25625      done
25626      IFS="$IFS_save"
25627    else
25628      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25629$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25630      new_path="$path"
25631    fi
25632
25633    if test "x$new_path" = x; then
25634        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25635$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25636        has_space=`$ECHO "$complete" | $GREP " "`
25637        if test "x$has_space" != x; then
25638          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25639$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25640        fi
25641        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25642      fi
25643  fi
25644
25645      # Now join together the path and the arguments once again
25646      if test "x$arguments" != xEOL; then
25647        new_complete="$new_path ${arguments% *}"
25648      else
25649        new_complete="$new_path"
25650      fi
25651
25652  if test "x$complete" != "x$new_complete"; then
25653      NM="$new_complete"
25654      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25655$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25656    fi
25657
25658    # Extract the first word of "gnm", so it can be a program name with args.
25659set dummy gnm; ac_word=$2
25660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25661$as_echo_n "checking for $ac_word... " >&6; }
25662if ${ac_cv_path_GNM+:} false; then :
25663  $as_echo_n "(cached) " >&6
25664else
25665  case $GNM in
25666  [\\/]* | ?:[\\/]*)
25667  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
25668  ;;
25669  *)
25670  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25671for as_dir in $PATH
25672do
25673  IFS=$as_save_IFS
25674  test -z "$as_dir" && as_dir=.
25675    for ac_exec_ext in '' $ac_executable_extensions; do
25676  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25677    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
25678    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25679    break 2
25680  fi
25681done
25682  done
25683IFS=$as_save_IFS
25684
25685  ;;
25686esac
25687fi
25688GNM=$ac_cv_path_GNM
25689if test -n "$GNM"; then
25690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
25691$as_echo "$GNM" >&6; }
25692else
25693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25694$as_echo "no" >&6; }
25695fi
25696
25697
25698
25699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25700
25701  # First separate the path from the arguments. This will split at the first
25702  # space.
25703  complete="$GNM"
25704  path="${complete%% *}"
25705  tmp="$complete EOL"
25706  arguments="${tmp#* }"
25707
25708  # Input might be given as Windows format, start by converting to
25709  # unix format.
25710  new_path=`$CYGPATH -u "$path"`
25711
25712  # Now try to locate executable using which
25713  new_path=`$WHICH "$new_path" 2> /dev/null`
25714  # bat and cmd files are not always considered executable in cygwin causing which
25715  # to not find them
25716  if test "x$new_path" = x \
25717           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25718           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25719    new_path=`$CYGPATH -u "$path"`
25720  fi
25721  if test "x$new_path" = x; then
25722    # Oops. Which didn't find the executable.
25723    # The splitting of arguments from the executable at a space might have been incorrect,
25724    # since paths with space are more likely in Windows. Give it another try with the whole
25725    # argument.
25726    path="$complete"
25727    arguments="EOL"
25728    new_path=`$CYGPATH -u "$path"`
25729    new_path=`$WHICH "$new_path" 2> /dev/null`
25730    # bat and cmd files are not always considered executable in cygwin causing which
25731    # to not find them
25732    if test "x$new_path" = x \
25733             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25734             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25735      new_path=`$CYGPATH -u "$path"`
25736    fi
25737    if test "x$new_path" = x; then
25738      # It's still not found. Now this is an unrecoverable error.
25739      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
25740$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
25741      has_space=`$ECHO "$complete" | $GREP " "`
25742      if test "x$has_space" != x; then
25743        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25744$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25745      fi
25746      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25747    fi
25748  fi
25749
25750  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25751  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25752  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25753  # "foo.exe" is OK but "foo" is an error.
25754  #
25755  # This test is therefore slightly more accurate than "test -f" to check for file presence.
25756  # It is also a way to make sure we got the proper file name for the real test later on.
25757  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25758  if test "x$test_shortpath" = x; then
25759    # Short path failed, file does not exist as specified.
25760    # Try adding .exe or .cmd
25761    if test -f "${new_path}.exe"; then
25762       input_to_shortpath="${new_path}.exe"
25763    elif test -f "${new_path}.cmd"; then
25764       input_to_shortpath="${new_path}.cmd"
25765    else
25766      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
25767$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
25768      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25769$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25770      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25771    fi
25772  else
25773    input_to_shortpath="$new_path"
25774  fi
25775
25776  # Call helper function which possibly converts this using DOS-style short mode.
25777  # If so, the updated path is stored in $new_path.
25778  new_path="$input_to_shortpath"
25779
25780  input_path="$input_to_shortpath"
25781  # Check if we need to convert this using DOS-style short mode. If the path
25782  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25783  # take no chances and rewrite it.
25784  # Note: m4 eats our [], so we need to use [ and ] instead.
25785  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25786  if test "x$has_forbidden_chars" != x; then
25787    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25788    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25789    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25790    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25791      # Going to short mode and back again did indeed matter. Since short mode is
25792      # case insensitive, let's make it lowercase to improve readability.
25793      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25794      # Now convert it back to Unix-stile (cygpath)
25795      input_path=`$CYGPATH -u "$shortmode_path"`
25796      new_path="$input_path"
25797    fi
25798  fi
25799
25800  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25801  if test "x$test_cygdrive_prefix" = x; then
25802    # As a simple fix, exclude /usr/bin since it's not a real path.
25803    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25804      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25805      # a path prefixed by /cygdrive for fixpath to work.
25806      new_path="$CYGWIN_ROOT_PATH$input_path"
25807    fi
25808  fi
25809
25810  # remove trailing .exe if any
25811  new_path="${new_path/%.exe/}"
25812
25813  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25814
25815  # First separate the path from the arguments. This will split at the first
25816  # space.
25817  complete="$GNM"
25818  path="${complete%% *}"
25819  tmp="$complete EOL"
25820  arguments="${tmp#* }"
25821
25822  # Input might be given as Windows format, start by converting to
25823  # unix format.
25824  new_path="$path"
25825
25826  windows_path="$new_path"
25827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25828    unix_path=`$CYGPATH -u "$windows_path"`
25829    new_path="$unix_path"
25830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25831    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25832    new_path="$unix_path"
25833  fi
25834
25835
25836  # Now try to locate executable using which
25837  new_path=`$WHICH "$new_path" 2> /dev/null`
25838
25839  if test "x$new_path" = x; then
25840    # Oops. Which didn't find the executable.
25841    # The splitting of arguments from the executable at a space might have been incorrect,
25842    # since paths with space are more likely in Windows. Give it another try with the whole
25843    # argument.
25844    path="$complete"
25845    arguments="EOL"
25846    new_path="$path"
25847
25848  windows_path="$new_path"
25849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25850    unix_path=`$CYGPATH -u "$windows_path"`
25851    new_path="$unix_path"
25852  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25853    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25854    new_path="$unix_path"
25855  fi
25856
25857
25858    new_path=`$WHICH "$new_path" 2> /dev/null`
25859
25860    if test "x$new_path" = x; then
25861      # It's still not found. Now this is an unrecoverable error.
25862      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
25863$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
25864      has_space=`$ECHO "$complete" | $GREP " "`
25865      if test "x$has_space" != x; then
25866        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25867$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25868      fi
25869      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25870    fi
25871  fi
25872
25873  # Now new_path has a complete unix path to the binary
25874  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25875    # Keep paths in /bin as-is, but remove trailing .exe if any
25876    new_path="${new_path/%.exe/}"
25877    # Do not save /bin paths to all_fixpath_prefixes!
25878  else
25879    # Not in mixed or Windows style, start by that.
25880    new_path=`cmd //c echo $new_path`
25881
25882  input_path="$new_path"
25883  # Check if we need to convert this using DOS-style short mode. If the path
25884  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25885  # take no chances and rewrite it.
25886  # Note: m4 eats our [], so we need to use [ and ] instead.
25887  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25888  if test "x$has_forbidden_chars" != x; then
25889    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25890    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25891  fi
25892
25893    # Output is in $new_path
25894
25895  windows_path="$new_path"
25896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25897    unix_path=`$CYGPATH -u "$windows_path"`
25898    new_path="$unix_path"
25899  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25900    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25901    new_path="$unix_path"
25902  fi
25903
25904    # remove trailing .exe if any
25905    new_path="${new_path/%.exe/}"
25906
25907    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25908    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25909  fi
25910
25911  else
25912    # We're on a posix platform. Hooray! :)
25913    # First separate the path from the arguments. This will split at the first
25914    # space.
25915    complete="$GNM"
25916    path="${complete%% *}"
25917    tmp="$complete EOL"
25918    arguments="${tmp#* }"
25919
25920    # Cannot rely on the command "which" here since it doesn't always work.
25921    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25922    if test -z "$is_absolute_path"; then
25923      # Path to executable is not absolute. Find it.
25924      IFS_save="$IFS"
25925      IFS=:
25926      for p in $PATH; do
25927        if test -f "$p/$path" && test -x "$p/$path"; then
25928          new_path="$p/$path"
25929          break
25930        fi
25931      done
25932      IFS="$IFS_save"
25933    else
25934      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving GNM (as $path) failed, using $path directly." >&5
25935$as_echo "$as_me: Resolving GNM (as $path) failed, using $path directly." >&6;}
25936      new_path="$path"
25937    fi
25938
25939    if test "x$new_path" = x; then
25940        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
25941$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
25942        has_space=`$ECHO "$complete" | $GREP " "`
25943        if test "x$has_space" != x; then
25944          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25945$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25946        fi
25947        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25948      fi
25949  fi
25950
25951      # Now join together the path and the arguments once again
25952      if test "x$arguments" != xEOL; then
25953        new_complete="$new_path ${arguments% *}"
25954      else
25955        new_complete="$new_path"
25956      fi
25957
25958  if test "x$complete" != "x$new_complete"; then
25959      GNM="$new_complete"
25960      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
25961$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
25962    fi
25963
25964    # Extract the first word of "strip", so it can be a program name with args.
25965set dummy strip; ac_word=$2
25966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25967$as_echo_n "checking for $ac_word... " >&6; }
25968if ${ac_cv_path_STRIP+:} false; then :
25969  $as_echo_n "(cached) " >&6
25970else
25971  case $STRIP in
25972  [\\/]* | ?:[\\/]*)
25973  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
25974  ;;
25975  *)
25976  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25977for as_dir in $PATH
25978do
25979  IFS=$as_save_IFS
25980  test -z "$as_dir" && as_dir=.
25981    for ac_exec_ext in '' $ac_executable_extensions; do
25982  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25983    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
25984    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25985    break 2
25986  fi
25987done
25988  done
25989IFS=$as_save_IFS
25990
25991  ;;
25992esac
25993fi
25994STRIP=$ac_cv_path_STRIP
25995if test -n "$STRIP"; then
25996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
25997$as_echo "$STRIP" >&6; }
25998else
25999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26000$as_echo "no" >&6; }
26001fi
26002
26003
26004
26005  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26006
26007  # First separate the path from the arguments. This will split at the first
26008  # space.
26009  complete="$STRIP"
26010  path="${complete%% *}"
26011  tmp="$complete EOL"
26012  arguments="${tmp#* }"
26013
26014  # Input might be given as Windows format, start by converting to
26015  # unix format.
26016  new_path=`$CYGPATH -u "$path"`
26017
26018  # Now try to locate executable using which
26019  new_path=`$WHICH "$new_path" 2> /dev/null`
26020  # bat and cmd files are not always considered executable in cygwin causing which
26021  # to not find them
26022  if test "x$new_path" = x \
26023           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26024           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26025    new_path=`$CYGPATH -u "$path"`
26026  fi
26027  if test "x$new_path" = x; then
26028    # Oops. Which didn't find the executable.
26029    # The splitting of arguments from the executable at a space might have been incorrect,
26030    # since paths with space are more likely in Windows. Give it another try with the whole
26031    # argument.
26032    path="$complete"
26033    arguments="EOL"
26034    new_path=`$CYGPATH -u "$path"`
26035    new_path=`$WHICH "$new_path" 2> /dev/null`
26036    # bat and cmd files are not always considered executable in cygwin causing which
26037    # to not find them
26038    if test "x$new_path" = x \
26039             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26040             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26041      new_path=`$CYGPATH -u "$path"`
26042    fi
26043    if test "x$new_path" = x; then
26044      # It's still not found. Now this is an unrecoverable error.
26045      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26046$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26047      has_space=`$ECHO "$complete" | $GREP " "`
26048      if test "x$has_space" != x; then
26049        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26050$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26051      fi
26052      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26053    fi
26054  fi
26055
26056  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26057  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26058  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26059  # "foo.exe" is OK but "foo" is an error.
26060  #
26061  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26062  # It is also a way to make sure we got the proper file name for the real test later on.
26063  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26064  if test "x$test_shortpath" = x; then
26065    # Short path failed, file does not exist as specified.
26066    # Try adding .exe or .cmd
26067    if test -f "${new_path}.exe"; then
26068       input_to_shortpath="${new_path}.exe"
26069    elif test -f "${new_path}.cmd"; then
26070       input_to_shortpath="${new_path}.cmd"
26071    else
26072      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26073$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26074      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26075$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26076      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26077    fi
26078  else
26079    input_to_shortpath="$new_path"
26080  fi
26081
26082  # Call helper function which possibly converts this using DOS-style short mode.
26083  # If so, the updated path is stored in $new_path.
26084  new_path="$input_to_shortpath"
26085
26086  input_path="$input_to_shortpath"
26087  # Check if we need to convert this using DOS-style short mode. If the path
26088  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26089  # take no chances and rewrite it.
26090  # Note: m4 eats our [], so we need to use [ and ] instead.
26091  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26092  if test "x$has_forbidden_chars" != x; then
26093    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26094    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26095    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26096    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26097      # Going to short mode and back again did indeed matter. Since short mode is
26098      # case insensitive, let's make it lowercase to improve readability.
26099      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26100      # Now convert it back to Unix-stile (cygpath)
26101      input_path=`$CYGPATH -u "$shortmode_path"`
26102      new_path="$input_path"
26103    fi
26104  fi
26105
26106  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26107  if test "x$test_cygdrive_prefix" = x; then
26108    # As a simple fix, exclude /usr/bin since it's not a real path.
26109    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26110      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26111      # a path prefixed by /cygdrive for fixpath to work.
26112      new_path="$CYGWIN_ROOT_PATH$input_path"
26113    fi
26114  fi
26115
26116  # remove trailing .exe if any
26117  new_path="${new_path/%.exe/}"
26118
26119  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26120
26121  # First separate the path from the arguments. This will split at the first
26122  # space.
26123  complete="$STRIP"
26124  path="${complete%% *}"
26125  tmp="$complete EOL"
26126  arguments="${tmp#* }"
26127
26128  # Input might be given as Windows format, start by converting to
26129  # unix format.
26130  new_path="$path"
26131
26132  windows_path="$new_path"
26133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26134    unix_path=`$CYGPATH -u "$windows_path"`
26135    new_path="$unix_path"
26136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26137    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26138    new_path="$unix_path"
26139  fi
26140
26141
26142  # Now try to locate executable using which
26143  new_path=`$WHICH "$new_path" 2> /dev/null`
26144
26145  if test "x$new_path" = x; then
26146    # Oops. Which didn't find the executable.
26147    # The splitting of arguments from the executable at a space might have been incorrect,
26148    # since paths with space are more likely in Windows. Give it another try with the whole
26149    # argument.
26150    path="$complete"
26151    arguments="EOL"
26152    new_path="$path"
26153
26154  windows_path="$new_path"
26155  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26156    unix_path=`$CYGPATH -u "$windows_path"`
26157    new_path="$unix_path"
26158  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26159    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26160    new_path="$unix_path"
26161  fi
26162
26163
26164    new_path=`$WHICH "$new_path" 2> /dev/null`
26165
26166    if test "x$new_path" = x; then
26167      # It's still not found. Now this is an unrecoverable error.
26168      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26169$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26170      has_space=`$ECHO "$complete" | $GREP " "`
26171      if test "x$has_space" != x; then
26172        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26173$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26174      fi
26175      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26176    fi
26177  fi
26178
26179  # Now new_path has a complete unix path to the binary
26180  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26181    # Keep paths in /bin as-is, but remove trailing .exe if any
26182    new_path="${new_path/%.exe/}"
26183    # Do not save /bin paths to all_fixpath_prefixes!
26184  else
26185    # Not in mixed or Windows style, start by that.
26186    new_path=`cmd //c echo $new_path`
26187
26188  input_path="$new_path"
26189  # Check if we need to convert this using DOS-style short mode. If the path
26190  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26191  # take no chances and rewrite it.
26192  # Note: m4 eats our [], so we need to use [ and ] instead.
26193  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26194  if test "x$has_forbidden_chars" != x; then
26195    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26196    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26197  fi
26198
26199    # Output is in $new_path
26200
26201  windows_path="$new_path"
26202  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26203    unix_path=`$CYGPATH -u "$windows_path"`
26204    new_path="$unix_path"
26205  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26206    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26207    new_path="$unix_path"
26208  fi
26209
26210    # remove trailing .exe if any
26211    new_path="${new_path/%.exe/}"
26212
26213    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26214    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26215  fi
26216
26217  else
26218    # We're on a posix platform. Hooray! :)
26219    # First separate the path from the arguments. This will split at the first
26220    # space.
26221    complete="$STRIP"
26222    path="${complete%% *}"
26223    tmp="$complete EOL"
26224    arguments="${tmp#* }"
26225
26226    # Cannot rely on the command "which" here since it doesn't always work.
26227    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26228    if test -z "$is_absolute_path"; then
26229      # Path to executable is not absolute. Find it.
26230      IFS_save="$IFS"
26231      IFS=:
26232      for p in $PATH; do
26233        if test -f "$p/$path" && test -x "$p/$path"; then
26234          new_path="$p/$path"
26235          break
26236        fi
26237      done
26238      IFS="$IFS_save"
26239    else
26240      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26241$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26242      new_path="$path"
26243    fi
26244
26245    if test "x$new_path" = x; then
26246        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26247$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26248        has_space=`$ECHO "$complete" | $GREP " "`
26249        if test "x$has_space" != x; then
26250          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26251$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26252        fi
26253        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26254      fi
26255  fi
26256
26257      # Now join together the path and the arguments once again
26258      if test "x$arguments" != xEOL; then
26259        new_complete="$new_path ${arguments% *}"
26260      else
26261        new_complete="$new_path"
26262      fi
26263
26264  if test "x$complete" != "x$new_complete"; then
26265      STRIP="$new_complete"
26266      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26267$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26268    fi
26269
26270    # Extract the first word of "mcs", so it can be a program name with args.
26271set dummy mcs; ac_word=$2
26272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26273$as_echo_n "checking for $ac_word... " >&6; }
26274if ${ac_cv_path_MCS+:} false; then :
26275  $as_echo_n "(cached) " >&6
26276else
26277  case $MCS in
26278  [\\/]* | ?:[\\/]*)
26279  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
26280  ;;
26281  *)
26282  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26283for as_dir in $PATH
26284do
26285  IFS=$as_save_IFS
26286  test -z "$as_dir" && as_dir=.
26287    for ac_exec_ext in '' $ac_executable_extensions; do
26288  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26289    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
26290    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26291    break 2
26292  fi
26293done
26294  done
26295IFS=$as_save_IFS
26296
26297  ;;
26298esac
26299fi
26300MCS=$ac_cv_path_MCS
26301if test -n "$MCS"; then
26302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
26303$as_echo "$MCS" >&6; }
26304else
26305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26306$as_echo "no" >&6; }
26307fi
26308
26309
26310
26311  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26312
26313  # First separate the path from the arguments. This will split at the first
26314  # space.
26315  complete="$MCS"
26316  path="${complete%% *}"
26317  tmp="$complete EOL"
26318  arguments="${tmp#* }"
26319
26320  # Input might be given as Windows format, start by converting to
26321  # unix format.
26322  new_path=`$CYGPATH -u "$path"`
26323
26324  # Now try to locate executable using which
26325  new_path=`$WHICH "$new_path" 2> /dev/null`
26326  # bat and cmd files are not always considered executable in cygwin causing which
26327  # to not find them
26328  if test "x$new_path" = x \
26329           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26330           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26331    new_path=`$CYGPATH -u "$path"`
26332  fi
26333  if test "x$new_path" = x; then
26334    # Oops. Which didn't find the executable.
26335    # The splitting of arguments from the executable at a space might have been incorrect,
26336    # since paths with space are more likely in Windows. Give it another try with the whole
26337    # argument.
26338    path="$complete"
26339    arguments="EOL"
26340    new_path=`$CYGPATH -u "$path"`
26341    new_path=`$WHICH "$new_path" 2> /dev/null`
26342    # bat and cmd files are not always considered executable in cygwin causing which
26343    # to not find them
26344    if test "x$new_path" = x \
26345             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26346             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26347      new_path=`$CYGPATH -u "$path"`
26348    fi
26349    if test "x$new_path" = x; then
26350      # It's still not found. Now this is an unrecoverable error.
26351      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26352$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26353      has_space=`$ECHO "$complete" | $GREP " "`
26354      if test "x$has_space" != x; then
26355        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26356$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26357      fi
26358      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26359    fi
26360  fi
26361
26362  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26363  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26364  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26365  # "foo.exe" is OK but "foo" is an error.
26366  #
26367  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26368  # It is also a way to make sure we got the proper file name for the real test later on.
26369  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26370  if test "x$test_shortpath" = x; then
26371    # Short path failed, file does not exist as specified.
26372    # Try adding .exe or .cmd
26373    if test -f "${new_path}.exe"; then
26374       input_to_shortpath="${new_path}.exe"
26375    elif test -f "${new_path}.cmd"; then
26376       input_to_shortpath="${new_path}.cmd"
26377    else
26378      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
26379$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
26380      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26381$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26382      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26383    fi
26384  else
26385    input_to_shortpath="$new_path"
26386  fi
26387
26388  # Call helper function which possibly converts this using DOS-style short mode.
26389  # If so, the updated path is stored in $new_path.
26390  new_path="$input_to_shortpath"
26391
26392  input_path="$input_to_shortpath"
26393  # Check if we need to convert this using DOS-style short mode. If the path
26394  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26395  # take no chances and rewrite it.
26396  # Note: m4 eats our [], so we need to use [ and ] instead.
26397  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26398  if test "x$has_forbidden_chars" != x; then
26399    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26400    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26401    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26402    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26403      # Going to short mode and back again did indeed matter. Since short mode is
26404      # case insensitive, let's make it lowercase to improve readability.
26405      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26406      # Now convert it back to Unix-stile (cygpath)
26407      input_path=`$CYGPATH -u "$shortmode_path"`
26408      new_path="$input_path"
26409    fi
26410  fi
26411
26412  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26413  if test "x$test_cygdrive_prefix" = x; then
26414    # As a simple fix, exclude /usr/bin since it's not a real path.
26415    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26416      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26417      # a path prefixed by /cygdrive for fixpath to work.
26418      new_path="$CYGWIN_ROOT_PATH$input_path"
26419    fi
26420  fi
26421
26422  # remove trailing .exe if any
26423  new_path="${new_path/%.exe/}"
26424
26425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26426
26427  # First separate the path from the arguments. This will split at the first
26428  # space.
26429  complete="$MCS"
26430  path="${complete%% *}"
26431  tmp="$complete EOL"
26432  arguments="${tmp#* }"
26433
26434  # Input might be given as Windows format, start by converting to
26435  # unix format.
26436  new_path="$path"
26437
26438  windows_path="$new_path"
26439  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26440    unix_path=`$CYGPATH -u "$windows_path"`
26441    new_path="$unix_path"
26442  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26443    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26444    new_path="$unix_path"
26445  fi
26446
26447
26448  # Now try to locate executable using which
26449  new_path=`$WHICH "$new_path" 2> /dev/null`
26450
26451  if test "x$new_path" = x; then
26452    # Oops. Which didn't find the executable.
26453    # The splitting of arguments from the executable at a space might have been incorrect,
26454    # since paths with space are more likely in Windows. Give it another try with the whole
26455    # argument.
26456    path="$complete"
26457    arguments="EOL"
26458    new_path="$path"
26459
26460  windows_path="$new_path"
26461  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26462    unix_path=`$CYGPATH -u "$windows_path"`
26463    new_path="$unix_path"
26464  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26465    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26466    new_path="$unix_path"
26467  fi
26468
26469
26470    new_path=`$WHICH "$new_path" 2> /dev/null`
26471
26472    if test "x$new_path" = x; then
26473      # It's still not found. Now this is an unrecoverable error.
26474      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26475$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26476      has_space=`$ECHO "$complete" | $GREP " "`
26477      if test "x$has_space" != x; then
26478        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26479$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26480      fi
26481      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26482    fi
26483  fi
26484
26485  # Now new_path has a complete unix path to the binary
26486  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26487    # Keep paths in /bin as-is, but remove trailing .exe if any
26488    new_path="${new_path/%.exe/}"
26489    # Do not save /bin paths to all_fixpath_prefixes!
26490  else
26491    # Not in mixed or Windows style, start by that.
26492    new_path=`cmd //c echo $new_path`
26493
26494  input_path="$new_path"
26495  # Check if we need to convert this using DOS-style short mode. If the path
26496  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26497  # take no chances and rewrite it.
26498  # Note: m4 eats our [], so we need to use [ and ] instead.
26499  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26500  if test "x$has_forbidden_chars" != x; then
26501    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26502    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26503  fi
26504
26505    # Output is in $new_path
26506
26507  windows_path="$new_path"
26508  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26509    unix_path=`$CYGPATH -u "$windows_path"`
26510    new_path="$unix_path"
26511  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26512    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26513    new_path="$unix_path"
26514  fi
26515
26516    # remove trailing .exe if any
26517    new_path="${new_path/%.exe/}"
26518
26519    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26520    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26521  fi
26522
26523  else
26524    # We're on a posix platform. Hooray! :)
26525    # First separate the path from the arguments. This will split at the first
26526    # space.
26527    complete="$MCS"
26528    path="${complete%% *}"
26529    tmp="$complete EOL"
26530    arguments="${tmp#* }"
26531
26532    # Cannot rely on the command "which" here since it doesn't always work.
26533    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26534    if test -z "$is_absolute_path"; then
26535      # Path to executable is not absolute. Find it.
26536      IFS_save="$IFS"
26537      IFS=:
26538      for p in $PATH; do
26539        if test -f "$p/$path" && test -x "$p/$path"; then
26540          new_path="$p/$path"
26541          break
26542        fi
26543      done
26544      IFS="$IFS_save"
26545    else
26546      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
26547$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
26548      new_path="$path"
26549    fi
26550
26551    if test "x$new_path" = x; then
26552        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26553$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26554        has_space=`$ECHO "$complete" | $GREP " "`
26555        if test "x$has_space" != x; then
26556          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26557$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26558        fi
26559        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26560      fi
26561  fi
26562
26563      # Now join together the path and the arguments once again
26564      if test "x$arguments" != xEOL; then
26565        new_complete="$new_path ${arguments% *}"
26566      else
26567        new_complete="$new_path"
26568      fi
26569
26570  if test "x$complete" != "x$new_complete"; then
26571      MCS="$new_complete"
26572      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
26573$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
26574    fi
26575
26576elif test "x$OPENJDK_TARGET_OS" != xwindows; then
26577    if test -n "$ac_tool_prefix"; then
26578  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
26579set dummy ${ac_tool_prefix}nm; ac_word=$2
26580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26581$as_echo_n "checking for $ac_word... " >&6; }
26582if ${ac_cv_prog_NM+:} false; then :
26583  $as_echo_n "(cached) " >&6
26584else
26585  if test -n "$NM"; then
26586  ac_cv_prog_NM="$NM" # Let the user override the test.
26587else
26588as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26589for as_dir in $PATH
26590do
26591  IFS=$as_save_IFS
26592  test -z "$as_dir" && as_dir=.
26593    for ac_exec_ext in '' $ac_executable_extensions; do
26594  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26595    ac_cv_prog_NM="${ac_tool_prefix}nm"
26596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26597    break 2
26598  fi
26599done
26600  done
26601IFS=$as_save_IFS
26602
26603fi
26604fi
26605NM=$ac_cv_prog_NM
26606if test -n "$NM"; then
26607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
26608$as_echo "$NM" >&6; }
26609else
26610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26611$as_echo "no" >&6; }
26612fi
26613
26614
26615fi
26616if test -z "$ac_cv_prog_NM"; then
26617  ac_ct_NM=$NM
26618  # Extract the first word of "nm", so it can be a program name with args.
26619set dummy nm; ac_word=$2
26620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26621$as_echo_n "checking for $ac_word... " >&6; }
26622if ${ac_cv_prog_ac_ct_NM+:} false; then :
26623  $as_echo_n "(cached) " >&6
26624else
26625  if test -n "$ac_ct_NM"; then
26626  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
26627else
26628as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26629for as_dir in $PATH
26630do
26631  IFS=$as_save_IFS
26632  test -z "$as_dir" && as_dir=.
26633    for ac_exec_ext in '' $ac_executable_extensions; do
26634  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26635    ac_cv_prog_ac_ct_NM="nm"
26636    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26637    break 2
26638  fi
26639done
26640  done
26641IFS=$as_save_IFS
26642
26643fi
26644fi
26645ac_ct_NM=$ac_cv_prog_ac_ct_NM
26646if test -n "$ac_ct_NM"; then
26647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
26648$as_echo "$ac_ct_NM" >&6; }
26649else
26650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26651$as_echo "no" >&6; }
26652fi
26653
26654  if test "x$ac_ct_NM" = x; then
26655    NM=""
26656  else
26657    case $cross_compiling:$ac_tool_warned in
26658yes:)
26659{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26660$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26661ac_tool_warned=yes ;;
26662esac
26663    NM=$ac_ct_NM
26664  fi
26665else
26666  NM="$ac_cv_prog_NM"
26667fi
26668
26669
26670  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26671
26672  # First separate the path from the arguments. This will split at the first
26673  # space.
26674  complete="$NM"
26675  path="${complete%% *}"
26676  tmp="$complete EOL"
26677  arguments="${tmp#* }"
26678
26679  # Input might be given as Windows format, start by converting to
26680  # unix format.
26681  new_path=`$CYGPATH -u "$path"`
26682
26683  # Now try to locate executable using which
26684  new_path=`$WHICH "$new_path" 2> /dev/null`
26685  # bat and cmd files are not always considered executable in cygwin causing which
26686  # to not find them
26687  if test "x$new_path" = x \
26688           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26689           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26690    new_path=`$CYGPATH -u "$path"`
26691  fi
26692  if test "x$new_path" = x; then
26693    # Oops. Which didn't find the executable.
26694    # The splitting of arguments from the executable at a space might have been incorrect,
26695    # since paths with space are more likely in Windows. Give it another try with the whole
26696    # argument.
26697    path="$complete"
26698    arguments="EOL"
26699    new_path=`$CYGPATH -u "$path"`
26700    new_path=`$WHICH "$new_path" 2> /dev/null`
26701    # bat and cmd files are not always considered executable in cygwin causing which
26702    # to not find them
26703    if test "x$new_path" = x \
26704             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26705             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26706      new_path=`$CYGPATH -u "$path"`
26707    fi
26708    if test "x$new_path" = x; then
26709      # It's still not found. Now this is an unrecoverable error.
26710      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26711$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26712      has_space=`$ECHO "$complete" | $GREP " "`
26713      if test "x$has_space" != x; then
26714        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26715$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26716      fi
26717      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26718    fi
26719  fi
26720
26721  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26722  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26723  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26724  # "foo.exe" is OK but "foo" is an error.
26725  #
26726  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26727  # It is also a way to make sure we got the proper file name for the real test later on.
26728  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26729  if test "x$test_shortpath" = x; then
26730    # Short path failed, file does not exist as specified.
26731    # Try adding .exe or .cmd
26732    if test -f "${new_path}.exe"; then
26733       input_to_shortpath="${new_path}.exe"
26734    elif test -f "${new_path}.cmd"; then
26735       input_to_shortpath="${new_path}.cmd"
26736    else
26737      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
26738$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
26739      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26740$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26741      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26742    fi
26743  else
26744    input_to_shortpath="$new_path"
26745  fi
26746
26747  # Call helper function which possibly converts this using DOS-style short mode.
26748  # If so, the updated path is stored in $new_path.
26749  new_path="$input_to_shortpath"
26750
26751  input_path="$input_to_shortpath"
26752  # Check if we need to convert this using DOS-style short mode. If the path
26753  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26754  # take no chances and rewrite it.
26755  # Note: m4 eats our [], so we need to use [ and ] instead.
26756  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26757  if test "x$has_forbidden_chars" != x; then
26758    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26759    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26760    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26761    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26762      # Going to short mode and back again did indeed matter. Since short mode is
26763      # case insensitive, let's make it lowercase to improve readability.
26764      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26765      # Now convert it back to Unix-stile (cygpath)
26766      input_path=`$CYGPATH -u "$shortmode_path"`
26767      new_path="$input_path"
26768    fi
26769  fi
26770
26771  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26772  if test "x$test_cygdrive_prefix" = x; then
26773    # As a simple fix, exclude /usr/bin since it's not a real path.
26774    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26775      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26776      # a path prefixed by /cygdrive for fixpath to work.
26777      new_path="$CYGWIN_ROOT_PATH$input_path"
26778    fi
26779  fi
26780
26781  # remove trailing .exe if any
26782  new_path="${new_path/%.exe/}"
26783
26784  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26785
26786  # First separate the path from the arguments. This will split at the first
26787  # space.
26788  complete="$NM"
26789  path="${complete%% *}"
26790  tmp="$complete EOL"
26791  arguments="${tmp#* }"
26792
26793  # Input might be given as Windows format, start by converting to
26794  # unix format.
26795  new_path="$path"
26796
26797  windows_path="$new_path"
26798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26799    unix_path=`$CYGPATH -u "$windows_path"`
26800    new_path="$unix_path"
26801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26802    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26803    new_path="$unix_path"
26804  fi
26805
26806
26807  # Now try to locate executable using which
26808  new_path=`$WHICH "$new_path" 2> /dev/null`
26809
26810  if test "x$new_path" = x; then
26811    # Oops. Which didn't find the executable.
26812    # The splitting of arguments from the executable at a space might have been incorrect,
26813    # since paths with space are more likely in Windows. Give it another try with the whole
26814    # argument.
26815    path="$complete"
26816    arguments="EOL"
26817    new_path="$path"
26818
26819  windows_path="$new_path"
26820  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26821    unix_path=`$CYGPATH -u "$windows_path"`
26822    new_path="$unix_path"
26823  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26824    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26825    new_path="$unix_path"
26826  fi
26827
26828
26829    new_path=`$WHICH "$new_path" 2> /dev/null`
26830
26831    if test "x$new_path" = x; then
26832      # It's still not found. Now this is an unrecoverable error.
26833      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26834$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26835      has_space=`$ECHO "$complete" | $GREP " "`
26836      if test "x$has_space" != x; then
26837        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26838$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26839      fi
26840      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26841    fi
26842  fi
26843
26844  # Now new_path has a complete unix path to the binary
26845  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26846    # Keep paths in /bin as-is, but remove trailing .exe if any
26847    new_path="${new_path/%.exe/}"
26848    # Do not save /bin paths to all_fixpath_prefixes!
26849  else
26850    # Not in mixed or Windows style, start by that.
26851    new_path=`cmd //c echo $new_path`
26852
26853  input_path="$new_path"
26854  # Check if we need to convert this using DOS-style short mode. If the path
26855  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26856  # take no chances and rewrite it.
26857  # Note: m4 eats our [], so we need to use [ and ] instead.
26858  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26859  if test "x$has_forbidden_chars" != x; then
26860    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26861    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26862  fi
26863
26864    # Output is in $new_path
26865
26866  windows_path="$new_path"
26867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26868    unix_path=`$CYGPATH -u "$windows_path"`
26869    new_path="$unix_path"
26870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26871    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26872    new_path="$unix_path"
26873  fi
26874
26875    # remove trailing .exe if any
26876    new_path="${new_path/%.exe/}"
26877
26878    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26879    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26880  fi
26881
26882  else
26883    # We're on a posix platform. Hooray! :)
26884    # First separate the path from the arguments. This will split at the first
26885    # space.
26886    complete="$NM"
26887    path="${complete%% *}"
26888    tmp="$complete EOL"
26889    arguments="${tmp#* }"
26890
26891    # Cannot rely on the command "which" here since it doesn't always work.
26892    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26893    if test -z "$is_absolute_path"; then
26894      # Path to executable is not absolute. Find it.
26895      IFS_save="$IFS"
26896      IFS=:
26897      for p in $PATH; do
26898        if test -f "$p/$path" && test -x "$p/$path"; then
26899          new_path="$p/$path"
26900          break
26901        fi
26902      done
26903      IFS="$IFS_save"
26904    else
26905      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
26906$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
26907      new_path="$path"
26908    fi
26909
26910    if test "x$new_path" = x; then
26911        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26912$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26913        has_space=`$ECHO "$complete" | $GREP " "`
26914        if test "x$has_space" != x; then
26915          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26916$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26917        fi
26918        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26919      fi
26920  fi
26921
26922      # Now join together the path and the arguments once again
26923      if test "x$arguments" != xEOL; then
26924        new_complete="$new_path ${arguments% *}"
26925      else
26926        new_complete="$new_path"
26927      fi
26928
26929  if test "x$complete" != "x$new_complete"; then
26930      NM="$new_complete"
26931      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
26932$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
26933    fi
26934
26935    GNM="$NM"
26936
26937    if test -n "$ac_tool_prefix"; then
26938  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
26939set dummy ${ac_tool_prefix}strip; ac_word=$2
26940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26941$as_echo_n "checking for $ac_word... " >&6; }
26942if ${ac_cv_prog_STRIP+:} false; then :
26943  $as_echo_n "(cached) " >&6
26944else
26945  if test -n "$STRIP"; then
26946  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
26947else
26948as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26949for as_dir in $PATH
26950do
26951  IFS=$as_save_IFS
26952  test -z "$as_dir" && as_dir=.
26953    for ac_exec_ext in '' $ac_executable_extensions; do
26954  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26955    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
26956    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26957    break 2
26958  fi
26959done
26960  done
26961IFS=$as_save_IFS
26962
26963fi
26964fi
26965STRIP=$ac_cv_prog_STRIP
26966if test -n "$STRIP"; then
26967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
26968$as_echo "$STRIP" >&6; }
26969else
26970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26971$as_echo "no" >&6; }
26972fi
26973
26974
26975fi
26976if test -z "$ac_cv_prog_STRIP"; then
26977  ac_ct_STRIP=$STRIP
26978  # Extract the first word of "strip", so it can be a program name with args.
26979set dummy strip; ac_word=$2
26980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26981$as_echo_n "checking for $ac_word... " >&6; }
26982if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
26983  $as_echo_n "(cached) " >&6
26984else
26985  if test -n "$ac_ct_STRIP"; then
26986  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
26987else
26988as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26989for as_dir in $PATH
26990do
26991  IFS=$as_save_IFS
26992  test -z "$as_dir" && as_dir=.
26993    for ac_exec_ext in '' $ac_executable_extensions; do
26994  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26995    ac_cv_prog_ac_ct_STRIP="strip"
26996    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26997    break 2
26998  fi
26999done
27000  done
27001IFS=$as_save_IFS
27002
27003fi
27004fi
27005ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
27006if test -n "$ac_ct_STRIP"; then
27007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
27008$as_echo "$ac_ct_STRIP" >&6; }
27009else
27010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27011$as_echo "no" >&6; }
27012fi
27013
27014  if test "x$ac_ct_STRIP" = x; then
27015    STRIP=""
27016  else
27017    case $cross_compiling:$ac_tool_warned in
27018yes:)
27019{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27020$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27021ac_tool_warned=yes ;;
27022esac
27023    STRIP=$ac_ct_STRIP
27024  fi
27025else
27026  STRIP="$ac_cv_prog_STRIP"
27027fi
27028
27029
27030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27031
27032  # First separate the path from the arguments. This will split at the first
27033  # space.
27034  complete="$STRIP"
27035  path="${complete%% *}"
27036  tmp="$complete EOL"
27037  arguments="${tmp#* }"
27038
27039  # Input might be given as Windows format, start by converting to
27040  # unix format.
27041  new_path=`$CYGPATH -u "$path"`
27042
27043  # Now try to locate executable using which
27044  new_path=`$WHICH "$new_path" 2> /dev/null`
27045  # bat and cmd files are not always considered executable in cygwin causing which
27046  # to not find them
27047  if test "x$new_path" = x \
27048           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27049           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27050    new_path=`$CYGPATH -u "$path"`
27051  fi
27052  if test "x$new_path" = x; then
27053    # Oops. Which didn't find the executable.
27054    # The splitting of arguments from the executable at a space might have been incorrect,
27055    # since paths with space are more likely in Windows. Give it another try with the whole
27056    # argument.
27057    path="$complete"
27058    arguments="EOL"
27059    new_path=`$CYGPATH -u "$path"`
27060    new_path=`$WHICH "$new_path" 2> /dev/null`
27061    # bat and cmd files are not always considered executable in cygwin causing which
27062    # to not find them
27063    if test "x$new_path" = x \
27064             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27065             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27066      new_path=`$CYGPATH -u "$path"`
27067    fi
27068    if test "x$new_path" = x; then
27069      # It's still not found. Now this is an unrecoverable error.
27070      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27071$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27072      has_space=`$ECHO "$complete" | $GREP " "`
27073      if test "x$has_space" != x; then
27074        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27075$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27076      fi
27077      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27078    fi
27079  fi
27080
27081  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27082  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27083  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27084  # "foo.exe" is OK but "foo" is an error.
27085  #
27086  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27087  # It is also a way to make sure we got the proper file name for the real test later on.
27088  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27089  if test "x$test_shortpath" = x; then
27090    # Short path failed, file does not exist as specified.
27091    # Try adding .exe or .cmd
27092    if test -f "${new_path}.exe"; then
27093       input_to_shortpath="${new_path}.exe"
27094    elif test -f "${new_path}.cmd"; then
27095       input_to_shortpath="${new_path}.cmd"
27096    else
27097      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
27098$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
27099      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27100$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27101      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27102    fi
27103  else
27104    input_to_shortpath="$new_path"
27105  fi
27106
27107  # Call helper function which possibly converts this using DOS-style short mode.
27108  # If so, the updated path is stored in $new_path.
27109  new_path="$input_to_shortpath"
27110
27111  input_path="$input_to_shortpath"
27112  # Check if we need to convert this using DOS-style short mode. If the path
27113  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27114  # take no chances and rewrite it.
27115  # Note: m4 eats our [], so we need to use [ and ] instead.
27116  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27117  if test "x$has_forbidden_chars" != x; then
27118    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27119    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27120    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27121    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27122      # Going to short mode and back again did indeed matter. Since short mode is
27123      # case insensitive, let's make it lowercase to improve readability.
27124      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27125      # Now convert it back to Unix-stile (cygpath)
27126      input_path=`$CYGPATH -u "$shortmode_path"`
27127      new_path="$input_path"
27128    fi
27129  fi
27130
27131  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27132  if test "x$test_cygdrive_prefix" = x; then
27133    # As a simple fix, exclude /usr/bin since it's not a real path.
27134    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27135      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27136      # a path prefixed by /cygdrive for fixpath to work.
27137      new_path="$CYGWIN_ROOT_PATH$input_path"
27138    fi
27139  fi
27140
27141  # remove trailing .exe if any
27142  new_path="${new_path/%.exe/}"
27143
27144  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27145
27146  # First separate the path from the arguments. This will split at the first
27147  # space.
27148  complete="$STRIP"
27149  path="${complete%% *}"
27150  tmp="$complete EOL"
27151  arguments="${tmp#* }"
27152
27153  # Input might be given as Windows format, start by converting to
27154  # unix format.
27155  new_path="$path"
27156
27157  windows_path="$new_path"
27158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27159    unix_path=`$CYGPATH -u "$windows_path"`
27160    new_path="$unix_path"
27161  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27162    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27163    new_path="$unix_path"
27164  fi
27165
27166
27167  # Now try to locate executable using which
27168  new_path=`$WHICH "$new_path" 2> /dev/null`
27169
27170  if test "x$new_path" = x; then
27171    # Oops. Which didn't find the executable.
27172    # The splitting of arguments from the executable at a space might have been incorrect,
27173    # since paths with space are more likely in Windows. Give it another try with the whole
27174    # argument.
27175    path="$complete"
27176    arguments="EOL"
27177    new_path="$path"
27178
27179  windows_path="$new_path"
27180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27181    unix_path=`$CYGPATH -u "$windows_path"`
27182    new_path="$unix_path"
27183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27185    new_path="$unix_path"
27186  fi
27187
27188
27189    new_path=`$WHICH "$new_path" 2> /dev/null`
27190
27191    if test "x$new_path" = x; then
27192      # It's still not found. Now this is an unrecoverable error.
27193      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27194$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27195      has_space=`$ECHO "$complete" | $GREP " "`
27196      if test "x$has_space" != x; then
27197        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27198$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27199      fi
27200      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27201    fi
27202  fi
27203
27204  # Now new_path has a complete unix path to the binary
27205  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27206    # Keep paths in /bin as-is, but remove trailing .exe if any
27207    new_path="${new_path/%.exe/}"
27208    # Do not save /bin paths to all_fixpath_prefixes!
27209  else
27210    # Not in mixed or Windows style, start by that.
27211    new_path=`cmd //c echo $new_path`
27212
27213  input_path="$new_path"
27214  # Check if we need to convert this using DOS-style short mode. If the path
27215  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27216  # take no chances and rewrite it.
27217  # Note: m4 eats our [], so we need to use [ and ] instead.
27218  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27219  if test "x$has_forbidden_chars" != x; then
27220    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27221    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27222  fi
27223
27224    # Output is in $new_path
27225
27226  windows_path="$new_path"
27227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27228    unix_path=`$CYGPATH -u "$windows_path"`
27229    new_path="$unix_path"
27230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27231    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27232    new_path="$unix_path"
27233  fi
27234
27235    # remove trailing .exe if any
27236    new_path="${new_path/%.exe/}"
27237
27238    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27239    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27240  fi
27241
27242  else
27243    # We're on a posix platform. Hooray! :)
27244    # First separate the path from the arguments. This will split at the first
27245    # space.
27246    complete="$STRIP"
27247    path="${complete%% *}"
27248    tmp="$complete EOL"
27249    arguments="${tmp#* }"
27250
27251    # Cannot rely on the command "which" here since it doesn't always work.
27252    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27253    if test -z "$is_absolute_path"; then
27254      # Path to executable is not absolute. Find it.
27255      IFS_save="$IFS"
27256      IFS=:
27257      for p in $PATH; do
27258        if test -f "$p/$path" && test -x "$p/$path"; then
27259          new_path="$p/$path"
27260          break
27261        fi
27262      done
27263      IFS="$IFS_save"
27264    else
27265      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
27266$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
27267      new_path="$path"
27268    fi
27269
27270    if test "x$new_path" = x; then
27271        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27272$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27273        has_space=`$ECHO "$complete" | $GREP " "`
27274        if test "x$has_space" != x; then
27275          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27276$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27277        fi
27278        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27279      fi
27280  fi
27281
27282      # Now join together the path and the arguments once again
27283      if test "x$arguments" != xEOL; then
27284        new_complete="$new_path ${arguments% *}"
27285      else
27286        new_complete="$new_path"
27287      fi
27288
27289  if test "x$complete" != "x$new_complete"; then
27290      STRIP="$new_complete"
27291      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
27292$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
27293    fi
27294
27295fi
27296
27297# objcopy is used for moving debug symbols to separate files when
27298# full debug symbols are enabled.
27299if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
27300    if test -n "$ac_tool_prefix"; then
27301  for ac_prog in gobjcopy objcopy
27302  do
27303    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27304set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27306$as_echo_n "checking for $ac_word... " >&6; }
27307if ${ac_cv_prog_OBJCOPY+:} false; then :
27308  $as_echo_n "(cached) " >&6
27309else
27310  if test -n "$OBJCOPY"; then
27311  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
27312else
27313as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27314for as_dir in $PATH
27315do
27316  IFS=$as_save_IFS
27317  test -z "$as_dir" && as_dir=.
27318    for ac_exec_ext in '' $ac_executable_extensions; do
27319  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27320    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
27321    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27322    break 2
27323  fi
27324done
27325  done
27326IFS=$as_save_IFS
27327
27328fi
27329fi
27330OBJCOPY=$ac_cv_prog_OBJCOPY
27331if test -n "$OBJCOPY"; then
27332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
27333$as_echo "$OBJCOPY" >&6; }
27334else
27335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27336$as_echo "no" >&6; }
27337fi
27338
27339
27340    test -n "$OBJCOPY" && break
27341  done
27342fi
27343if test -z "$OBJCOPY"; then
27344  ac_ct_OBJCOPY=$OBJCOPY
27345  for ac_prog in gobjcopy objcopy
27346do
27347  # Extract the first word of "$ac_prog", so it can be a program name with args.
27348set dummy $ac_prog; ac_word=$2
27349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27350$as_echo_n "checking for $ac_word... " >&6; }
27351if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
27352  $as_echo_n "(cached) " >&6
27353else
27354  if test -n "$ac_ct_OBJCOPY"; then
27355  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
27356else
27357as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27358for as_dir in $PATH
27359do
27360  IFS=$as_save_IFS
27361  test -z "$as_dir" && as_dir=.
27362    for ac_exec_ext in '' $ac_executable_extensions; do
27363  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27364    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
27365    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27366    break 2
27367  fi
27368done
27369  done
27370IFS=$as_save_IFS
27371
27372fi
27373fi
27374ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
27375if test -n "$ac_ct_OBJCOPY"; then
27376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
27377$as_echo "$ac_ct_OBJCOPY" >&6; }
27378else
27379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27380$as_echo "no" >&6; }
27381fi
27382
27383
27384  test -n "$ac_ct_OBJCOPY" && break
27385done
27386
27387  if test "x$ac_ct_OBJCOPY" = x; then
27388    OBJCOPY=""
27389  else
27390    case $cross_compiling:$ac_tool_warned in
27391yes:)
27392{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27393$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27394ac_tool_warned=yes ;;
27395esac
27396    OBJCOPY=$ac_ct_OBJCOPY
27397  fi
27398fi
27399
27400    # Only call fixup if objcopy was found.
27401    if test -n "$OBJCOPY"; then
27402
27403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27404
27405  # First separate the path from the arguments. This will split at the first
27406  # space.
27407  complete="$OBJCOPY"
27408  path="${complete%% *}"
27409  tmp="$complete EOL"
27410  arguments="${tmp#* }"
27411
27412  # Input might be given as Windows format, start by converting to
27413  # unix format.
27414  new_path=`$CYGPATH -u "$path"`
27415
27416  # Now try to locate executable using which
27417  new_path=`$WHICH "$new_path" 2> /dev/null`
27418  # bat and cmd files are not always considered executable in cygwin causing which
27419  # to not find them
27420  if test "x$new_path" = x \
27421           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27422           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27423    new_path=`$CYGPATH -u "$path"`
27424  fi
27425  if test "x$new_path" = x; then
27426    # Oops. Which didn't find the executable.
27427    # The splitting of arguments from the executable at a space might have been incorrect,
27428    # since paths with space are more likely in Windows. Give it another try with the whole
27429    # argument.
27430    path="$complete"
27431    arguments="EOL"
27432    new_path=`$CYGPATH -u "$path"`
27433    new_path=`$WHICH "$new_path" 2> /dev/null`
27434    # bat and cmd files are not always considered executable in cygwin causing which
27435    # to not find them
27436    if test "x$new_path" = x \
27437             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27438             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27439      new_path=`$CYGPATH -u "$path"`
27440    fi
27441    if test "x$new_path" = x; then
27442      # It's still not found. Now this is an unrecoverable error.
27443      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27444$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27445      has_space=`$ECHO "$complete" | $GREP " "`
27446      if test "x$has_space" != x; then
27447        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27448$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27449      fi
27450      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27451    fi
27452  fi
27453
27454  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27455  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27456  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27457  # "foo.exe" is OK but "foo" is an error.
27458  #
27459  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27460  # It is also a way to make sure we got the proper file name for the real test later on.
27461  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27462  if test "x$test_shortpath" = x; then
27463    # Short path failed, file does not exist as specified.
27464    # Try adding .exe or .cmd
27465    if test -f "${new_path}.exe"; then
27466       input_to_shortpath="${new_path}.exe"
27467    elif test -f "${new_path}.cmd"; then
27468       input_to_shortpath="${new_path}.cmd"
27469    else
27470      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
27471$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
27472      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27473$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27474      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27475    fi
27476  else
27477    input_to_shortpath="$new_path"
27478  fi
27479
27480  # Call helper function which possibly converts this using DOS-style short mode.
27481  # If so, the updated path is stored in $new_path.
27482  new_path="$input_to_shortpath"
27483
27484  input_path="$input_to_shortpath"
27485  # Check if we need to convert this using DOS-style short mode. If the path
27486  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27487  # take no chances and rewrite it.
27488  # Note: m4 eats our [], so we need to use [ and ] instead.
27489  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27490  if test "x$has_forbidden_chars" != x; then
27491    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27492    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27493    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27494    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27495      # Going to short mode and back again did indeed matter. Since short mode is
27496      # case insensitive, let's make it lowercase to improve readability.
27497      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27498      # Now convert it back to Unix-stile (cygpath)
27499      input_path=`$CYGPATH -u "$shortmode_path"`
27500      new_path="$input_path"
27501    fi
27502  fi
27503
27504  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27505  if test "x$test_cygdrive_prefix" = x; then
27506    # As a simple fix, exclude /usr/bin since it's not a real path.
27507    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27508      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27509      # a path prefixed by /cygdrive for fixpath to work.
27510      new_path="$CYGWIN_ROOT_PATH$input_path"
27511    fi
27512  fi
27513
27514  # remove trailing .exe if any
27515  new_path="${new_path/%.exe/}"
27516
27517  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27518
27519  # First separate the path from the arguments. This will split at the first
27520  # space.
27521  complete="$OBJCOPY"
27522  path="${complete%% *}"
27523  tmp="$complete EOL"
27524  arguments="${tmp#* }"
27525
27526  # Input might be given as Windows format, start by converting to
27527  # unix format.
27528  new_path="$path"
27529
27530  windows_path="$new_path"
27531  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27532    unix_path=`$CYGPATH -u "$windows_path"`
27533    new_path="$unix_path"
27534  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27535    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27536    new_path="$unix_path"
27537  fi
27538
27539
27540  # Now try to locate executable using which
27541  new_path=`$WHICH "$new_path" 2> /dev/null`
27542
27543  if test "x$new_path" = x; then
27544    # Oops. Which didn't find the executable.
27545    # The splitting of arguments from the executable at a space might have been incorrect,
27546    # since paths with space are more likely in Windows. Give it another try with the whole
27547    # argument.
27548    path="$complete"
27549    arguments="EOL"
27550    new_path="$path"
27551
27552  windows_path="$new_path"
27553  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27554    unix_path=`$CYGPATH -u "$windows_path"`
27555    new_path="$unix_path"
27556  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27557    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27558    new_path="$unix_path"
27559  fi
27560
27561
27562    new_path=`$WHICH "$new_path" 2> /dev/null`
27563
27564    if test "x$new_path" = x; then
27565      # It's still not found. Now this is an unrecoverable error.
27566      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27567$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27568      has_space=`$ECHO "$complete" | $GREP " "`
27569      if test "x$has_space" != x; then
27570        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27571$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27572      fi
27573      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27574    fi
27575  fi
27576
27577  # Now new_path has a complete unix path to the binary
27578  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27579    # Keep paths in /bin as-is, but remove trailing .exe if any
27580    new_path="${new_path/%.exe/}"
27581    # Do not save /bin paths to all_fixpath_prefixes!
27582  else
27583    # Not in mixed or Windows style, start by that.
27584    new_path=`cmd //c echo $new_path`
27585
27586  input_path="$new_path"
27587  # Check if we need to convert this using DOS-style short mode. If the path
27588  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27589  # take no chances and rewrite it.
27590  # Note: m4 eats our [], so we need to use [ and ] instead.
27591  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27592  if test "x$has_forbidden_chars" != x; then
27593    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27594    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27595  fi
27596
27597    # Output is in $new_path
27598
27599  windows_path="$new_path"
27600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27601    unix_path=`$CYGPATH -u "$windows_path"`
27602    new_path="$unix_path"
27603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27604    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27605    new_path="$unix_path"
27606  fi
27607
27608    # remove trailing .exe if any
27609    new_path="${new_path/%.exe/}"
27610
27611    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27612    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27613  fi
27614
27615  else
27616    # We're on a posix platform. Hooray! :)
27617    # First separate the path from the arguments. This will split at the first
27618    # space.
27619    complete="$OBJCOPY"
27620    path="${complete%% *}"
27621    tmp="$complete EOL"
27622    arguments="${tmp#* }"
27623
27624    # Cannot rely on the command "which" here since it doesn't always work.
27625    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27626    if test -z "$is_absolute_path"; then
27627      # Path to executable is not absolute. Find it.
27628      IFS_save="$IFS"
27629      IFS=:
27630      for p in $PATH; do
27631        if test -f "$p/$path" && test -x "$p/$path"; then
27632          new_path="$p/$path"
27633          break
27634        fi
27635      done
27636      IFS="$IFS_save"
27637    else
27638      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
27639$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
27640      new_path="$path"
27641    fi
27642
27643    if test "x$new_path" = x; then
27644        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27645$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27646        has_space=`$ECHO "$complete" | $GREP " "`
27647        if test "x$has_space" != x; then
27648          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27649$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27650        fi
27651        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27652      fi
27653  fi
27654
27655      # Now join together the path and the arguments once again
27656      if test "x$arguments" != xEOL; then
27657        new_complete="$new_path ${arguments% *}"
27658      else
27659        new_complete="$new_path"
27660      fi
27661
27662  if test "x$complete" != "x$new_complete"; then
27663      OBJCOPY="$new_complete"
27664      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
27665$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
27666    fi
27667
27668    fi
27669fi
27670
27671if test -n "$ac_tool_prefix"; then
27672  for ac_prog in gobjdump objdump
27673  do
27674    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27675set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27677$as_echo_n "checking for $ac_word... " >&6; }
27678if ${ac_cv_prog_OBJDUMP+:} false; then :
27679  $as_echo_n "(cached) " >&6
27680else
27681  if test -n "$OBJDUMP"; then
27682  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
27683else
27684as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27685for as_dir in $PATH
27686do
27687  IFS=$as_save_IFS
27688  test -z "$as_dir" && as_dir=.
27689    for ac_exec_ext in '' $ac_executable_extensions; do
27690  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27691    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
27692    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27693    break 2
27694  fi
27695done
27696  done
27697IFS=$as_save_IFS
27698
27699fi
27700fi
27701OBJDUMP=$ac_cv_prog_OBJDUMP
27702if test -n "$OBJDUMP"; then
27703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
27704$as_echo "$OBJDUMP" >&6; }
27705else
27706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27707$as_echo "no" >&6; }
27708fi
27709
27710
27711    test -n "$OBJDUMP" && break
27712  done
27713fi
27714if test -z "$OBJDUMP"; then
27715  ac_ct_OBJDUMP=$OBJDUMP
27716  for ac_prog in gobjdump objdump
27717do
27718  # Extract the first word of "$ac_prog", so it can be a program name with args.
27719set dummy $ac_prog; ac_word=$2
27720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27721$as_echo_n "checking for $ac_word... " >&6; }
27722if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
27723  $as_echo_n "(cached) " >&6
27724else
27725  if test -n "$ac_ct_OBJDUMP"; then
27726  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
27727else
27728as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27729for as_dir in $PATH
27730do
27731  IFS=$as_save_IFS
27732  test -z "$as_dir" && as_dir=.
27733    for ac_exec_ext in '' $ac_executable_extensions; do
27734  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27735    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
27736    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27737    break 2
27738  fi
27739done
27740  done
27741IFS=$as_save_IFS
27742
27743fi
27744fi
27745ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
27746if test -n "$ac_ct_OBJDUMP"; then
27747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
27748$as_echo "$ac_ct_OBJDUMP" >&6; }
27749else
27750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27751$as_echo "no" >&6; }
27752fi
27753
27754
27755  test -n "$ac_ct_OBJDUMP" && break
27756done
27757
27758  if test "x$ac_ct_OBJDUMP" = x; then
27759    OBJDUMP=""
27760  else
27761    case $cross_compiling:$ac_tool_warned in
27762yes:)
27763{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27764$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27765ac_tool_warned=yes ;;
27766esac
27767    OBJDUMP=$ac_ct_OBJDUMP
27768  fi
27769fi
27770
27771if test "x$OBJDUMP" != x; then
27772  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
27773
27774  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27775
27776  # First separate the path from the arguments. This will split at the first
27777  # space.
27778  complete="$OBJDUMP"
27779  path="${complete%% *}"
27780  tmp="$complete EOL"
27781  arguments="${tmp#* }"
27782
27783  # Input might be given as Windows format, start by converting to
27784  # unix format.
27785  new_path=`$CYGPATH -u "$path"`
27786
27787  # Now try to locate executable using which
27788  new_path=`$WHICH "$new_path" 2> /dev/null`
27789  # bat and cmd files are not always considered executable in cygwin causing which
27790  # to not find them
27791  if test "x$new_path" = x \
27792           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27793           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27794    new_path=`$CYGPATH -u "$path"`
27795  fi
27796  if test "x$new_path" = x; then
27797    # Oops. Which didn't find the executable.
27798    # The splitting of arguments from the executable at a space might have been incorrect,
27799    # since paths with space are more likely in Windows. Give it another try with the whole
27800    # argument.
27801    path="$complete"
27802    arguments="EOL"
27803    new_path=`$CYGPATH -u "$path"`
27804    new_path=`$WHICH "$new_path" 2> /dev/null`
27805    # bat and cmd files are not always considered executable in cygwin causing which
27806    # to not find them
27807    if test "x$new_path" = x \
27808             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27809             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27810      new_path=`$CYGPATH -u "$path"`
27811    fi
27812    if test "x$new_path" = x; then
27813      # It's still not found. Now this is an unrecoverable error.
27814      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27815$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27816      has_space=`$ECHO "$complete" | $GREP " "`
27817      if test "x$has_space" != x; then
27818        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27819$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27820      fi
27821      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27822    fi
27823  fi
27824
27825  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27826  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27827  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27828  # "foo.exe" is OK but "foo" is an error.
27829  #
27830  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27831  # It is also a way to make sure we got the proper file name for the real test later on.
27832  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27833  if test "x$test_shortpath" = x; then
27834    # Short path failed, file does not exist as specified.
27835    # Try adding .exe or .cmd
27836    if test -f "${new_path}.exe"; then
27837       input_to_shortpath="${new_path}.exe"
27838    elif test -f "${new_path}.cmd"; then
27839       input_to_shortpath="${new_path}.cmd"
27840    else
27841      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
27842$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
27843      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27844$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27845      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27846    fi
27847  else
27848    input_to_shortpath="$new_path"
27849  fi
27850
27851  # Call helper function which possibly converts this using DOS-style short mode.
27852  # If so, the updated path is stored in $new_path.
27853  new_path="$input_to_shortpath"
27854
27855  input_path="$input_to_shortpath"
27856  # Check if we need to convert this using DOS-style short mode. If the path
27857  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27858  # take no chances and rewrite it.
27859  # Note: m4 eats our [], so we need to use [ and ] instead.
27860  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27861  if test "x$has_forbidden_chars" != x; then
27862    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27863    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27864    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27865    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27866      # Going to short mode and back again did indeed matter. Since short mode is
27867      # case insensitive, let's make it lowercase to improve readability.
27868      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27869      # Now convert it back to Unix-stile (cygpath)
27870      input_path=`$CYGPATH -u "$shortmode_path"`
27871      new_path="$input_path"
27872    fi
27873  fi
27874
27875  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27876  if test "x$test_cygdrive_prefix" = x; then
27877    # As a simple fix, exclude /usr/bin since it's not a real path.
27878    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27879      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27880      # a path prefixed by /cygdrive for fixpath to work.
27881      new_path="$CYGWIN_ROOT_PATH$input_path"
27882    fi
27883  fi
27884
27885  # remove trailing .exe if any
27886  new_path="${new_path/%.exe/}"
27887
27888  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27889
27890  # First separate the path from the arguments. This will split at the first
27891  # space.
27892  complete="$OBJDUMP"
27893  path="${complete%% *}"
27894  tmp="$complete EOL"
27895  arguments="${tmp#* }"
27896
27897  # Input might be given as Windows format, start by converting to
27898  # unix format.
27899  new_path="$path"
27900
27901  windows_path="$new_path"
27902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27903    unix_path=`$CYGPATH -u "$windows_path"`
27904    new_path="$unix_path"
27905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27906    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27907    new_path="$unix_path"
27908  fi
27909
27910
27911  # Now try to locate executable using which
27912  new_path=`$WHICH "$new_path" 2> /dev/null`
27913
27914  if test "x$new_path" = x; then
27915    # Oops. Which didn't find the executable.
27916    # The splitting of arguments from the executable at a space might have been incorrect,
27917    # since paths with space are more likely in Windows. Give it another try with the whole
27918    # argument.
27919    path="$complete"
27920    arguments="EOL"
27921    new_path="$path"
27922
27923  windows_path="$new_path"
27924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27925    unix_path=`$CYGPATH -u "$windows_path"`
27926    new_path="$unix_path"
27927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27928    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27929    new_path="$unix_path"
27930  fi
27931
27932
27933    new_path=`$WHICH "$new_path" 2> /dev/null`
27934
27935    if test "x$new_path" = x; then
27936      # It's still not found. Now this is an unrecoverable error.
27937      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27938$as_echo "$as_me: The path of OBJDUMP, 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}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27942$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27943      fi
27944      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27945    fi
27946  fi
27947
27948  # Now new_path has a complete unix path to the binary
27949  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27950    # Keep paths in /bin as-is, but remove trailing .exe if any
27951    new_path="${new_path/%.exe/}"
27952    # Do not save /bin paths to all_fixpath_prefixes!
27953  else
27954    # Not in mixed or Windows style, start by that.
27955    new_path=`cmd //c echo $new_path`
27956
27957  input_path="$new_path"
27958  # Check if we need to convert this using DOS-style short mode. If the path
27959  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27960  # take no chances and rewrite it.
27961  # Note: m4 eats our [], so we need to use [ and ] instead.
27962  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27963  if test "x$has_forbidden_chars" != x; then
27964    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27965    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27966  fi
27967
27968    # Output is in $new_path
27969
27970  windows_path="$new_path"
27971  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27972    unix_path=`$CYGPATH -u "$windows_path"`
27973    new_path="$unix_path"
27974  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27975    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27976    new_path="$unix_path"
27977  fi
27978
27979    # remove trailing .exe if any
27980    new_path="${new_path/%.exe/}"
27981
27982    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27983    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27984  fi
27985
27986  else
27987    # We're on a posix platform. Hooray! :)
27988    # First separate the path from the arguments. This will split at the first
27989    # space.
27990    complete="$OBJDUMP"
27991    path="${complete%% *}"
27992    tmp="$complete EOL"
27993    arguments="${tmp#* }"
27994
27995    # Cannot rely on the command "which" here since it doesn't always work.
27996    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27997    if test -z "$is_absolute_path"; then
27998      # Path to executable is not absolute. Find it.
27999      IFS_save="$IFS"
28000      IFS=:
28001      for p in $PATH; do
28002        if test -f "$p/$path" && test -x "$p/$path"; then
28003          new_path="$p/$path"
28004          break
28005        fi
28006      done
28007      IFS="$IFS_save"
28008    else
28009      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
28010$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
28011      new_path="$path"
28012    fi
28013
28014    if test "x$new_path" = x; then
28015        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28016$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28017        has_space=`$ECHO "$complete" | $GREP " "`
28018        if test "x$has_space" != x; then
28019          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28020$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28021        fi
28022        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28023      fi
28024  fi
28025
28026      # Now join together the path and the arguments once again
28027      if test "x$arguments" != xEOL; then
28028        new_complete="$new_path ${arguments% *}"
28029      else
28030        new_complete="$new_path"
28031      fi
28032
28033  if test "x$complete" != "x$new_complete"; then
28034      OBJDUMP="$new_complete"
28035      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
28036$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
28037    fi
28038
28039fi
28040
28041if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
28042   # Extract the first word of "lipo", so it can be a program name with args.
28043set dummy lipo; ac_word=$2
28044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28045$as_echo_n "checking for $ac_word... " >&6; }
28046if ${ac_cv_path_LIPO+:} false; then :
28047  $as_echo_n "(cached) " >&6
28048else
28049  case $LIPO in
28050  [\\/]* | ?:[\\/]*)
28051  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
28052  ;;
28053  *)
28054  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28055for as_dir in $PATH
28056do
28057  IFS=$as_save_IFS
28058  test -z "$as_dir" && as_dir=.
28059    for ac_exec_ext in '' $ac_executable_extensions; do
28060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28061    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
28062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28063    break 2
28064  fi
28065done
28066  done
28067IFS=$as_save_IFS
28068
28069  ;;
28070esac
28071fi
28072LIPO=$ac_cv_path_LIPO
28073if test -n "$LIPO"; then
28074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
28075$as_echo "$LIPO" >&6; }
28076else
28077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28078$as_echo "no" >&6; }
28079fi
28080
28081
28082
28083  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28084
28085  # First separate the path from the arguments. This will split at the first
28086  # space.
28087  complete="$LIPO"
28088  path="${complete%% *}"
28089  tmp="$complete EOL"
28090  arguments="${tmp#* }"
28091
28092  # Input might be given as Windows format, start by converting to
28093  # unix format.
28094  new_path=`$CYGPATH -u "$path"`
28095
28096  # Now try to locate executable using which
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    # Oops. Which didn't find the executable.
28107    # The splitting of arguments from the executable at a space might have been incorrect,
28108    # since paths with space are more likely in Windows. Give it another try with the whole
28109    # argument.
28110    path="$complete"
28111    arguments="EOL"
28112    new_path=`$CYGPATH -u "$path"`
28113    new_path=`$WHICH "$new_path" 2> /dev/null`
28114    # bat and cmd files are not always considered executable in cygwin causing which
28115    # to not find them
28116    if test "x$new_path" = x \
28117             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28118             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28119      new_path=`$CYGPATH -u "$path"`
28120    fi
28121    if test "x$new_path" = x; then
28122      # It's still not found. Now this is an unrecoverable error.
28123      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28124$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28125      has_space=`$ECHO "$complete" | $GREP " "`
28126      if test "x$has_space" != x; then
28127        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28128$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28129      fi
28130      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28131    fi
28132  fi
28133
28134  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28135  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28136  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28137  # "foo.exe" is OK but "foo" is an error.
28138  #
28139  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28140  # It is also a way to make sure we got the proper file name for the real test later on.
28141  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28142  if test "x$test_shortpath" = x; then
28143    # Short path failed, file does not exist as specified.
28144    # Try adding .exe or .cmd
28145    if test -f "${new_path}.exe"; then
28146       input_to_shortpath="${new_path}.exe"
28147    elif test -f "${new_path}.cmd"; then
28148       input_to_shortpath="${new_path}.cmd"
28149    else
28150      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
28151$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
28152      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28153$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28154      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28155    fi
28156  else
28157    input_to_shortpath="$new_path"
28158  fi
28159
28160  # Call helper function which possibly converts this using DOS-style short mode.
28161  # If so, the updated path is stored in $new_path.
28162  new_path="$input_to_shortpath"
28163
28164  input_path="$input_to_shortpath"
28165  # Check if we need to convert this using DOS-style short mode. If the path
28166  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28167  # take no chances and rewrite it.
28168  # Note: m4 eats our [], so we need to use [ and ] instead.
28169  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28170  if test "x$has_forbidden_chars" != x; then
28171    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28172    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28173    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28174    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28175      # Going to short mode and back again did indeed matter. Since short mode is
28176      # case insensitive, let's make it lowercase to improve readability.
28177      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28178      # Now convert it back to Unix-stile (cygpath)
28179      input_path=`$CYGPATH -u "$shortmode_path"`
28180      new_path="$input_path"
28181    fi
28182  fi
28183
28184  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28185  if test "x$test_cygdrive_prefix" = x; then
28186    # As a simple fix, exclude /usr/bin since it's not a real path.
28187    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28188      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28189      # a path prefixed by /cygdrive for fixpath to work.
28190      new_path="$CYGWIN_ROOT_PATH$input_path"
28191    fi
28192  fi
28193
28194  # remove trailing .exe if any
28195  new_path="${new_path/%.exe/}"
28196
28197  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28198
28199  # First separate the path from the arguments. This will split at the first
28200  # space.
28201  complete="$LIPO"
28202  path="${complete%% *}"
28203  tmp="$complete EOL"
28204  arguments="${tmp#* }"
28205
28206  # Input might be given as Windows format, start by converting to
28207  # unix format.
28208  new_path="$path"
28209
28210  windows_path="$new_path"
28211  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28212    unix_path=`$CYGPATH -u "$windows_path"`
28213    new_path="$unix_path"
28214  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28215    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28216    new_path="$unix_path"
28217  fi
28218
28219
28220  # Now try to locate executable using which
28221  new_path=`$WHICH "$new_path" 2> /dev/null`
28222
28223  if test "x$new_path" = x; then
28224    # Oops. Which didn't find the executable.
28225    # The splitting of arguments from the executable at a space might have been incorrect,
28226    # since paths with space are more likely in Windows. Give it another try with the whole
28227    # argument.
28228    path="$complete"
28229    arguments="EOL"
28230    new_path="$path"
28231
28232  windows_path="$new_path"
28233  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28234    unix_path=`$CYGPATH -u "$windows_path"`
28235    new_path="$unix_path"
28236  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28237    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28238    new_path="$unix_path"
28239  fi
28240
28241
28242    new_path=`$WHICH "$new_path" 2> /dev/null`
28243
28244    if test "x$new_path" = x; then
28245      # It's still not found. Now this is an unrecoverable error.
28246      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28247$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28248      has_space=`$ECHO "$complete" | $GREP " "`
28249      if test "x$has_space" != x; then
28250        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28251$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28252      fi
28253      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28254    fi
28255  fi
28256
28257  # Now new_path has a complete unix path to the binary
28258  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28259    # Keep paths in /bin as-is, but remove trailing .exe if any
28260    new_path="${new_path/%.exe/}"
28261    # Do not save /bin paths to all_fixpath_prefixes!
28262  else
28263    # Not in mixed or Windows style, start by that.
28264    new_path=`cmd //c echo $new_path`
28265
28266  input_path="$new_path"
28267  # Check if we need to convert this using DOS-style short mode. If the path
28268  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28269  # take no chances and rewrite it.
28270  # Note: m4 eats our [], so we need to use [ and ] instead.
28271  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28272  if test "x$has_forbidden_chars" != x; then
28273    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28274    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28275  fi
28276
28277    # Output is in $new_path
28278
28279  windows_path="$new_path"
28280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28281    unix_path=`$CYGPATH -u "$windows_path"`
28282    new_path="$unix_path"
28283  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28284    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28285    new_path="$unix_path"
28286  fi
28287
28288    # remove trailing .exe if any
28289    new_path="${new_path/%.exe/}"
28290
28291    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28292    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28293  fi
28294
28295  else
28296    # We're on a posix platform. Hooray! :)
28297    # First separate the path from the arguments. This will split at the first
28298    # space.
28299    complete="$LIPO"
28300    path="${complete%% *}"
28301    tmp="$complete EOL"
28302    arguments="${tmp#* }"
28303
28304    # Cannot rely on the command "which" here since it doesn't always work.
28305    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28306    if test -z "$is_absolute_path"; then
28307      # Path to executable is not absolute. Find it.
28308      IFS_save="$IFS"
28309      IFS=:
28310      for p in $PATH; do
28311        if test -f "$p/$path" && test -x "$p/$path"; then
28312          new_path="$p/$path"
28313          break
28314        fi
28315      done
28316      IFS="$IFS_save"
28317    else
28318      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
28319$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
28320      new_path="$path"
28321    fi
28322
28323    if test "x$new_path" = x; then
28324        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28325$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28326        has_space=`$ECHO "$complete" | $GREP " "`
28327        if test "x$has_space" != x; then
28328          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28329$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28330        fi
28331        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28332      fi
28333  fi
28334
28335      # Now join together the path and the arguments once again
28336      if test "x$arguments" != xEOL; then
28337        new_complete="$new_path ${arguments% *}"
28338      else
28339        new_complete="$new_path"
28340      fi
28341
28342  if test "x$complete" != "x$new_complete"; then
28343      LIPO="$new_complete"
28344      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
28345$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
28346    fi
28347
28348fi
28349
28350
28351
28352# Restore old path without tools dir
28353PATH="$OLD_PATH"
28354
28355
28356# FIXME: Currently we must test this after paths but before flags. Fix!
28357
28358# And we can test some aspects on the target using configure macros.
28359
28360
28361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
28362$as_echo_n "checking for ANSI C header files... " >&6; }
28363if ${ac_cv_header_stdc+:} false; then :
28364  $as_echo_n "(cached) " >&6
28365else
28366  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28367/* end confdefs.h.  */
28368#include <stdlib.h>
28369#include <stdarg.h>
28370#include <string.h>
28371#include <float.h>
28372
28373int
28374main ()
28375{
28376
28377  ;
28378  return 0;
28379}
28380_ACEOF
28381if ac_fn_cxx_try_compile "$LINENO"; then :
28382  ac_cv_header_stdc=yes
28383else
28384  ac_cv_header_stdc=no
28385fi
28386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28387
28388if test $ac_cv_header_stdc = yes; then
28389  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
28390  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28391/* end confdefs.h.  */
28392#include <string.h>
28393
28394_ACEOF
28395if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28396  $EGREP "memchr" >/dev/null 2>&1; then :
28397
28398else
28399  ac_cv_header_stdc=no
28400fi
28401rm -f conftest*
28402
28403fi
28404
28405if test $ac_cv_header_stdc = yes; then
28406  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
28407  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28408/* end confdefs.h.  */
28409#include <stdlib.h>
28410
28411_ACEOF
28412if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28413  $EGREP "free" >/dev/null 2>&1; then :
28414
28415else
28416  ac_cv_header_stdc=no
28417fi
28418rm -f conftest*
28419
28420fi
28421
28422if test $ac_cv_header_stdc = yes; then
28423  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
28424  if test "$cross_compiling" = yes; then :
28425  :
28426else
28427  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28428/* end confdefs.h.  */
28429#include <ctype.h>
28430#include <stdlib.h>
28431#if ((' ' & 0x0FF) == 0x020)
28432# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
28433# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
28434#else
28435# define ISLOWER(c) \
28436		   (('a' <= (c) && (c) <= 'i') \
28437		     || ('j' <= (c) && (c) <= 'r') \
28438		     || ('s' <= (c) && (c) <= 'z'))
28439# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
28440#endif
28441
28442#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
28443int
28444main ()
28445{
28446  int i;
28447  for (i = 0; i < 256; i++)
28448    if (XOR (islower (i), ISLOWER (i))
28449	|| toupper (i) != TOUPPER (i))
28450      return 2;
28451  return 0;
28452}
28453_ACEOF
28454if ac_fn_cxx_try_run "$LINENO"; then :
28455
28456else
28457  ac_cv_header_stdc=no
28458fi
28459rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28460  conftest.$ac_objext conftest.beam conftest.$ac_ext
28461fi
28462
28463fi
28464fi
28465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
28466$as_echo "$ac_cv_header_stdc" >&6; }
28467if test $ac_cv_header_stdc = yes; then
28468
28469$as_echo "#define STDC_HEADERS 1" >>confdefs.h
28470
28471fi
28472
28473# On IRIX 5.3, sys/types and inttypes.h are conflicting.
28474for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
28475		  inttypes.h stdint.h unistd.h
28476do :
28477  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28478ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
28479"
28480if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28481  cat >>confdefs.h <<_ACEOF
28482#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28483_ACEOF
28484
28485fi
28486
28487done
28488
28489
28490
28491###############################################################################
28492#
28493# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
28494# (The JVM can use 32 or 64 bit Java pointers but that decision
28495# is made at runtime.)
28496#
28497
28498if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28499  # Always specify -m flags on Solaris
28500
28501  # When we add flags to the "official" CFLAGS etc, we need to
28502  # keep track of these additions in ADDED_CFLAGS etc. These
28503  # will later be checked to make sure only controlled additions
28504  # have been made to CFLAGS etc.
28505  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28506  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28507  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28508
28509  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28510  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28511  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28512
28513  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28514  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28515  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28516
28517elif test "x$COMPILE_TYPE" = xreduced; then
28518  if test "x$OPENJDK_TARGET_OS" != xwindows; then
28519    # Specify -m if running reduced on other Posix platforms
28520
28521  # When we add flags to the "official" CFLAGS etc, we need to
28522  # keep track of these additions in ADDED_CFLAGS etc. These
28523  # will later be checked to make sure only controlled additions
28524  # have been made to CFLAGS etc.
28525  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28526  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28527  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28528
28529  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28530  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28531  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28532
28533  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28534  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28535  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28536
28537  fi
28538fi
28539
28540# Make compilation sanity check
28541for ac_header in stdio.h
28542do :
28543  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
28544if test "x$ac_cv_header_stdio_h" = xyes; then :
28545  cat >>confdefs.h <<_ACEOF
28546#define HAVE_STDIO_H 1
28547_ACEOF
28548
28549else
28550
28551  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
28552$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
28553  if test "x$COMPILE_TYPE" = xreduced; then
28554    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
28555$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
28556  elif test "x$COMPILE_TYPE" = xcross; then
28557    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
28558$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
28559  fi
28560  as_fn_error $? "Cannot continue." "$LINENO" 5
28561
28562fi
28563
28564done
28565
28566
28567# The cast to long int works around a bug in the HP C Compiler
28568# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
28569# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
28570# This bug is HP SR number 8606223364.
28571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
28572$as_echo_n "checking size of int *... " >&6; }
28573if ${ac_cv_sizeof_int_p+:} false; then :
28574  $as_echo_n "(cached) " >&6
28575else
28576  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
28577
28578else
28579  if test "$ac_cv_type_int_p" = yes; then
28580     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28581$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28582as_fn_error 77 "cannot compute sizeof (int *)
28583See \`config.log' for more details" "$LINENO" 5; }
28584   else
28585     ac_cv_sizeof_int_p=0
28586   fi
28587fi
28588
28589fi
28590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
28591$as_echo "$ac_cv_sizeof_int_p" >&6; }
28592
28593
28594
28595cat >>confdefs.h <<_ACEOF
28596#define SIZEOF_INT_P $ac_cv_sizeof_int_p
28597_ACEOF
28598
28599
28600
28601if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
28602  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
28603  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
28604fi
28605
28606if test "x$SIZEOF_INT_P" = x; then
28607    # The test failed, lets stick to the assumed value.
28608    { $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
28609$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
28610else
28611    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
28612
28613    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
28614        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
28615    fi
28616fi
28617
28618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
28619$as_echo_n "checking for target address size... " >&6; }
28620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
28621$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
28622
28623
28624###############################################################################
28625#
28626# Is the target little of big endian?
28627#
28628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
28629$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
28630if ${ac_cv_c_bigendian+:} false; then :
28631  $as_echo_n "(cached) " >&6
28632else
28633  ac_cv_c_bigendian=unknown
28634    # See if we're dealing with a universal compiler.
28635    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28636/* end confdefs.h.  */
28637#ifndef __APPLE_CC__
28638	       not a universal capable compiler
28639	     #endif
28640	     typedef int dummy;
28641
28642_ACEOF
28643if ac_fn_cxx_try_compile "$LINENO"; then :
28644
28645	# Check for potential -arch flags.  It is not universal unless
28646	# there are at least two -arch flags with different values.
28647	ac_arch=
28648	ac_prev=
28649	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
28650	 if test -n "$ac_prev"; then
28651	   case $ac_word in
28652	     i?86 | x86_64 | ppc | ppc64)
28653	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
28654		 ac_arch=$ac_word
28655	       else
28656		 ac_cv_c_bigendian=universal
28657		 break
28658	       fi
28659	       ;;
28660	   esac
28661	   ac_prev=
28662	 elif test "x$ac_word" = "x-arch"; then
28663	   ac_prev=arch
28664	 fi
28665       done
28666fi
28667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28668    if test $ac_cv_c_bigendian = unknown; then
28669      # See if sys/param.h defines the BYTE_ORDER macro.
28670      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28671/* end confdefs.h.  */
28672#include <sys/types.h>
28673	     #include <sys/param.h>
28674
28675int
28676main ()
28677{
28678#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
28679		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
28680		     && LITTLE_ENDIAN)
28681	      bogus endian macros
28682	     #endif
28683
28684  ;
28685  return 0;
28686}
28687_ACEOF
28688if ac_fn_cxx_try_compile "$LINENO"; then :
28689  # It does; now see whether it defined to BIG_ENDIAN or not.
28690	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28691/* end confdefs.h.  */
28692#include <sys/types.h>
28693		#include <sys/param.h>
28694
28695int
28696main ()
28697{
28698#if BYTE_ORDER != BIG_ENDIAN
28699		 not big endian
28700		#endif
28701
28702  ;
28703  return 0;
28704}
28705_ACEOF
28706if ac_fn_cxx_try_compile "$LINENO"; then :
28707  ac_cv_c_bigendian=yes
28708else
28709  ac_cv_c_bigendian=no
28710fi
28711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28712fi
28713rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28714    fi
28715    if test $ac_cv_c_bigendian = unknown; then
28716      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
28717      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28718/* end confdefs.h.  */
28719#include <limits.h>
28720
28721int
28722main ()
28723{
28724#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
28725	      bogus endian macros
28726	     #endif
28727
28728  ;
28729  return 0;
28730}
28731_ACEOF
28732if ac_fn_cxx_try_compile "$LINENO"; then :
28733  # It does; now see whether it defined to _BIG_ENDIAN or not.
28734	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28735/* end confdefs.h.  */
28736#include <limits.h>
28737
28738int
28739main ()
28740{
28741#ifndef _BIG_ENDIAN
28742		 not big endian
28743		#endif
28744
28745  ;
28746  return 0;
28747}
28748_ACEOF
28749if ac_fn_cxx_try_compile "$LINENO"; then :
28750  ac_cv_c_bigendian=yes
28751else
28752  ac_cv_c_bigendian=no
28753fi
28754rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28755fi
28756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28757    fi
28758    if test $ac_cv_c_bigendian = unknown; then
28759      # Compile a test program.
28760      if test "$cross_compiling" = yes; then :
28761  # Try to guess by grepping values from an object file.
28762	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28763/* end confdefs.h.  */
28764short int ascii_mm[] =
28765		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
28766		short int ascii_ii[] =
28767		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
28768		int use_ascii (int i) {
28769		  return ascii_mm[i] + ascii_ii[i];
28770		}
28771		short int ebcdic_ii[] =
28772		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
28773		short int ebcdic_mm[] =
28774		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
28775		int use_ebcdic (int i) {
28776		  return ebcdic_mm[i] + ebcdic_ii[i];
28777		}
28778		extern int foo;
28779
28780int
28781main ()
28782{
28783return use_ascii (foo) == use_ebcdic (foo);
28784  ;
28785  return 0;
28786}
28787_ACEOF
28788if ac_fn_cxx_try_compile "$LINENO"; then :
28789  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
28790	      ac_cv_c_bigendian=yes
28791	    fi
28792	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
28793	      if test "$ac_cv_c_bigendian" = unknown; then
28794		ac_cv_c_bigendian=no
28795	      else
28796		# finding both strings is unlikely to happen, but who knows?
28797		ac_cv_c_bigendian=unknown
28798	      fi
28799	    fi
28800fi
28801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28802else
28803  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28804/* end confdefs.h.  */
28805$ac_includes_default
28806int
28807main ()
28808{
28809
28810	     /* Are we little or big endian?  From Harbison&Steele.  */
28811	     union
28812	     {
28813	       long int l;
28814	       char c[sizeof (long int)];
28815	     } u;
28816	     u.l = 1;
28817	     return u.c[sizeof (long int) - 1] == 1;
28818
28819  ;
28820  return 0;
28821}
28822_ACEOF
28823if ac_fn_cxx_try_run "$LINENO"; then :
28824  ac_cv_c_bigendian=no
28825else
28826  ac_cv_c_bigendian=yes
28827fi
28828rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28829  conftest.$ac_objext conftest.beam conftest.$ac_ext
28830fi
28831
28832    fi
28833fi
28834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
28835$as_echo "$ac_cv_c_bigendian" >&6; }
28836 case $ac_cv_c_bigendian in #(
28837   yes)
28838     ENDIAN="big";; #(
28839   no)
28840     ENDIAN="little" ;; #(
28841   universal)
28842     ENDIAN="universal_endianness"
28843     ;; #(
28844   *)
28845     ENDIAN="unknown" ;;
28846 esac
28847
28848
28849if test "x$ENDIAN" = xuniversal_endianness; then
28850    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
28851fi
28852if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
28853    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
28854fi
28855
28856
28857# Configure flags for the tools
28858
28859
28860###############################################################################
28861#
28862# How to compile shared libraries.
28863#
28864
28865if test "x$GCC" = xyes; then
28866    COMPILER_NAME=gcc
28867    PICFLAG="-fPIC"
28868    LIBRARY_PREFIX=lib
28869    SHARED_LIBRARY='lib$1.so'
28870    STATIC_LIBRARY='lib$1.a'
28871    SHARED_LIBRARY_FLAGS="-shared"
28872    SHARED_LIBRARY_SUFFIX='.so'
28873    STATIC_LIBRARY_SUFFIX='.a'
28874    OBJ_SUFFIX='.o'
28875    EXE_SUFFIX=''
28876    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
28877    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
28878    C_FLAG_REORDER=''
28879    CXX_FLAG_REORDER=''
28880    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
28881    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
28882    LD="$CC"
28883    LDEXE="$CC"
28884    LDCXX="$CXX"
28885    LDEXECXX="$CXX"
28886    POST_STRIP_CMD="$STRIP -g"
28887
28888    # Linking is different on MacOSX
28889    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28890        # Might change in the future to clang.
28891        COMPILER_NAME=gcc
28892        SHARED_LIBRARY='lib$1.dylib'
28893        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
28894        SHARED_LIBRARY_SUFFIX='.dylib'
28895        EXE_SUFFIX=''
28896        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
28897        SET_SHARED_LIBRARY_MAPFILE=''
28898        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
28899        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
28900        POST_STRIP_CMD="$STRIP -S"
28901    fi
28902else
28903    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28904        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
28905        COMPILER_NAME=ossc
28906        PICFLAG="-KPIC"
28907        LIBRARY_PREFIX=lib
28908        SHARED_LIBRARY='lib$1.so'
28909        STATIC_LIBRARY='lib$1.a'
28910        SHARED_LIBRARY_FLAGS="-G"
28911        SHARED_LIBRARY_SUFFIX='.so'
28912        STATIC_LIBRARY_SUFFIX='.a'
28913        OBJ_SUFFIX='.o'
28914        EXE_SUFFIX=''
28915        SET_SHARED_LIBRARY_NAME=''
28916        SET_SHARED_LIBRARY_MAPFILE='-M$1'
28917	C_FLAG_REORDER='-xF'
28918	CXX_FLAG_REORDER='-xF'
28919        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
28920        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
28921        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
28922        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
28923        CFLAGS_JDKLIB_EXTRA='-xstrconst'
28924        POST_STRIP_CMD="$STRIP -x"
28925        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
28926    fi
28927    if test "x$OPENJDK_TARGET_OS" = xwindows; then
28928        # If it is not gcc, then assume it is the MS Visual Studio compiler
28929        COMPILER_NAME=cl
28930        PICFLAG=""
28931        LIBRARY_PREFIX=
28932        SHARED_LIBRARY='$1.dll'
28933        STATIC_LIBRARY='$1.lib'
28934        SHARED_LIBRARY_FLAGS="-LD"
28935        SHARED_LIBRARY_SUFFIX='.dll'
28936        STATIC_LIBRARY_SUFFIX='.lib'
28937        OBJ_SUFFIX='.obj'
28938        EXE_SUFFIX='.exe'
28939        SET_SHARED_LIBRARY_NAME=''
28940        SET_SHARED_LIBRARY_MAPFILE=''
28941        SET_SHARED_LIBRARY_ORIGIN=''
28942        SET_EXECUTABLE_ORIGIN=''
28943    fi
28944fi
28945
28946
28947
28948
28949
28950
28951
28952
28953
28954
28955
28956
28957
28958
28959
28960
28961
28962
28963
28964# The (cross) compiler is now configured, we can now test capabilities
28965# of the target platform.
28966
28967
28968
28969###############################################################################
28970#
28971# Setup the opt flags for different compilers
28972# and different operating systems.
28973#
28974
28975#
28976# NOTE: check for -mstackrealign needs to be below potential addition of -m32
28977#
28978if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
28979    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
28980    # While waiting for a better solution, the current workaround is to use -mstackrealign.
28981    CFLAGS="$CFLAGS -mstackrealign"
28982    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
28983$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
28984    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28985/* end confdefs.h.  */
28986int main() { return 0; }
28987_ACEOF
28988if ac_fn_cxx_try_link "$LINENO"; then :
28989
28990		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28991$as_echo "yes" >&6; }
28992
28993else
28994
28995		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28996$as_echo "no" >&6; }
28997	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
28998
28999fi
29000rm -f core conftest.err conftest.$ac_objext \
29001    conftest$ac_exeext conftest.$ac_ext
29002fi
29003
29004C_FLAG_DEPS="-MMD -MF"
29005CXX_FLAG_DEPS="-MMD -MF"
29006
29007case $COMPILER_TYPE in
29008  CC )
29009    case $COMPILER_NAME in
29010      gcc )
29011      	case $OPENJDK_TARGET_OS in
29012	  macosx )
29013	    # On MacOSX we optimize for size, something
29014	    # we should do for all platforms?
29015	    C_O_FLAG_HI="-Os"
29016	    C_O_FLAG_NORM="-Os"
29017	    C_O_FLAG_NONE=""
29018	    ;;
29019	  *)
29020	    C_O_FLAG_HI="-O3"
29021	    C_O_FLAG_NORM="-O2"
29022	    C_O_FLAG_NONE="-O0"
29023	    ;;
29024	esac
29025        CXX_O_FLAG_HI="$C_O_FLAG_HI"
29026        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29027        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29028        CFLAGS_DEBUG_SYMBOLS="-g"
29029        CXXFLAGS_DEBUG_SYMBOLS="-g"
29030        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
29031            CFLAGS_DEBUG_SYMBOLS="-g1"
29032            CXXFLAGS_DEBUG_SYMBOLS="-g1"
29033        fi
29034        ;;
29035      ossc )
29036        #
29037        # Forte has different names for this with their C++ compiler...
29038        #
29039        C_FLAG_DEPS="-xMMD -xMF"
29040        CXX_FLAG_DEPS="-xMMD -xMF"
29041
29042        # Extra options used with HIGHEST
29043        #
29044        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
29045        #          done with care, there are some assumptions below that need to
29046        #          be understood about the use of pointers, and IEEE behavior.
29047        #
29048        # Use non-standard floating point mode (not IEEE 754)
29049        CC_HIGHEST="$CC_HIGHEST -fns"
29050        # Do some simplification of floating point arithmetic (not IEEE 754)
29051        CC_HIGHEST="$CC_HIGHEST -fsimple"
29052        # Use single precision floating point with 'float'
29053        CC_HIGHEST="$CC_HIGHEST -fsingle"
29054        # Assume memory references via basic pointer types do not alias
29055        #   (Source with excessing pointer casting and data access with mixed
29056        #    pointer types are not recommended)
29057        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
29058        # Use intrinsic or inline versions for math/std functions
29059        #   (If you expect perfect errno behavior, do not use this)
29060        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
29061        # Loop data dependency optimizations (need -xO3 or higher)
29062        CC_HIGHEST="$CC_HIGHEST -xdepend"
29063        # Pointer parameters to functions do not overlap
29064        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
29065        #    If you pass in multiple pointers to the same data, do not use this)
29066        CC_HIGHEST="$CC_HIGHEST -xrestrict"
29067        # Inline some library routines
29068        #   (If you expect perfect errno behavior, do not use this)
29069        CC_HIGHEST="$CC_HIGHEST -xlibmil"
29070        # Use optimized math routines
29071        #   (If you expect perfect errno behavior, do not use this)
29072        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
29073        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
29074
29075        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
29076          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
29077          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
29078        fi
29079
29080        case $OPENJDK_TARGET_CPU_ARCH in
29081          x86)
29082            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
29083            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
29084            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
29085            C_O_FLAG_NONE="-xregs=no%frameptr"
29086            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
29087            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
29088            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
29089            CXX_O_FLAG_NONE="-xregs=no%frameptr"
29090            if test "x$OPENJDK_TARGET_CPU" = xx86; then
29091               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
29092               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
29093            fi
29094            ;;
29095          sparc)
29096            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29097            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29098            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29099            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29100            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29101            C_O_FLAG_NONE=""
29102            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29103            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29104            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29105            CXX_O_FLAG_NONE=""
29106            ;;
29107        esac
29108
29109    CFLAGS_DEBUG_SYMBOLS="-g -xs"
29110    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
29111    esac
29112    ;;
29113  CL )
29114    C_O_FLAG_HIGHEST="-O2"
29115    C_O_FLAG_HI="-O1"
29116    C_O_FLAG_NORM="-O1"
29117    C_O_FLAG_NONE="-Od"
29118    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
29119    CXX_O_FLAG_HI="$C_O_FLAG_HI"
29120    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29121    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29122    ;;
29123esac
29124
29125if test -z "$C_O_FLAG_HIGHEST"; then
29126   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
29127fi
29128
29129if test -z "$CXX_O_FLAG_HIGHEST"; then
29130   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
29131fi
29132
29133
29134
29135
29136
29137
29138
29139
29140
29141
29142
29143
29144
29145
29146if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29147   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29148$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29149fi
29150
29151if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29152   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29153$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29154fi
29155
29156if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29157   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29158$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29159fi
29160
29161
29162# Check whether --with-extra-cflags was given.
29163if test "${with_extra_cflags+set}" = set; then :
29164  withval=$with_extra_cflags;
29165fi
29166
29167
29168
29169# Check whether --with-extra-cxxflags was given.
29170if test "${with_extra_cxxflags+set}" = set; then :
29171  withval=$with_extra_cxxflags;
29172fi
29173
29174
29175
29176# Check whether --with-extra-ldflags was given.
29177if test "${with_extra_ldflags+set}" = set; then :
29178  withval=$with_extra_ldflags;
29179fi
29180
29181
29182CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
29183CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
29184LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
29185
29186# Hotspot needs these set in their legacy form
29187LEGACY_EXTRA_CFLAGS=$with_extra_cflags
29188LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
29189LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
29190
29191
29192
29193
29194
29195###############################################################################
29196#
29197# Now setup the CFLAGS and LDFLAGS for the JDK build.
29198# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
29199#
29200case $COMPILER_NAME in
29201      gcc )
29202      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
29203                          -pipe \
29204                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
29205	  case $OPENJDK_TARGET_CPU_ARCH in
29206	  arm )
29207            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
29208	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29209	  ;;
29210	  ppc )
29211            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
29212	  ;;
29213	  * )
29214	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
29215	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29216          ;;
29217	  esac
29218          ;;
29219      ossc )
29220          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
29221          case $OPENJDK_TARGET_CPU_ARCH in
29222          x86 )
29223            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
29224       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
29225          ;;
29226          esac
29227
29228      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
29229      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
29230
29231          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
29232          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
29233          ;;
29234      cl )
29235          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
29236               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
29237	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
29238	       -DWIN32 -DIAL"
29239          case $OPENJDK_TARGET_CPU in
29240              x86 )
29241                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
29242                  ;;
29243              x86_64 )
29244                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
29245                  ;;
29246          esac
29247          ;;
29248esac
29249
29250###############################################################################
29251
29252# Adjust flags according to debug level.
29253case $DEBUG_LEVEL in
29254      fastdebug )
29255              CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29256              CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29257	      C_O_FLAG_HI="$C_O_FLAG_NORM"
29258	      C_O_FLAG_NORM="$C_O_FLAG_NORM"
29259	      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
29260	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
29261              JAVAC_FLAGS="$JAVAC_FLAGS -g"
29262              ;;
29263      slowdebug )
29264              CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29265              CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29266	      C_O_FLAG_HI="$C_O_FLAG_NONE"
29267	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
29268	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
29269	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
29270              JAVAC_FLAGS="$JAVAC_FLAGS -g"
29271              ;;
29272esac
29273
29274CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
29275
29276# The package path is used only on macosx?
29277PACKAGE_PATH=/opt/local
29278
29279
29280if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
29281    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
29282    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
29283    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
29284    #   Note: -Dmacro         is the same as    #define macro 1
29285    #         -Dmacro=	    is the same as    #define macro
29286    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29287        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
29288    else
29289        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
29290    fi
29291else
29292    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
29293fi
29294if test "x$OPENJDK_TARGET_OS" = xlinux; then
29295    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
29296fi
29297if test "x$OPENJDK_TARGET_OS" = xwindows; then
29298    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
29299fi
29300if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29301    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
29302fi
29303if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29304    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
29305    # Setting these parameters makes it an error to link to macosx APIs that are
29306    # newer than the given OS version and makes the linked binaries compatible even
29307    # if built on a newer version of the OS.
29308    # The expected format is X.Y.Z
29309    MACOSX_VERSION_MIN=10.7.0
29310
29311    # The macro takes the version with no dots, ex: 1070
29312    # Let the flags variables get resolved in make for easier override on make
29313    # command line.
29314    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29315    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29316fi
29317if test "x$OPENJDK_TARGET_OS" = xbsd; then
29318    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
29319fi
29320if test "x$DEBUG_LEVEL" = xrelease; then
29321    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
29322    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29323        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
29324    fi
29325else
29326    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
29327fi
29328
29329CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
29330CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
29331
29332CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
29333        -I${JDK_OUTPUTDIR}/include \
29334        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
29335        -I${JDK_TOPDIR}/src/share/javavm/export \
29336        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
29337        -I${JDK_TOPDIR}/src/share/native/common \
29338        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
29339
29340# The shared libraries are compiled using the picflag.
29341CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
29342CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
29343
29344# Executable flags
29345CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
29346CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
29347
29348# Now this is odd. The JDK native libraries have to link against libjvm.so
29349# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
29350# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
29351# is identical for client and server? Yes. Which is picked at runtime (client or server)?
29352# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
29353# libraries will link to whatever is in memory. Yuck.
29354#
29355# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
29356if test "x$COMPILER_NAME" = xcl; then
29357    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
29358    if test "x$OPENJDK_TARGET_CPU" = xx86; then
29359        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
29360    fi
29361    # TODO: make -debug optional "--disable-full-debug-symbols"
29362    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
29363    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
29364    LDFLAGS_JDKLIB_SUFFIX=""
29365    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
29366        LDFLAGS_STACK_SIZE=1048576
29367    else
29368        LDFLAGS_STACK_SIZE=327680
29369    fi
29370    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
29371else
29372    if test "x$COMPILER_NAME" = xgcc; then
29373        # If this is a --hash-style=gnu system, use --hash-style=both, why?
29374        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
29375        if test -n "$HAS_GNU_HASH"; then
29376            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
29377        fi
29378        if test "x$OPENJDK_TARGET_OS" = xlinux; then
29379          # And since we now know that the linker is gnu, then add -z defs, to forbid
29380          # undefined symbols in object files.
29381          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
29382          if test "x$DEBUG_LEVEL" = "xrelease"; then
29383              # When building release libraries, tell the linker optimize them.
29384              # Should this be supplied to the OSS linker as well?
29385              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
29386          fi
29387        fi
29388    fi
29389    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
29390                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
29391
29392    # On some platforms (mac) the linker warns about non existing -L dirs.
29393    # Add server first if available. Linking aginst client does not always produce the same results.
29394    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
29395    # Default to server for other variants.
29396    if test "x$JVM_VARIANT_SERVER" = xtrue; then
29397        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29398    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
29399        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
29400    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
29401        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
29402    else
29403        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29404    fi
29405
29406    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
29407    if test "x$COMPILER_NAME" = xossc; then
29408        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
29409    fi
29410
29411    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
29412    if test "x$OPENJDK_TARGET_OS" = xlinux; then
29413        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
29414    fi
29415fi
29416
29417
29418
29419
29420
29421
29422
29423
29424
29425
29426
29427
29428
29429
29430
29431  # Some Zero and Shark settings.
29432  # ZERO_ARCHFLAG tells the compiler which mode to build for
29433  case "${OPENJDK_TARGET_CPU}" in
29434    s390)
29435      ZERO_ARCHFLAG="-m31"
29436      ;;
29437    *)
29438      ZERO_ARCHFLAG="-m${OPENJDK_TARGET_CPU_BITS}"
29439  esac
29440
29441  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
29442$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
29443  supports=yes
29444
29445  saved_cflags="$CFLAGS"
29446  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
29447  ac_ext=c
29448ac_cpp='$CPP $CPPFLAGS'
29449ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29450ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29451ac_compiler_gnu=$ac_cv_c_compiler_gnu
29452
29453  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29454/* end confdefs.h.  */
29455
29456    int i;
29457
29458_ACEOF
29459if ac_fn_c_try_compile "$LINENO"; then :
29460
29461else
29462  supports=no
29463fi
29464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29465  ac_ext=cpp
29466ac_cpp='$CXXCPP $CPPFLAGS'
29467ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29468ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29469ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29470
29471  CFLAGS="$saved_cflags"
29472
29473  saved_cxxflags="$CXXFLAGS"
29474  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
29475  ac_ext=cpp
29476ac_cpp='$CXXCPP $CPPFLAGS'
29477ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29478ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29479ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29480
29481  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29482/* end confdefs.h.  */
29483
29484    int i;
29485
29486_ACEOF
29487if ac_fn_cxx_try_compile "$LINENO"; then :
29488
29489else
29490  supports=no
29491fi
29492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29493  ac_ext=cpp
29494ac_cpp='$CXXCPP $CPPFLAGS'
29495ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29496ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29497ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29498
29499  CXXFLAGS="$saved_cxxflags"
29500
29501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29502$as_echo "$supports" >&6; }
29503  if test "x$supports" = "xyes" ; then
29504    :
29505  else
29506    ZERO_ARCHFLAG=""
29507  fi
29508
29509
29510
29511  # Check that the compiler supports -mX flags
29512  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
29513
29514  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"" >&5
29515$as_echo_n "checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
29516  supports=yes
29517
29518  saved_cflags="$CFLAGS"
29519  CFLAGS="$CFLAGS -m${OPENJDK_TARGET_CPU_BITS}"
29520  ac_ext=c
29521ac_cpp='$CPP $CPPFLAGS'
29522ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29523ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29524ac_compiler_gnu=$ac_cv_c_compiler_gnu
29525
29526  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29527/* end confdefs.h.  */
29528
29529    int i;
29530
29531_ACEOF
29532if ac_fn_c_try_compile "$LINENO"; then :
29533
29534else
29535  supports=no
29536fi
29537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29538  ac_ext=cpp
29539ac_cpp='$CXXCPP $CPPFLAGS'
29540ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29541ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29542ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29543
29544  CFLAGS="$saved_cflags"
29545
29546  saved_cxxflags="$CXXFLAGS"
29547  CXXFLAGS="$CXXFLAG -m${OPENJDK_TARGET_CPU_BITS}"
29548  ac_ext=cpp
29549ac_cpp='$CXXCPP $CPPFLAGS'
29550ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29551ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29552ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29553
29554  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29555/* end confdefs.h.  */
29556
29557    int i;
29558
29559_ACEOF
29560if ac_fn_cxx_try_compile "$LINENO"; then :
29561
29562else
29563  supports=no
29564fi
29565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29566  ac_ext=cpp
29567ac_cpp='$CXXCPP $CPPFLAGS'
29568ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29569ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29570ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29571
29572  CXXFLAGS="$saved_cxxflags"
29573
29574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29575$as_echo "$supports" >&6; }
29576  if test "x$supports" = "xyes" ; then
29577    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
29578  else
29579    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
29580  fi
29581
29582
29583
29584
29585# Setup debug symbols (need objcopy from the toolchain for that)
29586
29587#
29588# ENABLE_DEBUG_SYMBOLS
29589# This must be done after the toolchain is setup, since we're looking at objcopy.
29590#
29591# Check whether --enable-debug-symbols was given.
29592if test "${enable_debug_symbols+set}" = set; then :
29593  enableval=$enable_debug_symbols;
29594fi
29595
29596
29597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
29598$as_echo_n "checking if we should generate debug symbols... " >&6; }
29599
29600if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
29601   # explicit enabling of enable-debug-symbols and can't find objcopy
29602   #   this is an error
29603   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
29604fi
29605
29606if test "x$enable_debug_symbols" = "xyes"; then
29607  ENABLE_DEBUG_SYMBOLS=true
29608elif test "x$enable_debug_symbols" = "xno"; then
29609  ENABLE_DEBUG_SYMBOLS=false
29610else
29611  # Default is on if objcopy is found
29612  if test "x$OBJCOPY" != x; then
29613    ENABLE_DEBUG_SYMBOLS=true
29614  # MacOS X and Windows don't use objcopy but default is on for those OSes
29615  elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
29616    ENABLE_DEBUG_SYMBOLS=true
29617  else
29618    ENABLE_DEBUG_SYMBOLS=false
29619  fi
29620fi
29621
29622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
29623$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
29624
29625#
29626# ZIP_DEBUGINFO_FILES
29627#
29628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
29629$as_echo_n "checking if we should zip debug-info files... " >&6; }
29630# Check whether --enable-zip-debug-info was given.
29631if test "${enable_zip_debug_info+set}" = set; then :
29632  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
29633else
29634  enable_zip_debug_info="yes"
29635fi
29636
29637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
29638$as_echo "${enable_zip_debug_info}" >&6; }
29639
29640if test "x${enable_zip_debug_info}" = "xno"; then
29641   ZIP_DEBUGINFO_FILES=false
29642else
29643   ZIP_DEBUGINFO_FILES=true
29644fi
29645
29646
29647
29648
29649
29650
29651
29652###############################################################################
29653#
29654# Check dependencies for external and internal libraries.
29655#
29656###############################################################################
29657
29658
29659
29660###############################################################################
29661#
29662# OS specific settings that we never will need to probe.
29663#
29664if test "x$OPENJDK_TARGET_OS" = xlinux; then
29665    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
29666$as_echo_n "checking what is not needed on Linux?... " >&6; }
29667    PULSE_NOT_NEEDED=yes
29668    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
29669$as_echo "pulse" >&6; }
29670fi
29671
29672if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29673    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
29674$as_echo_n "checking what is not needed on Solaris?... " >&6; }
29675    ALSA_NOT_NEEDED=yes
29676    PULSE_NOT_NEEDED=yes
29677    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
29678$as_echo "alsa pulse" >&6; }
29679fi
29680
29681if test "x$OPENJDK_TARGET_OS" = xwindows; then
29682    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
29683$as_echo_n "checking what is not needed on Windows?... " >&6; }
29684    CUPS_NOT_NEEDED=yes
29685    ALSA_NOT_NEEDED=yes
29686    PULSE_NOT_NEEDED=yes
29687    X11_NOT_NEEDED=yes
29688    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
29689$as_echo "alsa cups pulse x11" >&6; }
29690fi
29691
29692if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29693    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
29694$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
29695    ALSA_NOT_NEEDED=yes
29696    PULSE_NOT_NEEDED=yes
29697    X11_NOT_NEEDED=yes
29698    FREETYPE2_NOT_NEEDED=yes
29699    # If the java runtime framework is disabled, then we need X11.
29700    # This will be adjusted below.
29701    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
29702$as_echo "alsa pulse x11" >&6; }
29703fi
29704
29705if test "x$OPENJDK_TARGET_OS" = xbsd; then
29706    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
29707$as_echo_n "checking what is not needed on bsd?... " >&6; }
29708    ALSA_NOT_NEEDED=yes
29709    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
29710$as_echo "alsa" >&6; }
29711fi
29712
29713if test "x$OPENJDK" = "xfalse"; then
29714    FREETYPE2_NOT_NEEDED=yes
29715fi
29716
29717if test "x$SUPPORT_HEADFUL" = xno; then
29718    X11_NOT_NEEDED=yes
29719fi
29720
29721###############################################################################
29722#
29723# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
29724# that uses this API.
29725#
29726# Check whether --enable-macosx-runtime-support was given.
29727if test "${enable_macosx_runtime_support+set}" = set; then :
29728  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
29729else
29730  MACOSX_RUNTIME_SUPPORT="no"
29731fi
29732
29733
29734USE_MACOSX_RUNTIME_SUPPORT=no
29735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
29736$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
29737if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
29738    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
29739        MACOSX_RUNTIME_SUPPORT=yes
29740        USE_MACOSX_RUNTIME_SUPPORT=yes
29741        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
29742$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
29743    else
29744        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
29745$as_echo "yes, but explicitly disabled." >&6; }
29746    fi
29747else
29748    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29749$as_echo "no" >&6; }
29750fi
29751
29752if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
29753    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
29754$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
29755    X11_NOT_NEEDED=
29756    FREETYPE2_NOT_NEEDED=
29757    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
29758$as_echo "alsa pulse" >&6; }
29759fi
29760
29761
29762
29763###############################################################################
29764#
29765# Check for X Windows
29766#
29767
29768# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
29769# Make a simple check for the libraries at the sysroot, and setup --x-includes and
29770# --x-libraries for the sysroot, if that seems to be correct.
29771if test "x$SYS_ROOT" != "x/"; then
29772  if test "x$x_includes" = xNONE; then
29773    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
29774      x_includes="$SYS_ROOT/usr/X11R6/include"
29775    elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
29776      x_includes="$SYS_ROOT/usr/include"
29777    fi
29778  fi
29779  if test "x$x_libraries" = xNONE; then
29780    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
29781      x_libraries="$SYS_ROOT/usr/X11R6/lib"
29782    elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
29783      x_libraries="$SYS_ROOT/usr/lib64"
29784    elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
29785      x_libraries="$SYS_ROOT/usr/lib"
29786    fi
29787  fi
29788fi
29789
29790# Now let autoconf do it's magic
29791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
29792$as_echo_n "checking for X... " >&6; }
29793
29794
29795# Check whether --with-x was given.
29796if test "${with_x+set}" = set; then :
29797  withval=$with_x;
29798fi
29799
29800# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
29801if test "x$with_x" = xno; then
29802  # The user explicitly disabled X.
29803  have_x=disabled
29804else
29805  case $x_includes,$x_libraries in #(
29806    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
29807    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
29808  $as_echo_n "(cached) " >&6
29809else
29810  # One or both of the vars are not set, and there is no cached value.
29811ac_x_includes=no ac_x_libraries=no
29812rm -f -r conftest.dir
29813if mkdir conftest.dir; then
29814  cd conftest.dir
29815  cat >Imakefile <<'_ACEOF'
29816incroot:
29817	@echo incroot='${INCROOT}'
29818usrlibdir:
29819	@echo usrlibdir='${USRLIBDIR}'
29820libdir:
29821	@echo libdir='${LIBDIR}'
29822_ACEOF
29823  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
29824    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
29825    for ac_var in incroot usrlibdir libdir; do
29826      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
29827    done
29828    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
29829    for ac_extension in a so sl dylib la dll; do
29830      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
29831	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
29832	ac_im_usrlibdir=$ac_im_libdir; break
29833      fi
29834    done
29835    # Screen out bogus values from the imake configuration.  They are
29836    # bogus both because they are the default anyway, and because
29837    # using them would break gcc on systems where it needs fixed includes.
29838    case $ac_im_incroot in
29839	/usr/include) ac_x_includes= ;;
29840	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
29841    esac
29842    case $ac_im_usrlibdir in
29843	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
29844	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
29845    esac
29846  fi
29847  cd ..
29848  rm -f -r conftest.dir
29849fi
29850
29851# Standard set of common directories for X headers.
29852# Check X11 before X11Rn because it is often a symlink to the current release.
29853ac_x_header_dirs='
29854/usr/X11/include
29855/usr/X11R7/include
29856/usr/X11R6/include
29857/usr/X11R5/include
29858/usr/X11R4/include
29859
29860/usr/include/X11
29861/usr/include/X11R7
29862/usr/include/X11R6
29863/usr/include/X11R5
29864/usr/include/X11R4
29865
29866/usr/local/X11/include
29867/usr/local/X11R7/include
29868/usr/local/X11R6/include
29869/usr/local/X11R5/include
29870/usr/local/X11R4/include
29871
29872/usr/local/include/X11
29873/usr/local/include/X11R7
29874/usr/local/include/X11R6
29875/usr/local/include/X11R5
29876/usr/local/include/X11R4
29877
29878/usr/X386/include
29879/usr/x386/include
29880/usr/XFree86/include/X11
29881
29882/usr/include
29883/usr/local/include
29884/usr/unsupported/include
29885/usr/athena/include
29886/usr/local/x11r5/include
29887/usr/lpp/Xamples/include
29888
29889/usr/openwin/include
29890/usr/openwin/share/include'
29891
29892if test "$ac_x_includes" = no; then
29893  # Guess where to find include files, by looking for Xlib.h.
29894  # First, try using that file with no special directory specified.
29895  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29896/* end confdefs.h.  */
29897#include <X11/Xlib.h>
29898_ACEOF
29899if ac_fn_cxx_try_cpp "$LINENO"; then :
29900  # We can compile using X headers with no special include directory.
29901ac_x_includes=
29902else
29903  for ac_dir in $ac_x_header_dirs; do
29904  if test -r "$ac_dir/X11/Xlib.h"; then
29905    ac_x_includes=$ac_dir
29906    break
29907  fi
29908done
29909fi
29910rm -f conftest.err conftest.i conftest.$ac_ext
29911fi # $ac_x_includes = no
29912
29913if test "$ac_x_libraries" = no; then
29914  # Check for the libraries.
29915  # See if we find them without any special options.
29916  # Don't add to $LIBS permanently.
29917  ac_save_LIBS=$LIBS
29918  LIBS="-lX11 $LIBS"
29919  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29920/* end confdefs.h.  */
29921#include <X11/Xlib.h>
29922int
29923main ()
29924{
29925XrmInitialize ()
29926  ;
29927  return 0;
29928}
29929_ACEOF
29930if ac_fn_cxx_try_link "$LINENO"; then :
29931  LIBS=$ac_save_LIBS
29932# We can link X programs with no special library path.
29933ac_x_libraries=
29934else
29935  LIBS=$ac_save_LIBS
29936for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
29937do
29938  # Don't even attempt the hair of trying to link an X program!
29939  for ac_extension in a so sl dylib la dll; do
29940    if test -r "$ac_dir/libX11.$ac_extension"; then
29941      ac_x_libraries=$ac_dir
29942      break 2
29943    fi
29944  done
29945done
29946fi
29947rm -f core conftest.err conftest.$ac_objext \
29948    conftest$ac_exeext conftest.$ac_ext
29949fi # $ac_x_libraries = no
29950
29951case $ac_x_includes,$ac_x_libraries in #(
29952  no,* | *,no | *\'*)
29953    # Didn't find X, or a directory has "'" in its name.
29954    ac_cv_have_x="have_x=no";; #(
29955  *)
29956    # Record where we found X for the cache.
29957    ac_cv_have_x="have_x=yes\
29958	ac_x_includes='$ac_x_includes'\
29959	ac_x_libraries='$ac_x_libraries'"
29960esac
29961fi
29962;; #(
29963    *) have_x=yes;;
29964  esac
29965  eval "$ac_cv_have_x"
29966fi # $with_x != no
29967
29968if test "$have_x" != yes; then
29969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
29970$as_echo "$have_x" >&6; }
29971  no_x=yes
29972else
29973  # If each of the values was on the command line, it overrides each guess.
29974  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
29975  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
29976  # Update the cache value to reflect the command line values.
29977  ac_cv_have_x="have_x=yes\
29978	ac_x_includes='$x_includes'\
29979	ac_x_libraries='$x_libraries'"
29980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
29981$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
29982fi
29983
29984if test "$no_x" = yes; then
29985  # Not all programs may use this symbol, but it does not hurt to define it.
29986
29987$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
29988
29989  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
29990else
29991  if test -n "$x_includes"; then
29992    X_CFLAGS="$X_CFLAGS -I$x_includes"
29993  fi
29994
29995  # It would also be nice to do this for all -L options, not just this one.
29996  if test -n "$x_libraries"; then
29997    X_LIBS="$X_LIBS -L$x_libraries"
29998    # For Solaris; some versions of Sun CC require a space after -R and
29999    # others require no space.  Words are not sufficient . . . .
30000    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
30001$as_echo_n "checking whether -R must be followed by a space... " >&6; }
30002    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
30003    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
30004    ac_cxx_werror_flag=yes
30005    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30006/* end confdefs.h.  */
30007
30008int
30009main ()
30010{
30011
30012  ;
30013  return 0;
30014}
30015_ACEOF
30016if ac_fn_cxx_try_link "$LINENO"; then :
30017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30018$as_echo "no" >&6; }
30019       X_LIBS="$X_LIBS -R$x_libraries"
30020else
30021  LIBS="$ac_xsave_LIBS -R $x_libraries"
30022       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30023/* end confdefs.h.  */
30024
30025int
30026main ()
30027{
30028
30029  ;
30030  return 0;
30031}
30032_ACEOF
30033if ac_fn_cxx_try_link "$LINENO"; then :
30034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30035$as_echo "yes" >&6; }
30036	  X_LIBS="$X_LIBS -R $x_libraries"
30037else
30038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
30039$as_echo "neither works" >&6; }
30040fi
30041rm -f core conftest.err conftest.$ac_objext \
30042    conftest$ac_exeext conftest.$ac_ext
30043fi
30044rm -f core conftest.err conftest.$ac_objext \
30045    conftest$ac_exeext conftest.$ac_ext
30046    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
30047    LIBS=$ac_xsave_LIBS
30048  fi
30049
30050  # Check for system-dependent libraries X programs must link with.
30051  # Do this before checking for the system-independent R6 libraries
30052  # (-lICE), since we may need -lsocket or whatever for X linking.
30053
30054  if test "$ISC" = yes; then
30055    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
30056  else
30057    # Martyn Johnson says this is needed for Ultrix, if the X
30058    # libraries were built with DECnet support.  And Karl Berry says
30059    # the Alpha needs dnet_stub (dnet does not exist).
30060    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
30061    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30062/* end confdefs.h.  */
30063
30064/* Override any GCC internal prototype to avoid an error.
30065   Use char because int might match the return type of a GCC
30066   builtin and then its argument prototype would still apply.  */
30067#ifdef __cplusplus
30068extern "C"
30069#endif
30070char XOpenDisplay ();
30071int
30072main ()
30073{
30074return XOpenDisplay ();
30075  ;
30076  return 0;
30077}
30078_ACEOF
30079if ac_fn_cxx_try_link "$LINENO"; then :
30080
30081else
30082  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
30083$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
30084if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
30085  $as_echo_n "(cached) " >&6
30086else
30087  ac_check_lib_save_LIBS=$LIBS
30088LIBS="-ldnet  $LIBS"
30089cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30090/* end confdefs.h.  */
30091
30092/* Override any GCC internal prototype to avoid an error.
30093   Use char because int might match the return type of a GCC
30094   builtin and then its argument prototype would still apply.  */
30095#ifdef __cplusplus
30096extern "C"
30097#endif
30098char dnet_ntoa ();
30099int
30100main ()
30101{
30102return dnet_ntoa ();
30103  ;
30104  return 0;
30105}
30106_ACEOF
30107if ac_fn_cxx_try_link "$LINENO"; then :
30108  ac_cv_lib_dnet_dnet_ntoa=yes
30109else
30110  ac_cv_lib_dnet_dnet_ntoa=no
30111fi
30112rm -f core conftest.err conftest.$ac_objext \
30113    conftest$ac_exeext conftest.$ac_ext
30114LIBS=$ac_check_lib_save_LIBS
30115fi
30116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
30117$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
30118if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
30119  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
30120fi
30121
30122    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
30123      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
30124$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
30125if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
30126  $as_echo_n "(cached) " >&6
30127else
30128  ac_check_lib_save_LIBS=$LIBS
30129LIBS="-ldnet_stub  $LIBS"
30130cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30131/* end confdefs.h.  */
30132
30133/* Override any GCC internal prototype to avoid an error.
30134   Use char because int might match the return type of a GCC
30135   builtin and then its argument prototype would still apply.  */
30136#ifdef __cplusplus
30137extern "C"
30138#endif
30139char dnet_ntoa ();
30140int
30141main ()
30142{
30143return dnet_ntoa ();
30144  ;
30145  return 0;
30146}
30147_ACEOF
30148if ac_fn_cxx_try_link "$LINENO"; then :
30149  ac_cv_lib_dnet_stub_dnet_ntoa=yes
30150else
30151  ac_cv_lib_dnet_stub_dnet_ntoa=no
30152fi
30153rm -f core conftest.err conftest.$ac_objext \
30154    conftest$ac_exeext conftest.$ac_ext
30155LIBS=$ac_check_lib_save_LIBS
30156fi
30157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
30158$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
30159if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
30160  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
30161fi
30162
30163    fi
30164fi
30165rm -f core conftest.err conftest.$ac_objext \
30166    conftest$ac_exeext conftest.$ac_ext
30167    LIBS="$ac_xsave_LIBS"
30168
30169    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
30170    # to get the SysV transport functions.
30171    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
30172    # needs -lnsl.
30173    # The nsl library prevents programs from opening the X display
30174    # on Irix 5.2, according to T.E. Dickey.
30175    # The functions gethostbyname, getservbyname, and inet_addr are
30176    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
30177    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
30178if test "x$ac_cv_func_gethostbyname" = xyes; then :
30179
30180fi
30181
30182    if test $ac_cv_func_gethostbyname = no; then
30183      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
30184$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
30185if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
30186  $as_echo_n "(cached) " >&6
30187else
30188  ac_check_lib_save_LIBS=$LIBS
30189LIBS="-lnsl  $LIBS"
30190cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30191/* end confdefs.h.  */
30192
30193/* Override any GCC internal prototype to avoid an error.
30194   Use char because int might match the return type of a GCC
30195   builtin and then its argument prototype would still apply.  */
30196#ifdef __cplusplus
30197extern "C"
30198#endif
30199char gethostbyname ();
30200int
30201main ()
30202{
30203return gethostbyname ();
30204  ;
30205  return 0;
30206}
30207_ACEOF
30208if ac_fn_cxx_try_link "$LINENO"; then :
30209  ac_cv_lib_nsl_gethostbyname=yes
30210else
30211  ac_cv_lib_nsl_gethostbyname=no
30212fi
30213rm -f core conftest.err conftest.$ac_objext \
30214    conftest$ac_exeext conftest.$ac_ext
30215LIBS=$ac_check_lib_save_LIBS
30216fi
30217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
30218$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
30219if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
30220  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
30221fi
30222
30223      if test $ac_cv_lib_nsl_gethostbyname = no; then
30224	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
30225$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
30226if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
30227  $as_echo_n "(cached) " >&6
30228else
30229  ac_check_lib_save_LIBS=$LIBS
30230LIBS="-lbsd  $LIBS"
30231cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30232/* end confdefs.h.  */
30233
30234/* Override any GCC internal prototype to avoid an error.
30235   Use char because int might match the return type of a GCC
30236   builtin and then its argument prototype would still apply.  */
30237#ifdef __cplusplus
30238extern "C"
30239#endif
30240char gethostbyname ();
30241int
30242main ()
30243{
30244return gethostbyname ();
30245  ;
30246  return 0;
30247}
30248_ACEOF
30249if ac_fn_cxx_try_link "$LINENO"; then :
30250  ac_cv_lib_bsd_gethostbyname=yes
30251else
30252  ac_cv_lib_bsd_gethostbyname=no
30253fi
30254rm -f core conftest.err conftest.$ac_objext \
30255    conftest$ac_exeext conftest.$ac_ext
30256LIBS=$ac_check_lib_save_LIBS
30257fi
30258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
30259$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
30260if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
30261  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
30262fi
30263
30264      fi
30265    fi
30266
30267    # lieder@skyler.mavd.honeywell.com says without -lsocket,
30268    # socket/setsockopt and other routines are undefined under SCO ODT
30269    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
30270    # on later versions), says Simon Leinen: it contains gethostby*
30271    # variants that don't use the name server (or something).  -lsocket
30272    # must be given before -lnsl if both are needed.  We assume that
30273    # if connect needs -lnsl, so does gethostbyname.
30274    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
30275if test "x$ac_cv_func_connect" = xyes; then :
30276
30277fi
30278
30279    if test $ac_cv_func_connect = no; then
30280      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
30281$as_echo_n "checking for connect in -lsocket... " >&6; }
30282if ${ac_cv_lib_socket_connect+:} false; then :
30283  $as_echo_n "(cached) " >&6
30284else
30285  ac_check_lib_save_LIBS=$LIBS
30286LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
30287cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30288/* end confdefs.h.  */
30289
30290/* Override any GCC internal prototype to avoid an error.
30291   Use char because int might match the return type of a GCC
30292   builtin and then its argument prototype would still apply.  */
30293#ifdef __cplusplus
30294extern "C"
30295#endif
30296char connect ();
30297int
30298main ()
30299{
30300return connect ();
30301  ;
30302  return 0;
30303}
30304_ACEOF
30305if ac_fn_cxx_try_link "$LINENO"; then :
30306  ac_cv_lib_socket_connect=yes
30307else
30308  ac_cv_lib_socket_connect=no
30309fi
30310rm -f core conftest.err conftest.$ac_objext \
30311    conftest$ac_exeext conftest.$ac_ext
30312LIBS=$ac_check_lib_save_LIBS
30313fi
30314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
30315$as_echo "$ac_cv_lib_socket_connect" >&6; }
30316if test "x$ac_cv_lib_socket_connect" = xyes; then :
30317  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
30318fi
30319
30320    fi
30321
30322    # Guillermo Gomez says -lposix is necessary on A/UX.
30323    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
30324if test "x$ac_cv_func_remove" = xyes; then :
30325
30326fi
30327
30328    if test $ac_cv_func_remove = no; then
30329      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
30330$as_echo_n "checking for remove in -lposix... " >&6; }
30331if ${ac_cv_lib_posix_remove+:} false; then :
30332  $as_echo_n "(cached) " >&6
30333else
30334  ac_check_lib_save_LIBS=$LIBS
30335LIBS="-lposix  $LIBS"
30336cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30337/* end confdefs.h.  */
30338
30339/* Override any GCC internal prototype to avoid an error.
30340   Use char because int might match the return type of a GCC
30341   builtin and then its argument prototype would still apply.  */
30342#ifdef __cplusplus
30343extern "C"
30344#endif
30345char remove ();
30346int
30347main ()
30348{
30349return remove ();
30350  ;
30351  return 0;
30352}
30353_ACEOF
30354if ac_fn_cxx_try_link "$LINENO"; then :
30355  ac_cv_lib_posix_remove=yes
30356else
30357  ac_cv_lib_posix_remove=no
30358fi
30359rm -f core conftest.err conftest.$ac_objext \
30360    conftest$ac_exeext conftest.$ac_ext
30361LIBS=$ac_check_lib_save_LIBS
30362fi
30363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
30364$as_echo "$ac_cv_lib_posix_remove" >&6; }
30365if test "x$ac_cv_lib_posix_remove" = xyes; then :
30366  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
30367fi
30368
30369    fi
30370
30371    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
30372    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
30373if test "x$ac_cv_func_shmat" = xyes; then :
30374
30375fi
30376
30377    if test $ac_cv_func_shmat = no; then
30378      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
30379$as_echo_n "checking for shmat in -lipc... " >&6; }
30380if ${ac_cv_lib_ipc_shmat+:} false; then :
30381  $as_echo_n "(cached) " >&6
30382else
30383  ac_check_lib_save_LIBS=$LIBS
30384LIBS="-lipc  $LIBS"
30385cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30386/* end confdefs.h.  */
30387
30388/* Override any GCC internal prototype to avoid an error.
30389   Use char because int might match the return type of a GCC
30390   builtin and then its argument prototype would still apply.  */
30391#ifdef __cplusplus
30392extern "C"
30393#endif
30394char shmat ();
30395int
30396main ()
30397{
30398return shmat ();
30399  ;
30400  return 0;
30401}
30402_ACEOF
30403if ac_fn_cxx_try_link "$LINENO"; then :
30404  ac_cv_lib_ipc_shmat=yes
30405else
30406  ac_cv_lib_ipc_shmat=no
30407fi
30408rm -f core conftest.err conftest.$ac_objext \
30409    conftest$ac_exeext conftest.$ac_ext
30410LIBS=$ac_check_lib_save_LIBS
30411fi
30412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
30413$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
30414if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
30415  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
30416fi
30417
30418    fi
30419  fi
30420
30421  # Check for libraries that X11R6 Xt/Xaw programs need.
30422  ac_save_LDFLAGS=$LDFLAGS
30423  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
30424  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
30425  # check for ICE first), but we must link in the order -lSM -lICE or
30426  # we get undefined symbols.  So assume we have SM if we have ICE.
30427  # These have to be linked with before -lX11, unlike the other
30428  # libraries we check for below, so use a different variable.
30429  # John Interrante, Karl Berry
30430  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
30431$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
30432if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
30433  $as_echo_n "(cached) " >&6
30434else
30435  ac_check_lib_save_LIBS=$LIBS
30436LIBS="-lICE $X_EXTRA_LIBS $LIBS"
30437cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30438/* end confdefs.h.  */
30439
30440/* Override any GCC internal prototype to avoid an error.
30441   Use char because int might match the return type of a GCC
30442   builtin and then its argument prototype would still apply.  */
30443#ifdef __cplusplus
30444extern "C"
30445#endif
30446char IceConnectionNumber ();
30447int
30448main ()
30449{
30450return IceConnectionNumber ();
30451  ;
30452  return 0;
30453}
30454_ACEOF
30455if ac_fn_cxx_try_link "$LINENO"; then :
30456  ac_cv_lib_ICE_IceConnectionNumber=yes
30457else
30458  ac_cv_lib_ICE_IceConnectionNumber=no
30459fi
30460rm -f core conftest.err conftest.$ac_objext \
30461    conftest$ac_exeext conftest.$ac_ext
30462LIBS=$ac_check_lib_save_LIBS
30463fi
30464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
30465$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
30466if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
30467  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
30468fi
30469
30470  LDFLAGS=$ac_save_LDFLAGS
30471
30472fi
30473
30474
30475# AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
30476# this doesn't make sense so we remove it.
30477if test "x$COMPILE_TYPE" = xcross; then
30478  X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
30479fi
30480
30481if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
30482
30483    # Print a helpful message on how to acquire the necessary build dependency.
30484    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30485    MISSING_DEPENDENCY=x11
30486    PKGHANDLER_COMMAND=
30487
30488    case $PKGHANDLER in
30489	apt-get)
30490                apt_help     $MISSING_DEPENDENCY ;;
30491    yum)
30492                yum_help     $MISSING_DEPENDENCY ;;
30493	port)
30494                port_help    $MISSING_DEPENDENCY ;;
30495	pkgutil)
30496                pkgutil_help $MISSING_DEPENDENCY ;;
30497	pkgadd)
30498                pkgadd_help  $MISSING_DEPENDENCY ;;
30499    * )
30500      break ;;
30501    esac
30502
30503    if test "x$PKGHANDLER_COMMAND" != x; then
30504        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30505    fi
30506
30507    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
30508fi
30509
30510# Some of the old makefiles require a setting of OPENWIN_HOME
30511# Since the X11R6 directory has disappeared on later Linuxes,
30512# we need to probe for it.
30513if test "x$OPENJDK_TARGET_OS" = xlinux; then
30514    if test -d "$SYS_ROOT/usr/X11R6"; then
30515        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
30516    elif test -d "$SYS_ROOT/usr/include/X11"; then
30517        OPENWIN_HOME="$SYS_ROOT/usr"
30518    fi
30519fi
30520if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30521    OPENWIN_HOME="/usr/openwin"
30522fi
30523
30524
30525
30526#
30527# Weird Sol10 something check...TODO change to try compile
30528#
30529if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
30530  if test "`uname -r`" = "5.10"; then
30531     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
30532     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
30533     fi
30534  fi
30535fi
30536
30537ac_ext=c
30538ac_cpp='$CPP $CPPFLAGS'
30539ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30540ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30541ac_compiler_gnu=$ac_cv_c_compiler_gnu
30542
30543OLD_CFLAGS="$CFLAGS"
30544CFLAGS="$CFLAGS $X_CFLAGS"
30545
30546# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
30547for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
30548do :
30549  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30550ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
30551                   # include <X11/Xutil.h>
30552
30553"
30554if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30555  cat >>confdefs.h <<_ACEOF
30556#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30557_ACEOF
30558 X11_A_OK=yes
30559else
30560  X11_A_OK=no; break
30561fi
30562
30563done
30564
30565
30566CFLAGS="$OLD_CFLAGS"
30567ac_ext=cpp
30568ac_cpp='$CXXCPP $CPPFLAGS'
30569ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30570ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30571ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30572
30573
30574if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
30575
30576    # Print a helpful message on how to acquire the necessary build dependency.
30577    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30578    MISSING_DEPENDENCY=x11
30579    PKGHANDLER_COMMAND=
30580
30581    case $PKGHANDLER in
30582	apt-get)
30583                apt_help     $MISSING_DEPENDENCY ;;
30584    yum)
30585                yum_help     $MISSING_DEPENDENCY ;;
30586	port)
30587                port_help    $MISSING_DEPENDENCY ;;
30588	pkgutil)
30589                pkgutil_help $MISSING_DEPENDENCY ;;
30590	pkgadd)
30591                pkgadd_help  $MISSING_DEPENDENCY ;;
30592    * )
30593      break ;;
30594    esac
30595
30596    if test "x$PKGHANDLER_COMMAND" != x; then
30597        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30598    fi
30599
30600    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
30601fi
30602
30603
30604
30605
30606
30607
30608###############################################################################
30609#
30610# The common unix printing system cups is used to print from java.
30611#
30612
30613# Check whether --with-cups was given.
30614if test "${with_cups+set}" = set; then :
30615  withval=$with_cups;
30616fi
30617
30618
30619# Check whether --with-cups-include was given.
30620if test "${with_cups_include+set}" = set; then :
30621  withval=$with_cups_include;
30622fi
30623
30624
30625if test "x$CUPS_NOT_NEEDED" = xyes; then
30626	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
30627		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
30628$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
30629	fi
30630	CUPS_CFLAGS=
30631else
30632	CUPS_FOUND=no
30633
30634	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
30635	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
30636	fi
30637
30638	if test "x${with_cups}" != x; then
30639	    CUPS_CFLAGS="-I${with_cups}/include"
30640	    CUPS_FOUND=yes
30641	fi
30642	if test "x${with_cups_include}" != x; then
30643	    CUPS_CFLAGS="-I${with_cups_include}"
30644	    CUPS_FOUND=yes
30645	fi
30646	if test "x$CUPS_FOUND" = xno; then
30647
30648
30649    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30650        # Source the builddeps file again, to make sure it uses the latest variables!
30651        . $builddepsfile
30652        # Look for a target and build machine specific resource!
30653        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30654        if test "x$resource" = x; then
30655            # Ok, lets instead look for a target specific resource
30656            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
30657        fi
30658        if test "x$resource" = x; then
30659            # Ok, lets instead look for a build specific resource
30660            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
30661        fi
30662        if test "x$resource" = x; then
30663            # Ok, lets instead look for a generic resource
30664            # (The cups comes from M4 and not the shell, thus no need for eval here.)
30665            resource=${builddep_cups}
30666        fi
30667        if test "x$resource" != x; then
30668            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
30669$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
30670	    # If the resource in the builddeps.conf file is an existing directory,
30671	    # for example /java/linux/cups
30672	    if test -d ${resource}; then
30673	       depdir=${resource}
30674	    else
30675
30676# cups is for example mymodule
30677# $resource is for example libs/general/libmymod_1_2_3.zip
30678# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30679# $with_builddeps_dir is for example /localhome/builddeps
30680# depdir is the name of the variable into which we store the depdir, eg MYMOD
30681# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30682# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30683    filename=`basename $resource`
30684    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30685    filebase=${filename%%.*}
30686    extension=${filename#*.}
30687    installdir=$with_builddeps_dir/$filebase
30688    if test ! -f $installdir/$filename.unpacked; then
30689        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
30690$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30691        if test ! -d $installdir; then
30692            mkdir -p $installdir
30693        fi
30694        if test ! -d $installdir; then
30695            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30696        fi
30697        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
30698        touch $tmpfile
30699        if test ! -f $tmpfile; then
30700            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30701        fi
30702
30703    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30704    # $tmpfile is the local file name for the downloaded file.
30705    VALID_TOOL=no
30706    if test "x$BDEPS_FTP" = xwget; then
30707       VALID_TOOL=yes
30708       wget -O $tmpfile $with_builddeps_server/$resource
30709    fi
30710    if test "x$BDEPS_FTP" = xlftp; then
30711       VALID_TOOL=yes
30712       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30713    fi
30714    if test "x$BDEPS_FTP" = xftp; then
30715        VALID_TOOL=yes
30716        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30717        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30718        FTPUSERPWD=${FTPSERVER%%@*}
30719        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30720            FTPUSER=${userpwd%%:*}
30721            FTPPWD=${userpwd#*@}
30722            FTPSERVER=${FTPSERVER#*@}
30723        else
30724            FTPUSER=ftp
30725            FTPPWD=ftp
30726        fi
30727        # the "pass" command does not work on some
30728        # ftp clients (read ftp.exe) but if it works,
30729        # passive mode is better!
30730        (\
30731            echo "user $FTPUSER $FTPPWD"        ;\
30732            echo "pass"                         ;\
30733            echo "bin"                          ;\
30734            echo "get $FTPPATH $tmpfile"              ;\
30735        ) | ftp -in $FTPSERVER
30736    fi
30737    if test "x$VALID_TOOL" != xyes; then
30738       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30739    fi
30740
30741        mv $tmpfile $installdir/$filename
30742        if test ! -s $installdir/$filename; then
30743            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30744        fi
30745        case "$extension" in
30746            zip)  echo "Unzipping $installdir/$filename..."
30747               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30748            ;;
30749            tar.gz) echo "Untaring $installdir/$filename..."
30750               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30751            ;;
30752            tgz) echo "Untaring $installdir/$filename..."
30753               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30754            ;;
30755            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30756            ;;
30757        esac
30758    fi
30759    if test -f $installdir/$filename.unpacked; then
30760        depdir=$installdir
30761    fi
30762
30763	    fi
30764            # Source the builddeps file again, because in the previous command, the depdir
30765            # was updated to point at the current build dependency install directory.
30766            . $builddepsfile
30767            # Now extract variables from the builddeps.conf files.
30768            theroot=${builddep_cups_ROOT}
30769            thecflags=${builddep_cups_CFLAGS}
30770            thelibs=${builddep_cups_LIBS}
30771            if test "x$depdir" = x; then
30772                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
30773            fi
30774            CUPS=$depdir
30775            if test "x$theroot" != x; then
30776               CUPS="$theroot"
30777            fi
30778            if test "x$thecflags" != x; then
30779               CUPS_CFLAGS="$thecflags"
30780            fi
30781            if test "x$thelibs" != x; then
30782               CUPS_LIBS="$thelibs"
30783            fi
30784            CUPS_FOUND=yes
30785
30786        fi
30787
30788    fi
30789
30790	fi
30791	if test "x$CUPS_FOUND" = xno; then
30792	    # Are the cups headers installed in the default /usr/include location?
30793	    for ac_header in cups/cups.h cups/ppd.h
30794do :
30795  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30796ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
30797if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30798  cat >>confdefs.h <<_ACEOF
30799#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30800_ACEOF
30801 CUPS_FOUND=yes
30802	                      CUPS_CFLAGS=
30803	                      DEFAULT_CUPS=yes
30804fi
30805
30806done
30807
30808	fi
30809	if test "x$CUPS_FOUND" = xno; then
30810	    # Getting nervous now? Lets poke around for standard Solaris third-party
30811	    # package installation locations.
30812	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
30813$as_echo_n "checking for cups headers... " >&6; }
30814	    if test -s /opt/sfw/cups/include/cups/cups.h; then
30815	       # An SFW package seems to be installed!
30816	       CUPS_FOUND=yes
30817	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
30818	    elif test -s /opt/csw/include/cups/cups.h; then
30819	       # A CSW package seems to be installed!
30820	       CUPS_FOUND=yes
30821	       CUPS_CFLAGS="-I/opt/csw/include"
30822	    fi
30823	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
30824$as_echo "$CUPS_FOUND" >&6; }
30825	fi
30826	if test "x$CUPS_FOUND" = xno; then
30827
30828    # Print a helpful message on how to acquire the necessary build dependency.
30829    # cups is the help tag: freetyp2, cups, pulse, alsa etc
30830    MISSING_DEPENDENCY=cups
30831    PKGHANDLER_COMMAND=
30832
30833    case $PKGHANDLER in
30834	apt-get)
30835                apt_help     $MISSING_DEPENDENCY ;;
30836    yum)
30837                yum_help     $MISSING_DEPENDENCY ;;
30838	port)
30839                port_help    $MISSING_DEPENDENCY ;;
30840	pkgutil)
30841                pkgutil_help $MISSING_DEPENDENCY ;;
30842	pkgadd)
30843                pkgadd_help  $MISSING_DEPENDENCY ;;
30844    * )
30845      break ;;
30846    esac
30847
30848    if test "x$PKGHANDLER_COMMAND" != x; then
30849        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30850    fi
30851
30852	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
30853	fi
30854fi
30855
30856
30857
30858
30859
30860
30861###############################################################################
30862#
30863# The ubiquitous freetype2 library is used to render fonts.
30864#
30865
30866# Check whether --with-freetype was given.
30867if test "${with_freetype+set}" = set; then :
30868  withval=$with_freetype;
30869fi
30870
30871
30872# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
30873USING_SYSTEM_FT_LIB=false
30874
30875if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
30876	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
30877		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
30878$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
30879	fi
30880	FREETYPE2_CFLAGS=
30881	FREETYPE2_LIBS=
30882        FREETYPE2_LIB_PATH=
30883else
30884	FREETYPE2_FOUND=no
30885
30886	if test "x$with_freetype" != x; then
30887
30888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30889
30890  # Input might be given as Windows format, start by converting to
30891  # unix format.
30892  path="$with_freetype"
30893  new_path=`$CYGPATH -u "$path"`
30894
30895  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30896  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30897  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30898  # "foo.exe" is OK but "foo" is an error.
30899  #
30900  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30901  # It is also a way to make sure we got the proper file name for the real test later on.
30902  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30903  if test "x$test_shortpath" = x; then
30904    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
30905$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
30906    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
30907  fi
30908
30909  # Call helper function which possibly converts this using DOS-style short mode.
30910  # If so, the updated path is stored in $new_path.
30911
30912  input_path="$new_path"
30913  # Check if we need to convert this using DOS-style short mode. If the path
30914  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30915  # take no chances and rewrite it.
30916  # Note: m4 eats our [], so we need to use [ and ] instead.
30917  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30918  if test "x$has_forbidden_chars" != x; then
30919    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30920    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30921    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30922    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30923      # Going to short mode and back again did indeed matter. Since short mode is
30924      # case insensitive, let's make it lowercase to improve readability.
30925      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30926      # Now convert it back to Unix-stile (cygpath)
30927      input_path=`$CYGPATH -u "$shortmode_path"`
30928      new_path="$input_path"
30929    fi
30930  fi
30931
30932  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30933  if test "x$test_cygdrive_prefix" = x; then
30934    # As a simple fix, exclude /usr/bin since it's not a real path.
30935    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30936      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30937      # a path prefixed by /cygdrive for fixpath to work.
30938      new_path="$CYGWIN_ROOT_PATH$input_path"
30939    fi
30940  fi
30941
30942
30943  if test "x$path" != "x$new_path"; then
30944    with_freetype="$new_path"
30945    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
30946$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
30947  fi
30948
30949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30950
30951  path="$with_freetype"
30952  has_colon=`$ECHO $path | $GREP ^.:`
30953  new_path="$path"
30954  if test "x$has_colon" = x; then
30955    # Not in mixed or Windows style, start by that.
30956    new_path=`cmd //c echo $path`
30957  fi
30958
30959
30960  input_path="$new_path"
30961  # Check if we need to convert this using DOS-style short mode. If the path
30962  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30963  # take no chances and rewrite it.
30964  # Note: m4 eats our [], so we need to use [ and ] instead.
30965  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30966  if test "x$has_forbidden_chars" != x; then
30967    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30968    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30969  fi
30970
30971
30972  windows_path="$new_path"
30973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30974    unix_path=`$CYGPATH -u "$windows_path"`
30975    new_path="$unix_path"
30976  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30977    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30978    new_path="$unix_path"
30979  fi
30980
30981  if test "x$path" != "x$new_path"; then
30982    with_freetype="$new_path"
30983    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
30984$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
30985  fi
30986
30987  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30988  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30989
30990  else
30991    # We're on a posix platform. Hooray! :)
30992    path="$with_freetype"
30993    has_space=`$ECHO "$path" | $GREP " "`
30994    if test "x$has_space" != x; then
30995      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
30996$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
30997      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30998    fi
30999
31000    # Use eval to expand a potential ~
31001    eval path="$path"
31002    if test ! -f "$path" && test ! -d "$path"; then
31003      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
31004    fi
31005
31006    with_freetype="`cd "$path"; $THEPWDCMD -L`"
31007  fi
31008
31009	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
31010            FREETYPE2_LIB_PATH="$with_freetype/lib"
31011            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
31012                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
31013                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
31014            fi
31015            if test "x$OPENJDK_TARGET_OS" = xwindows; then
31016                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
31017            fi
31018	    FREETYPE2_CFLAGS="-I$with_freetype/include"
31019            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
31020                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
31021            fi
31022 	    FREETYPE2_FOUND=yes
31023   	    if test "x$FREETYPE2_FOUND" = xyes; then
31024	        # Verify that the directories exist
31025                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
31026		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
31027		fi
31028	        # List the contents of the lib.
31029		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
31030                if test "x$FREETYPELIB" = x; then
31031		   as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
31032		fi
31033	        # Check one h-file
31034                if ! test -s "$with_freetype/include/ft2build.h"; then
31035		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
31036		fi
31037            fi
31038        fi
31039	if test "x$FREETYPE2_FOUND" = xno; then
31040
31041
31042    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31043        # Source the builddeps file again, to make sure it uses the latest variables!
31044        . $builddepsfile
31045        # Look for a target and build machine specific resource!
31046        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31047        if test "x$resource" = x; then
31048            # Ok, lets instead look for a target specific resource
31049            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
31050        fi
31051        if test "x$resource" = x; then
31052            # Ok, lets instead look for a build specific resource
31053            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
31054        fi
31055        if test "x$resource" = x; then
31056            # Ok, lets instead look for a generic resource
31057            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
31058            resource=${builddep_freetype2}
31059        fi
31060        if test "x$resource" != x; then
31061            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
31062$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
31063	    # If the resource in the builddeps.conf file is an existing directory,
31064	    # for example /java/linux/cups
31065	    if test -d ${resource}; then
31066	       depdir=${resource}
31067	    else
31068
31069# freetype2 is for example mymodule
31070# $resource is for example libs/general/libmymod_1_2_3.zip
31071# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31072# $with_builddeps_dir is for example /localhome/builddeps
31073# depdir is the name of the variable into which we store the depdir, eg MYMOD
31074# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31075# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31076    filename=`basename $resource`
31077    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31078    filebase=${filename%%.*}
31079    extension=${filename#*.}
31080    installdir=$with_builddeps_dir/$filebase
31081    if test ! -f $installdir/$filename.unpacked; then
31082        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
31083$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31084        if test ! -d $installdir; then
31085            mkdir -p $installdir
31086        fi
31087        if test ! -d $installdir; then
31088            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31089        fi
31090        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
31091        touch $tmpfile
31092        if test ! -f $tmpfile; then
31093            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31094        fi
31095
31096    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31097    # $tmpfile is the local file name for the downloaded file.
31098    VALID_TOOL=no
31099    if test "x$BDEPS_FTP" = xwget; then
31100       VALID_TOOL=yes
31101       wget -O $tmpfile $with_builddeps_server/$resource
31102    fi
31103    if test "x$BDEPS_FTP" = xlftp; then
31104       VALID_TOOL=yes
31105       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31106    fi
31107    if test "x$BDEPS_FTP" = xftp; then
31108        VALID_TOOL=yes
31109        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31110        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31111        FTPUSERPWD=${FTPSERVER%%@*}
31112        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31113            FTPUSER=${userpwd%%:*}
31114            FTPPWD=${userpwd#*@}
31115            FTPSERVER=${FTPSERVER#*@}
31116        else
31117            FTPUSER=ftp
31118            FTPPWD=ftp
31119        fi
31120        # the "pass" command does not work on some
31121        # ftp clients (read ftp.exe) but if it works,
31122        # passive mode is better!
31123        (\
31124            echo "user $FTPUSER $FTPPWD"        ;\
31125            echo "pass"                         ;\
31126            echo "bin"                          ;\
31127            echo "get $FTPPATH $tmpfile"              ;\
31128        ) | ftp -in $FTPSERVER
31129    fi
31130    if test "x$VALID_TOOL" != xyes; then
31131       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31132    fi
31133
31134        mv $tmpfile $installdir/$filename
31135        if test ! -s $installdir/$filename; then
31136            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31137        fi
31138        case "$extension" in
31139            zip)  echo "Unzipping $installdir/$filename..."
31140               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31141            ;;
31142            tar.gz) echo "Untaring $installdir/$filename..."
31143               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31144            ;;
31145            tgz) echo "Untaring $installdir/$filename..."
31146               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31147            ;;
31148            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31149            ;;
31150        esac
31151    fi
31152    if test -f $installdir/$filename.unpacked; then
31153        depdir=$installdir
31154    fi
31155
31156	    fi
31157            # Source the builddeps file again, because in the previous command, the depdir
31158            # was updated to point at the current build dependency install directory.
31159            . $builddepsfile
31160            # Now extract variables from the builddeps.conf files.
31161            theroot=${builddep_freetype2_ROOT}
31162            thecflags=${builddep_freetype2_CFLAGS}
31163            thelibs=${builddep_freetype2_LIBS}
31164            if test "x$depdir" = x; then
31165                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
31166            fi
31167            FREETYPE2=$depdir
31168            if test "x$theroot" != x; then
31169               FREETYPE2="$theroot"
31170            fi
31171            if test "x$thecflags" != x; then
31172               FREETYPE2_CFLAGS="$thecflags"
31173            fi
31174            if test "x$thelibs" != x; then
31175               FREETYPE2_LIBS="$thelibs"
31176            fi
31177            FREETYPE2_FOUND=yes
31178            else FREETYPE2_FOUND=no
31179
31180        fi
31181        else FREETYPE2_FOUND=no
31182
31183    fi
31184
31185            USING_SYSTEM_FT_LIB=true
31186	fi
31187	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
31188            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
31189
31190  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31191
31192  # Input might be given as Windows format, start by converting to
31193  # unix format.
31194  path="$FREETYPELOCATION"
31195  new_path=`$CYGPATH -u "$path"`
31196
31197  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31198  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31199  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31200  # "foo.exe" is OK but "foo" is an error.
31201  #
31202  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31203  # It is also a way to make sure we got the proper file name for the real test later on.
31204  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31205  if test "x$test_shortpath" = x; then
31206    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31207$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31208    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
31209  fi
31210
31211  # Call helper function which possibly converts this using DOS-style short mode.
31212  # If so, the updated path is stored in $new_path.
31213
31214  input_path="$new_path"
31215  # Check if we need to convert this using DOS-style short mode. If the path
31216  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31217  # take no chances and rewrite it.
31218  # Note: m4 eats our [], so we need to use [ and ] instead.
31219  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31220  if test "x$has_forbidden_chars" != x; then
31221    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31222    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31223    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31224    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31225      # Going to short mode and back again did indeed matter. Since short mode is
31226      # case insensitive, let's make it lowercase to improve readability.
31227      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31228      # Now convert it back to Unix-stile (cygpath)
31229      input_path=`$CYGPATH -u "$shortmode_path"`
31230      new_path="$input_path"
31231    fi
31232  fi
31233
31234  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31235  if test "x$test_cygdrive_prefix" = x; then
31236    # As a simple fix, exclude /usr/bin since it's not a real path.
31237    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31238      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31239      # a path prefixed by /cygdrive for fixpath to work.
31240      new_path="$CYGWIN_ROOT_PATH$input_path"
31241    fi
31242  fi
31243
31244
31245  if test "x$path" != "x$new_path"; then
31246    FREETYPELOCATION="$new_path"
31247    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31248$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31249  fi
31250
31251  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31252
31253  path="$FREETYPELOCATION"
31254  has_colon=`$ECHO $path | $GREP ^.:`
31255  new_path="$path"
31256  if test "x$has_colon" = x; then
31257    # Not in mixed or Windows style, start by that.
31258    new_path=`cmd //c echo $path`
31259  fi
31260
31261
31262  input_path="$new_path"
31263  # Check if we need to convert this using DOS-style short mode. If the path
31264  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31265  # take no chances and rewrite it.
31266  # Note: m4 eats our [], so we need to use [ and ] instead.
31267  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31268  if test "x$has_forbidden_chars" != x; then
31269    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31270    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31271  fi
31272
31273
31274  windows_path="$new_path"
31275  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31276    unix_path=`$CYGPATH -u "$windows_path"`
31277    new_path="$unix_path"
31278  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31279    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31280    new_path="$unix_path"
31281  fi
31282
31283  if test "x$path" != "x$new_path"; then
31284    FREETYPELOCATION="$new_path"
31285    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31286$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31287  fi
31288
31289  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31290  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31291
31292  else
31293    # We're on a posix platform. Hooray! :)
31294    path="$FREETYPELOCATION"
31295    has_space=`$ECHO "$path" | $GREP " "`
31296    if test "x$has_space" != x; then
31297      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31298$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31299      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31300    fi
31301
31302    # Use eval to expand a potential ~
31303    eval path="$path"
31304    if test ! -f "$path" && test ! -d "$path"; then
31305      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
31306    fi
31307
31308    FREETYPELOCATION="`cd "$path"; $THEPWDCMD -L`"
31309  fi
31310
31311	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
31312$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
31313	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
31314	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
31315	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
31316 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
31317                if ! test -s "$FREETYPE2_LIBS"; then
31318		   as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
31319		fi
31320                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
31321		   as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
31322		fi
31323                USING_SYSTEM_FT_LIB=true
31324                FREETYPE2_FOUND=yes
31325	    fi
31326	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31327$as_echo "$FREETYPE2_FOUND" >&6; }
31328        fi
31329	if test "x$FREETYPE2_FOUND" = xno; then
31330
31331pkg_failed=no
31332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
31333$as_echo_n "checking for FREETYPE2... " >&6; }
31334
31335if test -n "$FREETYPE2_CFLAGS"; then
31336    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
31337 elif test -n "$PKG_CONFIG"; then
31338    if test -n "$PKG_CONFIG" && \
31339    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31340  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31341  ac_status=$?
31342  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31343  test $ac_status = 0; }; then
31344  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
31345else
31346  pkg_failed=yes
31347fi
31348 else
31349    pkg_failed=untried
31350fi
31351if test -n "$FREETYPE2_LIBS"; then
31352    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
31353 elif test -n "$PKG_CONFIG"; then
31354    if test -n "$PKG_CONFIG" && \
31355    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31356  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31357  ac_status=$?
31358  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31359  test $ac_status = 0; }; then
31360  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
31361else
31362  pkg_failed=yes
31363fi
31364 else
31365    pkg_failed=untried
31366fi
31367
31368
31369
31370if test $pkg_failed = yes; then
31371
31372if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31373        _pkg_short_errors_supported=yes
31374else
31375        _pkg_short_errors_supported=no
31376fi
31377        if test $_pkg_short_errors_supported = yes; then
31378	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
31379        else
31380	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
31381        fi
31382	# Put the nasty error message in config.log where it belongs
31383	echo "$FREETYPE2_PKG_ERRORS" >&5
31384
31385	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31386$as_echo "no" >&6; }
31387                FREETYPE2_FOUND=no
31388elif test $pkg_failed = untried; then
31389	FREETYPE2_FOUND=no
31390else
31391	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
31392	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
31393        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31394$as_echo "yes" >&6; }
31395	FREETYPE2_FOUND=yes
31396fi
31397            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
31398            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
31399            USING_SYSTEM_FT_LIB=true
31400            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
31401            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
31402              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
31403            fi
31404	fi
31405	if test "x$FREETYPE2_FOUND" = xno; then
31406	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
31407$as_echo_n "checking for freetype in some standard locations... " >&6; }
31408
31409	    if test -s $SYS_ROOT/usr/X11/include/ft2build.h && test -d $SYS_ROOT/usr/X11/include/freetype2/freetype; then
31410	        DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/X11/include/freetype2 -I$SYS_ROOT/usr/X11/include"
31411	        DEFAULT_FREETYPE_LIBS="-L$SYS_ROOT/usr/X11/lib -lfreetype"
31412	    fi
31413	    if test -s $SYS_ROOT/usr/include/ft2build.h && test -d $SYS_ROOT/usr/include/freetype2/freetype; then
31414	        DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/include/freetype2"
31415	        DEFAULT_FREETYPE_LIBS="-lfreetype"
31416	    fi
31417
31418	    PREV_CXXCFLAGS="$CXXFLAGS"
31419	    PREV_LDFLAGS="$LDFLAGS"
31420	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
31421	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
31422	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31423/* end confdefs.h.  */
31424#include<ft2build.h>
31425	                    #include FT_FREETYPE_H
31426	                   int main() { return 0; }
31427
31428_ACEOF
31429if ac_fn_cxx_try_link "$LINENO"; then :
31430
31431	                      # Yes, the default cflags and libs did the trick.
31432	                      FREETYPE2_FOUND=yes
31433	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
31434	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
31435
31436else
31437
31438	                      FREETYPE2_FOUND=no
31439
31440fi
31441rm -f core conftest.err conftest.$ac_objext \
31442    conftest$ac_exeext conftest.$ac_ext
31443            CXXCFLAGS="$PREV_CXXFLAGS"
31444	    LDFLAGS="$PREV_LDFLAGS"
31445	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31446$as_echo "$FREETYPE2_FOUND" >&6; }
31447            USING_SYSTEM_FT_LIB=true
31448	fi
31449	if test "x$FREETYPE2_FOUND" = xno; then
31450
31451    # Print a helpful message on how to acquire the necessary build dependency.
31452    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
31453    MISSING_DEPENDENCY=freetype2
31454    PKGHANDLER_COMMAND=
31455
31456    case $PKGHANDLER in
31457	apt-get)
31458                apt_help     $MISSING_DEPENDENCY ;;
31459    yum)
31460                yum_help     $MISSING_DEPENDENCY ;;
31461	port)
31462                port_help    $MISSING_DEPENDENCY ;;
31463	pkgutil)
31464                pkgutil_help $MISSING_DEPENDENCY ;;
31465	pkgadd)
31466                pkgadd_help  $MISSING_DEPENDENCY ;;
31467    * )
31468      break ;;
31469    esac
31470
31471    if test "x$PKGHANDLER_COMMAND" != x; then
31472        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31473    fi
31474
31475		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31476	fi
31477
31478        if test "x$OPENJDK_TARGET_OS" != xwindows; then
31479            # AC_CHECK_LIB does not support use of cl.exe
31480            PREV_LDFLAGS="$LDFLAGS"
31481            LDFLAGS="$FREETYPE2_LIBS"
31482            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
31483$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
31484if ${ac_cv_lib_freetype_FT_Init_FreeType+:} false; then :
31485  $as_echo_n "(cached) " >&6
31486else
31487  ac_check_lib_save_LIBS=$LIBS
31488LIBS="-lfreetype  $LIBS"
31489cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31490/* end confdefs.h.  */
31491
31492/* Override any GCC internal prototype to avoid an error.
31493   Use char because int might match the return type of a GCC
31494   builtin and then its argument prototype would still apply.  */
31495#ifdef __cplusplus
31496extern "C"
31497#endif
31498char FT_Init_FreeType ();
31499int
31500main ()
31501{
31502return FT_Init_FreeType ();
31503  ;
31504  return 0;
31505}
31506_ACEOF
31507if ac_fn_cxx_try_link "$LINENO"; then :
31508  ac_cv_lib_freetype_FT_Init_FreeType=yes
31509else
31510  ac_cv_lib_freetype_FT_Init_FreeType=no
31511fi
31512rm -f core conftest.err conftest.$ac_objext \
31513    conftest$ac_exeext conftest.$ac_ext
31514LIBS=$ac_check_lib_save_LIBS
31515fi
31516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
31517$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
31518if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = xyes; then :
31519  FREETYPE2_FOUND=true
31520else
31521  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31522fi
31523
31524            LDFLAGS="$PREV_LDFLAGS"
31525        fi
31526fi
31527
31528
31529
31530
31531
31532
31533
31534
31535
31536###############################################################################
31537#
31538# Check for alsa headers and libraries. Used on Linux/GNU systems.
31539#
31540
31541# Check whether --with-alsa was given.
31542if test "${with_alsa+set}" = set; then :
31543  withval=$with_alsa;
31544fi
31545
31546
31547# Check whether --with-alsa-include was given.
31548if test "${with_alsa_include+set}" = set; then :
31549  withval=$with_alsa_include;
31550fi
31551
31552
31553# Check whether --with-alsa-lib was given.
31554if test "${with_alsa_lib+set}" = set; then :
31555  withval=$with_alsa_lib;
31556fi
31557
31558
31559if test "x$ALSA_NOT_NEEDED" = xyes; then
31560	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
31561		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
31562$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
31563	fi
31564	ALSA_CFLAGS=
31565	ALSA_LIBS=
31566else
31567	ALSA_FOUND=no
31568
31569	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
31570	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
31571	fi
31572
31573	if test "x${with_alsa}" != x; then
31574	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
31575	    ALSA_CFLAGS="-I${with_alsa}/include"
31576	    ALSA_FOUND=yes
31577	fi
31578	if test "x${with_alsa_include}" != x; then
31579	    ALSA_CFLAGS="-I${with_alsa_include}"
31580	    ALSA_FOUND=yes
31581	fi
31582	if test "x${with_alsa_lib}" != x; then
31583	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
31584	    ALSA_FOUND=yes
31585	fi
31586	if test "x$ALSA_FOUND" = xno; then
31587
31588
31589    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31590        # Source the builddeps file again, to make sure it uses the latest variables!
31591        . $builddepsfile
31592        # Look for a target and build machine specific resource!
31593        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31594        if test "x$resource" = x; then
31595            # Ok, lets instead look for a target specific resource
31596            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
31597        fi
31598        if test "x$resource" = x; then
31599            # Ok, lets instead look for a build specific resource
31600            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
31601        fi
31602        if test "x$resource" = x; then
31603            # Ok, lets instead look for a generic resource
31604            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
31605            resource=${builddep_alsa}
31606        fi
31607        if test "x$resource" != x; then
31608            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
31609$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
31610	    # If the resource in the builddeps.conf file is an existing directory,
31611	    # for example /java/linux/cups
31612	    if test -d ${resource}; then
31613	       depdir=${resource}
31614	    else
31615
31616# alsa is for example mymodule
31617# $resource is for example libs/general/libmymod_1_2_3.zip
31618# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31619# $with_builddeps_dir is for example /localhome/builddeps
31620# depdir is the name of the variable into which we store the depdir, eg MYMOD
31621# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31622# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31623    filename=`basename $resource`
31624    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31625    filebase=${filename%%.*}
31626    extension=${filename#*.}
31627    installdir=$with_builddeps_dir/$filebase
31628    if test ! -f $installdir/$filename.unpacked; then
31629        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
31630$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31631        if test ! -d $installdir; then
31632            mkdir -p $installdir
31633        fi
31634        if test ! -d $installdir; then
31635            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31636        fi
31637        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
31638        touch $tmpfile
31639        if test ! -f $tmpfile; then
31640            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31641        fi
31642
31643    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31644    # $tmpfile is the local file name for the downloaded file.
31645    VALID_TOOL=no
31646    if test "x$BDEPS_FTP" = xwget; then
31647       VALID_TOOL=yes
31648       wget -O $tmpfile $with_builddeps_server/$resource
31649    fi
31650    if test "x$BDEPS_FTP" = xlftp; then
31651       VALID_TOOL=yes
31652       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31653    fi
31654    if test "x$BDEPS_FTP" = xftp; then
31655        VALID_TOOL=yes
31656        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31657        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31658        FTPUSERPWD=${FTPSERVER%%@*}
31659        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31660            FTPUSER=${userpwd%%:*}
31661            FTPPWD=${userpwd#*@}
31662            FTPSERVER=${FTPSERVER#*@}
31663        else
31664            FTPUSER=ftp
31665            FTPPWD=ftp
31666        fi
31667        # the "pass" command does not work on some
31668        # ftp clients (read ftp.exe) but if it works,
31669        # passive mode is better!
31670        (\
31671            echo "user $FTPUSER $FTPPWD"        ;\
31672            echo "pass"                         ;\
31673            echo "bin"                          ;\
31674            echo "get $FTPPATH $tmpfile"              ;\
31675        ) | ftp -in $FTPSERVER
31676    fi
31677    if test "x$VALID_TOOL" != xyes; then
31678       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31679    fi
31680
31681        mv $tmpfile $installdir/$filename
31682        if test ! -s $installdir/$filename; then
31683            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31684        fi
31685        case "$extension" in
31686            zip)  echo "Unzipping $installdir/$filename..."
31687               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31688            ;;
31689            tar.gz) echo "Untaring $installdir/$filename..."
31690               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31691            ;;
31692            tgz) echo "Untaring $installdir/$filename..."
31693               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31694            ;;
31695            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31696            ;;
31697        esac
31698    fi
31699    if test -f $installdir/$filename.unpacked; then
31700        depdir=$installdir
31701    fi
31702
31703	    fi
31704            # Source the builddeps file again, because in the previous command, the depdir
31705            # was updated to point at the current build dependency install directory.
31706            . $builddepsfile
31707            # Now extract variables from the builddeps.conf files.
31708            theroot=${builddep_alsa_ROOT}
31709            thecflags=${builddep_alsa_CFLAGS}
31710            thelibs=${builddep_alsa_LIBS}
31711            if test "x$depdir" = x; then
31712                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
31713            fi
31714            ALSA=$depdir
31715            if test "x$theroot" != x; then
31716               ALSA="$theroot"
31717            fi
31718            if test "x$thecflags" != x; then
31719               ALSA_CFLAGS="$thecflags"
31720            fi
31721            if test "x$thelibs" != x; then
31722               ALSA_LIBS="$thelibs"
31723            fi
31724            ALSA_FOUND=yes
31725            else ALSA_FOUND=no
31726
31727        fi
31728        else ALSA_FOUND=no
31729
31730    fi
31731
31732	fi
31733	if test "x$ALSA_FOUND" = xno; then
31734
31735pkg_failed=no
31736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
31737$as_echo_n "checking for ALSA... " >&6; }
31738
31739if test -n "$ALSA_CFLAGS"; then
31740    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
31741 elif test -n "$PKG_CONFIG"; then
31742    if test -n "$PKG_CONFIG" && \
31743    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
31744  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
31745  ac_status=$?
31746  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31747  test $ac_status = 0; }; then
31748  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
31749else
31750  pkg_failed=yes
31751fi
31752 else
31753    pkg_failed=untried
31754fi
31755if test -n "$ALSA_LIBS"; then
31756    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
31757 elif test -n "$PKG_CONFIG"; then
31758    if test -n "$PKG_CONFIG" && \
31759    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
31760  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
31761  ac_status=$?
31762  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31763  test $ac_status = 0; }; then
31764  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
31765else
31766  pkg_failed=yes
31767fi
31768 else
31769    pkg_failed=untried
31770fi
31771
31772
31773
31774if test $pkg_failed = yes; then
31775
31776if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31777        _pkg_short_errors_supported=yes
31778else
31779        _pkg_short_errors_supported=no
31780fi
31781        if test $_pkg_short_errors_supported = yes; then
31782	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
31783        else
31784	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
31785        fi
31786	# Put the nasty error message in config.log where it belongs
31787	echo "$ALSA_PKG_ERRORS" >&5
31788
31789	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31790$as_echo "no" >&6; }
31791                ALSA_FOUND=no
31792elif test $pkg_failed = untried; then
31793	ALSA_FOUND=no
31794else
31795	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
31796	ALSA_LIBS=$pkg_cv_ALSA_LIBS
31797        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31798$as_echo "yes" >&6; }
31799	ALSA_FOUND=yes
31800fi
31801	fi
31802	if test "x$ALSA_FOUND" = xno; then
31803	    for ac_header in alsa/asoundlib.h
31804do :
31805  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
31806if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
31807  cat >>confdefs.h <<_ACEOF
31808#define HAVE_ALSA_ASOUNDLIB_H 1
31809_ACEOF
31810 ALSA_FOUND=yes
31811	                      ALSA_CFLAGS=-Iignoreme
31812	                      ALSA_LIBS=-lasound
31813	                      DEFAULT_ALSA=yes
31814else
31815  ALSA_FOUND=no
31816fi
31817
31818done
31819
31820	fi
31821	if test "x$ALSA_FOUND" = xno; then
31822
31823    # Print a helpful message on how to acquire the necessary build dependency.
31824    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
31825    MISSING_DEPENDENCY=alsa
31826    PKGHANDLER_COMMAND=
31827
31828    case $PKGHANDLER in
31829	apt-get)
31830                apt_help     $MISSING_DEPENDENCY ;;
31831    yum)
31832                yum_help     $MISSING_DEPENDENCY ;;
31833	port)
31834                port_help    $MISSING_DEPENDENCY ;;
31835	pkgutil)
31836                pkgutil_help $MISSING_DEPENDENCY ;;
31837	pkgadd)
31838                pkgadd_help  $MISSING_DEPENDENCY ;;
31839    * )
31840      break ;;
31841    esac
31842
31843    if test "x$PKGHANDLER_COMMAND" != x; then
31844        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31845    fi
31846
31847	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
31848	fi
31849fi
31850
31851
31852
31853
31854
31855
31856
31857###############################################################################
31858#
31859# Check for the jpeg library
31860#
31861
31862USE_EXTERNAL_LIBJPEG=true
31863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
31864$as_echo_n "checking for main in -ljpeg... " >&6; }
31865if ${ac_cv_lib_jpeg_main+:} false; then :
31866  $as_echo_n "(cached) " >&6
31867else
31868  ac_check_lib_save_LIBS=$LIBS
31869LIBS="-ljpeg  $LIBS"
31870cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31871/* end confdefs.h.  */
31872
31873
31874int
31875main ()
31876{
31877return main ();
31878  ;
31879  return 0;
31880}
31881_ACEOF
31882if ac_fn_cxx_try_link "$LINENO"; then :
31883  ac_cv_lib_jpeg_main=yes
31884else
31885  ac_cv_lib_jpeg_main=no
31886fi
31887rm -f core conftest.err conftest.$ac_objext \
31888    conftest$ac_exeext conftest.$ac_ext
31889LIBS=$ac_check_lib_save_LIBS
31890fi
31891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
31892$as_echo "$ac_cv_lib_jpeg_main" >&6; }
31893if test "x$ac_cv_lib_jpeg_main" = xyes; then :
31894  cat >>confdefs.h <<_ACEOF
31895#define HAVE_LIBJPEG 1
31896_ACEOF
31897
31898  LIBS="-ljpeg $LIBS"
31899
31900else
31901   USE_EXTERNAL_LIBJPEG=false
31902               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
31903$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
31904
31905fi
31906
31907
31908
31909###############################################################################
31910#
31911# Check for the gif library
31912#
31913
31914
31915# Check whether --with-giflib was given.
31916if test "${with_giflib+set}" = set; then :
31917  withval=$with_giflib;
31918fi
31919
31920
31921
31922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
31923$as_echo_n "checking for which giflib to use... " >&6; }
31924
31925# default is bundled
31926DEFAULT_GIFLIB=bundled
31927
31928#
31929# if user didn't specify, use DEFAULT_GIFLIB
31930#
31931if test "x${with_giflib}" = "x"; then
31932    with_giflib=${DEFAULT_GIFLIB}
31933fi
31934
31935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
31936$as_echo "${with_giflib}" >&6; }
31937
31938if test "x${with_giflib}" = "xbundled"; then
31939    USE_EXTERNAL_LIBGIF=false
31940elif test "x${with_giflib}" = "xsystem"; then
31941    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
31942if test "x$ac_cv_header_gif_lib_h" = xyes; then :
31943
31944else
31945   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
31946fi
31947
31948
31949    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
31950$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
31951if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
31952  $as_echo_n "(cached) " >&6
31953else
31954  ac_check_lib_save_LIBS=$LIBS
31955LIBS="-lgif  $LIBS"
31956cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31957/* end confdefs.h.  */
31958
31959/* Override any GCC internal prototype to avoid an error.
31960   Use char because int might match the return type of a GCC
31961   builtin and then its argument prototype would still apply.  */
31962#ifdef __cplusplus
31963extern "C"
31964#endif
31965char DGifGetCode ();
31966int
31967main ()
31968{
31969return DGifGetCode ();
31970  ;
31971  return 0;
31972}
31973_ACEOF
31974if ac_fn_cxx_try_link "$LINENO"; then :
31975  ac_cv_lib_gif_DGifGetCode=yes
31976else
31977  ac_cv_lib_gif_DGifGetCode=no
31978fi
31979rm -f core conftest.err conftest.$ac_objext \
31980    conftest$ac_exeext conftest.$ac_ext
31981LIBS=$ac_check_lib_save_LIBS
31982fi
31983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
31984$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
31985if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
31986  cat >>confdefs.h <<_ACEOF
31987#define HAVE_LIBGIF 1
31988_ACEOF
31989
31990  LIBS="-lgif $LIBS"
31991
31992else
31993   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
31994fi
31995
31996
31997    USE_EXTERNAL_LIBGIF=true
31998else
31999    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
32000fi
32001
32002
32003###############################################################################
32004#
32005# Check for the zlib library
32006#
32007
32008
32009# Check whether --with-zlib was given.
32010if test "${with_zlib+set}" = set; then :
32011  withval=$with_zlib;
32012fi
32013
32014
32015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
32016$as_echo_n "checking for compress in -lz... " >&6; }
32017if ${ac_cv_lib_z_compress+:} false; then :
32018  $as_echo_n "(cached) " >&6
32019else
32020  ac_check_lib_save_LIBS=$LIBS
32021LIBS="-lz  $LIBS"
32022cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32023/* end confdefs.h.  */
32024
32025/* Override any GCC internal prototype to avoid an error.
32026   Use char because int might match the return type of a GCC
32027   builtin and then its argument prototype would still apply.  */
32028#ifdef __cplusplus
32029extern "C"
32030#endif
32031char compress ();
32032int
32033main ()
32034{
32035return compress ();
32036  ;
32037  return 0;
32038}
32039_ACEOF
32040if ac_fn_cxx_try_link "$LINENO"; then :
32041  ac_cv_lib_z_compress=yes
32042else
32043  ac_cv_lib_z_compress=no
32044fi
32045rm -f core conftest.err conftest.$ac_objext \
32046    conftest$ac_exeext conftest.$ac_ext
32047LIBS=$ac_check_lib_save_LIBS
32048fi
32049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
32050$as_echo "$ac_cv_lib_z_compress" >&6; }
32051if test "x$ac_cv_lib_z_compress" = xyes; then :
32052   ZLIB_FOUND=yes
32053else
32054   ZLIB_FOUND=no
32055fi
32056
32057
32058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
32059$as_echo_n "checking for which zlib to use... " >&6; }
32060
32061DEFAULT_ZLIB=bundled
32062if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32063#
32064# On macosx default is system...on others default is
32065#
32066    DEFAULT_ZLIB=system
32067fi
32068
32069if test "x${ZLIB_FOUND}" != "xyes"; then
32070#
32071# If we don't find any system...set default to bundled
32072#
32073    DEFAULT_ZLIB=bundled
32074fi
32075
32076#
32077# If user didn't specify, use DEFAULT_ZLIB
32078#
32079if test "x${with_zlib}" = "x"; then
32080    with_zlib=${DEFAULT_ZLIB}
32081fi
32082
32083if test "x${with_zlib}" = "xbundled"; then
32084    USE_EXTERNAL_LIBZ=false
32085    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
32086$as_echo "bundled" >&6; }
32087elif test "x${with_zlib}" = "xsystem"; then
32088    if test "x${ZLIB_FOUND}" = "xyes"; then
32089        USE_EXTERNAL_LIBZ=true
32090        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
32091$as_echo "system" >&6; }
32092    else
32093        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
32094$as_echo "system not found" >&6; }
32095        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
32096    fi
32097else
32098    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
32099fi
32100
32101
32102
32103###############################################################################
32104LIBZIP_CAN_USE_MMAP=true
32105
32106
32107
32108###############################################################################
32109#
32110# Check if altzone exists in time.h
32111#
32112
32113cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32114/* end confdefs.h.  */
32115#include <time.h>
32116int
32117main ()
32118{
32119return (int)altzone;
32120  ;
32121  return 0;
32122}
32123_ACEOF
32124if ac_fn_cxx_try_link "$LINENO"; then :
32125  has_altzone=yes
32126else
32127  has_altzone=no
32128fi
32129rm -f core conftest.err conftest.$ac_objext \
32130    conftest$ac_exeext conftest.$ac_ext
32131if test "x$has_altzone" = xyes; then
32132
32133$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
32134
32135fi
32136
32137###############################################################################
32138#
32139# Check the maths library
32140#
32141
32142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
32143$as_echo_n "checking for cos in -lm... " >&6; }
32144if ${ac_cv_lib_m_cos+:} false; then :
32145  $as_echo_n "(cached) " >&6
32146else
32147  ac_check_lib_save_LIBS=$LIBS
32148LIBS="-lm  $LIBS"
32149cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32150/* end confdefs.h.  */
32151
32152/* Override any GCC internal prototype to avoid an error.
32153   Use char because int might match the return type of a GCC
32154   builtin and then its argument prototype would still apply.  */
32155#ifdef __cplusplus
32156extern "C"
32157#endif
32158char cos ();
32159int
32160main ()
32161{
32162return cos ();
32163  ;
32164  return 0;
32165}
32166_ACEOF
32167if ac_fn_cxx_try_link "$LINENO"; then :
32168  ac_cv_lib_m_cos=yes
32169else
32170  ac_cv_lib_m_cos=no
32171fi
32172rm -f core conftest.err conftest.$ac_objext \
32173    conftest$ac_exeext conftest.$ac_ext
32174LIBS=$ac_check_lib_save_LIBS
32175fi
32176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
32177$as_echo "$ac_cv_lib_m_cos" >&6; }
32178if test "x$ac_cv_lib_m_cos" = xyes; then :
32179  cat >>confdefs.h <<_ACEOF
32180#define HAVE_LIBM 1
32181_ACEOF
32182
32183  LIBS="-lm $LIBS"
32184
32185else
32186
32187                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
32188$as_echo "$as_me: Maths library was not found" >&6;}
32189
32190fi
32191
32192
32193
32194###############################################################################
32195#
32196# Check for libdl.so
32197
32198save_LIBS="$LIBS"
32199LIBS=""
32200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
32201$as_echo_n "checking for dlopen in -ldl... " >&6; }
32202if ${ac_cv_lib_dl_dlopen+:} false; then :
32203  $as_echo_n "(cached) " >&6
32204else
32205  ac_check_lib_save_LIBS=$LIBS
32206LIBS="-ldl  $LIBS"
32207cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32208/* end confdefs.h.  */
32209
32210/* Override any GCC internal prototype to avoid an error.
32211   Use char because int might match the return type of a GCC
32212   builtin and then its argument prototype would still apply.  */
32213#ifdef __cplusplus
32214extern "C"
32215#endif
32216char dlopen ();
32217int
32218main ()
32219{
32220return dlopen ();
32221  ;
32222  return 0;
32223}
32224_ACEOF
32225if ac_fn_cxx_try_link "$LINENO"; then :
32226  ac_cv_lib_dl_dlopen=yes
32227else
32228  ac_cv_lib_dl_dlopen=no
32229fi
32230rm -f core conftest.err conftest.$ac_objext \
32231    conftest$ac_exeext conftest.$ac_ext
32232LIBS=$ac_check_lib_save_LIBS
32233fi
32234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
32235$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
32236if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
32237  cat >>confdefs.h <<_ACEOF
32238#define HAVE_LIBDL 1
32239_ACEOF
32240
32241  LIBS="-ldl $LIBS"
32242
32243fi
32244
32245LIBDL="$LIBS"
32246
32247LIBS="$save_LIBS"
32248
32249
32250
32251###############################################################################
32252#
32253# statically link libstdc++ before C++ ABI is stablized on Linux unless
32254# dynamic build is configured on command line.
32255#
32256
32257# Check whether --with-stdc++lib was given.
32258if test "${with_stdc__lib+set}" = set; then :
32259  withval=$with_stdc__lib;
32260    if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
32261        && test "x$with_stdc__lib" != xdefault; then
32262      as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
32263    fi
32264
32265else
32266  with_stdc__lib=default
32267
32268fi
32269
32270
32271if test "x$OPENJDK_TARGET_OS" = xlinux; then
32272    # Test if -lstdc++ works.
32273    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
32274$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
32275    ac_ext=cpp
32276ac_cpp='$CXXCPP $CPPFLAGS'
32277ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32278ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32279ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32280
32281    OLD_CXXFLAGS="$CXXFLAGS"
32282    CXXFLAGS="$CXXFLAGS -lstdc++"
32283    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32284/* end confdefs.h.  */
32285
32286int
32287main ()
32288{
32289return 0;
32290  ;
32291  return 0;
32292}
32293_ACEOF
32294if ac_fn_cxx_try_link "$LINENO"; then :
32295  has_dynamic_libstdcxx=yes
32296else
32297  has_dynamic_libstdcxx=no
32298fi
32299rm -f core conftest.err conftest.$ac_objext \
32300    conftest$ac_exeext conftest.$ac_ext
32301    CXXFLAGS="$OLD_CXXFLAGS"
32302    ac_ext=cpp
32303ac_cpp='$CXXCPP $CPPFLAGS'
32304ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32305ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32306ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32307
32308    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
32309$as_echo "$has_dynamic_libstdcxx" >&6; }
32310
32311    # Test if stdc++ can be linked statically.
32312    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
32313$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
32314    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
32315    ac_ext=cpp
32316ac_cpp='$CXXCPP $CPPFLAGS'
32317ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32318ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32319ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32320
32321    OLD_LIBS="$LIBS"
32322    OLD_CXX="$CXX"
32323    LIBS="$STATIC_STDCXX_FLAGS"
32324    CXX="$CC"
32325    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32326/* end confdefs.h.  */
32327
32328int
32329main ()
32330{
32331return 0;
32332  ;
32333  return 0;
32334}
32335_ACEOF
32336if ac_fn_cxx_try_link "$LINENO"; then :
32337  has_static_libstdcxx=yes
32338else
32339  has_static_libstdcxx=no
32340fi
32341rm -f core conftest.err conftest.$ac_objext \
32342    conftest$ac_exeext conftest.$ac_ext
32343    LIBS="$OLD_LIBS"
32344    CXX="$OLD_CXX"
32345    ac_ext=cpp
32346ac_cpp='$CXXCPP $CPPFLAGS'
32347ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32348ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32349ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32350
32351    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
32352$as_echo "$has_static_libstdcxx" >&6; }
32353
32354    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
32355        as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
32356    fi
32357
32358    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
32359        as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
32360    fi
32361
32362    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
32363        as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
32364    fi
32365
32366    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
32367$as_echo_n "checking how to link with libstdc++... " >&6; }
32368    # If dynamic was requested, it's available since it would fail above otherwise.
32369    # If dynamic wasn't requested, go with static unless it isn't available.
32370    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32371        LIBCXX="$LIBCXX -lstdc++"
32372        LDCXX="$CXX"
32373        STATIC_CXX_SETTING="STATIC_CXX=false"
32374        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
32375$as_echo "dynamic" >&6; }
32376    else
32377        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
32378        LDCXX="$CC"
32379        STATIC_CXX_SETTING="STATIC_CXX=true"
32380        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
32381$as_echo "static" >&6; }
32382    fi
32383fi
32384
32385
32386if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32387    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
32388
32389pkg_failed=no
32390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
32391$as_echo_n "checking for LIBFFI... " >&6; }
32392
32393if test -n "$LIBFFI_CFLAGS"; then
32394    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
32395 elif test -n "$PKG_CONFIG"; then
32396    if test -n "$PKG_CONFIG" && \
32397    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32398  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32399  ac_status=$?
32400  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32401  test $ac_status = 0; }; then
32402  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
32403else
32404  pkg_failed=yes
32405fi
32406 else
32407    pkg_failed=untried
32408fi
32409if test -n "$LIBFFI_LIBS"; then
32410    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
32411 elif test -n "$PKG_CONFIG"; then
32412    if test -n "$PKG_CONFIG" && \
32413    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32414  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32415  ac_status=$?
32416  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32417  test $ac_status = 0; }; then
32418  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
32419else
32420  pkg_failed=yes
32421fi
32422 else
32423    pkg_failed=untried
32424fi
32425
32426
32427
32428if test $pkg_failed = yes; then
32429
32430if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32431        _pkg_short_errors_supported=yes
32432else
32433        _pkg_short_errors_supported=no
32434fi
32435        if test $_pkg_short_errors_supported = yes; then
32436	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
32437        else
32438	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
32439        fi
32440	# Put the nasty error message in config.log where it belongs
32441	echo "$LIBFFI_PKG_ERRORS" >&5
32442
32443	as_fn_error $? "Package requirements (libffi) were not met:
32444
32445$LIBFFI_PKG_ERRORS
32446
32447Consider adjusting the PKG_CONFIG_PATH environment variable if you
32448installed software in a non-standard prefix.
32449
32450Alternatively, you may set the environment variables LIBFFI_CFLAGS
32451and LIBFFI_LIBS to avoid the need to call pkg-config.
32452See the pkg-config man page for more details.
32453" "$LINENO" 5
32454elif test $pkg_failed = untried; then
32455	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32456$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32457as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
32458is in your PATH or set the PKG_CONFIG environment variable to the full
32459path to pkg-config.
32460
32461Alternatively, you may set the environment variables LIBFFI_CFLAGS
32462and LIBFFI_LIBS to avoid the need to call pkg-config.
32463See the pkg-config man page for more details.
32464
32465To get pkg-config, see <http://pkg-config.freedesktop.org/>.
32466See \`config.log' for more details" "$LINENO" 5; }
32467else
32468	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
32469	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
32470        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32471$as_echo "yes" >&6; }
32472	:
32473fi
32474
32475fi
32476
32477if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32478    # Extract the first word of "llvm-config", so it can be a program name with args.
32479set dummy llvm-config; ac_word=$2
32480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32481$as_echo_n "checking for $ac_word... " >&6; }
32482if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
32483  $as_echo_n "(cached) " >&6
32484else
32485  if test -n "$LLVM_CONFIG"; then
32486  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
32487else
32488as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32489for as_dir in $PATH
32490do
32491  IFS=$as_save_IFS
32492  test -z "$as_dir" && as_dir=.
32493    for ac_exec_ext in '' $ac_executable_extensions; do
32494  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32495    ac_cv_prog_LLVM_CONFIG="llvm-config"
32496    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32497    break 2
32498  fi
32499done
32500  done
32501IFS=$as_save_IFS
32502
32503fi
32504fi
32505LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
32506if test -n "$LLVM_CONFIG"; then
32507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
32508$as_echo "$LLVM_CONFIG" >&6; }
32509else
32510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32511$as_echo "no" >&6; }
32512fi
32513
32514
32515
32516    if test "x$LLVM_CONFIG" != xllvm-config; then
32517        as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
32518    fi
32519
32520    llvm_components="jit mcjit engine nativecodegen native"
32521    unset LLVM_CFLAGS
32522    for flag in $("$LLVM_CONFIG" --cxxflags); do
32523      if echo "${flag}" | grep -q '^-[ID]'; then
32524        if test "${flag}" != "-D_DEBUG" ; then
32525          if test "${LLVM_CFLAGS}" != "" ; then
32526            LLVM_CFLAGS="${LLVM_CFLAGS} "
32527          fi
32528          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
32529        fi
32530      fi
32531    done
32532    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
32533    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
32534
32535    unset LLVM_LDFLAGS
32536    for flag in $("${LLVM_CONFIG}" --ldflags); do
32537      if echo "${flag}" | grep -q '^-L'; then
32538        if test "${LLVM_LDFLAGS}" != ""; then
32539          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
32540        fi
32541        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
32542      fi
32543    done
32544
32545    unset LLVM_LIBS
32546    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
32547      if echo "${flag}" | grep -q '^-l'; then
32548        if test "${LLVM_LIBS}" != ""; then
32549          LLVM_LIBS="${LLVM_LIBS} "
32550        fi
32551        LLVM_LIBS="${LLVM_LIBS}${flag}"
32552      fi
32553    done
32554
32555
32556
32557
32558fi
32559
32560# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
32561if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
32562    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
32563fi
32564
32565# TODO better (platform agnostic) test
32566if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
32567    LIBCXX="-lstdc++"
32568fi
32569
32570
32571
32572
32573
32574# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
32575
32576# When using cygwin or msys, we need a wrapper binary that renames
32577# /cygdrive/c/ arguments into c:/ arguments and peeks into
32578# @files and rewrites these too! This wrapper binary is
32579# called fixpath.
32580FIXPATH=
32581if test "x$OPENJDK_BUILD_OS" = xwindows; then
32582    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
32583$as_echo_n "checking if fixpath can be created... " >&6; }
32584    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
32585    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
32586    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
32587      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
32588      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
32589      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
32590      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
32591    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
32592      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
32593      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
32594
32595      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
32596      # @ was chosen as separator to minimize risk of other tools messing around with it
32597      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
32598      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
32599
32600      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
32601    fi
32602    rm -f $OUTPUT_ROOT/fixpath*
32603    cd $OUTPUT_ROOT
32604    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
32605    cd $CURDIR
32606
32607    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
32608        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32609$as_echo "no" >&6; }
32610        cat $OUTPUT_ROOT/fixpath1.log
32611        as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
32612    fi
32613    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32614$as_echo "yes" >&6; }
32615    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
32616$as_echo_n "checking if fixpath.exe works... " >&6; }
32617    cd $OUTPUT_ROOT
32618    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
32619    cd $CURDIR
32620    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
32621        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32622$as_echo "no" >&6; }
32623        cat $OUTPUT_ROOT/fixpath2.log
32624        as_fn_error $? "fixpath did not work!" "$LINENO" 5
32625    fi
32626    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32627$as_echo "yes" >&6; }
32628    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
32629fi
32630
32631
32632
32633
32634###############################################################################
32635#
32636# We need to do some final tweaking, when everything else is done.
32637#
32638###############################################################################
32639
32640
32641HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
32642
32643
32644# The name of the Service Agent jar.
32645SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
32646if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
32647  SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
32648fi
32649
32650
32651
32652
32653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
32654$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
32655
32656if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
32657    ENABLE_INTREE_EC=yes
32658    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32659$as_echo "yes" >&6; }
32660else
32661    ENABLE_INTREE_EC=no
32662    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32663$as_echo "no" >&6; }
32664fi
32665
32666
32667
32668
32669###############################################################################
32670#
32671# Configure parts of the build that only affect the build performance,
32672# not the result.
32673#
32674###############################################################################
32675
32676
32677  # How many cores do we have on this build system?
32678
32679# Check whether --with-num-cores was given.
32680if test "${with_num_cores+set}" = set; then :
32681  withval=$with_num_cores;
32682fi
32683
32684  if test "x$with_num_cores" = x; then
32685    # The number of cores were not specified, try to probe them.
32686
32687    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
32688$as_echo_n "checking for number of cores... " >&6; }
32689    NUM_CORES=1
32690    FOUND_CORES=no
32691
32692    if test -f /proc/cpuinfo; then
32693        # Looks like a Linux (or cygwin) system
32694        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
32695        FOUND_CORES=yes
32696    elif test -x /usr/sbin/psrinfo; then
32697        # Looks like a Solaris system
32698        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
32699        FOUND_CORES=yes
32700    elif test -x /usr/sbin/system_profiler; then
32701        # Looks like a MacOSX system
32702        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
32703        FOUND_CORES=yes
32704    elif test -n "$NUMBER_OF_PROCESSORS"; then
32705        # On windows, look in the env
32706        NUM_CORES=$NUMBER_OF_PROCESSORS
32707        FOUND_CORES=yes
32708    fi
32709
32710    if test "x$FOUND_CORES" = xyes; then
32711        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
32712$as_echo "$NUM_CORES" >&6; }
32713    else
32714        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
32715$as_echo "could not detect number of cores, defaulting to 1" >&6; }
32716        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
32717$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
32718    fi
32719
32720
32721  else
32722    NUM_CORES=$with_num_cores
32723  fi
32724
32725
32726
32727  # How much memory do we have on this build system?
32728
32729# Check whether --with-memory-size was given.
32730if test "${with_memory_size+set}" = set; then :
32731  withval=$with_memory_size;
32732fi
32733
32734  if test "x$with_memory_size" = x; then
32735    # The memory size was not specified, try to probe it.
32736
32737    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
32738$as_echo_n "checking for memory size... " >&6; }
32739    # Default to 1024 MB
32740    MEMORY_SIZE=1024
32741    FOUND_MEM=no
32742
32743    if test -f /proc/meminfo; then
32744        # Looks like a Linux (or cygwin) system
32745        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
32746        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
32747        FOUND_MEM=yes
32748    elif test -x /usr/sbin/prtconf; then
32749        # Looks like a Solaris system
32750        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
32751        FOUND_MEM=yes
32752    elif test -x /usr/sbin/system_profiler; then
32753        # Looks like a MacOSX system
32754        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
32755        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
32756        FOUND_MEM=yes
32757    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
32758        # Windows, but without cygwin
32759        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
32760        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
32761        FOUND_MEM=yes
32762    fi
32763
32764    if test "x$FOUND_MEM" = xyes; then
32765        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
32766$as_echo "$MEMORY_SIZE MB" >&6; }
32767    else
32768        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
32769$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
32770        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
32771$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
32772    fi
32773
32774  else
32775    MEMORY_SIZE=$with_memory_size
32776  fi
32777
32778
32779
32780  # Provide a decent default number of parallel jobs for make depending on
32781  # number of cores, amount of memory and machine architecture.
32782
32783# Check whether --with-jobs was given.
32784if test "${with_jobs+set}" = set; then :
32785  withval=$with_jobs;
32786fi
32787
32788  if test "x$with_jobs" = x; then
32789    # Number of jobs was not specified, calculate.
32790    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
32791$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
32792    # Approximate memory in GB, rounding up a bit.
32793    memory_gb=`expr $MEMORY_SIZE / 1100`
32794    # Pick the lowest of memory in gb and number of cores.
32795    if test "$memory_gb" -lt "$NUM_CORES"; then
32796      JOBS="$memory_gb"
32797    else
32798      JOBS="$NUM_CORES"
32799      # On bigger machines, leave some room for other processes to run
32800      if test "$JOBS" -gt "4"; then
32801        JOBS=`expr $JOBS '*' 90 / 100`
32802      fi
32803    fi
32804    # Cap number of jobs to 16
32805    if test "$JOBS" -gt "16"; then
32806      JOBS=16
32807    fi
32808    if test "$JOBS" -eq "0"; then
32809      JOBS=1
32810    fi
32811    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
32812$as_echo "$JOBS" >&6; }
32813  else
32814    JOBS=$with_jobs
32815  fi
32816
32817
32818
32819# Setup smart javac (after cores and memory have been setup)
32820
32821
32822# Check whether --with-sjavac-server-java was given.
32823if test "${with_sjavac_server_java+set}" = set; then :
32824  withval=$with_sjavac_server_java;
32825fi
32826
32827
32828if test "x$with_sjavac_server_java" != x; then
32829    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
32830    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
32831    if test "x$FOUND_VERSION" = x; then
32832        as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
32833    fi
32834else
32835    SJAVAC_SERVER_JAVA=""
32836    # Hotspot specific options.
32837
32838    $ECHO "Check if jvm arg is ok: -verbosegc" >&5
32839    $ECHO "Command: $JAVA -verbosegc -version" >&5
32840    OUTPUT=`$JAVA -verbosegc -version 2>&1`
32841    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32842    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32843    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32844        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
32845	JVM_ARG_OK=true
32846    else
32847	$ECHO "Arg failed:" >&5
32848	$ECHO "$OUTPUT" >&5
32849	JVM_ARG_OK=false
32850    fi
32851
32852    # JRockit specific options.
32853
32854    $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
32855    $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
32856    OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
32857    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32858    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32859    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32860        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
32861	JVM_ARG_OK=true
32862    else
32863	$ECHO "Arg failed:" >&5
32864	$ECHO "$OUTPUT" >&5
32865	JVM_ARG_OK=false
32866    fi
32867
32868    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
32869fi
32870
32871
32872if test "$MEMORY_SIZE" -gt "2500"; then
32873
32874    $ECHO "Check if jvm arg is ok: -d64" >&5
32875    $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
32876    OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
32877    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32878    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32879    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32880        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
32881	JVM_ARG_OK=true
32882    else
32883	$ECHO "Arg failed:" >&5
32884	$ECHO "$OUTPUT" >&5
32885	JVM_ARG_OK=false
32886    fi
32887
32888    if test "$JVM_ARG_OK" = true; then
32889        JVM_64BIT=true
32890	JVM_ARG_OK=false
32891    fi
32892    fi
32893
32894if test "$JVM_64BIT" = true; then
32895    if test "$MEMORY_SIZE" -gt "17000"; then
32896
32897    $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
32898    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
32899    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
32900    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32901    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32902    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32903        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
32904	JVM_ARG_OK=true
32905    else
32906	$ECHO "Arg failed:" >&5
32907	$ECHO "$OUTPUT" >&5
32908	JVM_ARG_OK=false
32909    fi
32910
32911    fi
32912    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
32913
32914    $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
32915    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
32916    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
32917    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32918    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32919    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32920        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
32921	JVM_ARG_OK=true
32922    else
32923	$ECHO "Arg failed:" >&5
32924	$ECHO "$OUTPUT" >&5
32925	JVM_ARG_OK=false
32926    fi
32927
32928    fi
32929    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
32930
32931    $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
32932    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
32933    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
32934    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32935    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32936    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32937        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
32938	JVM_ARG_OK=true
32939    else
32940	$ECHO "Arg failed:" >&5
32941	$ECHO "$OUTPUT" >&5
32942	JVM_ARG_OK=false
32943    fi
32944
32945    fi
32946    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
32947
32948    $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
32949    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
32950    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
32951    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32952    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32953    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32954        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
32955	JVM_ARG_OK=true
32956    else
32957	$ECHO "Arg failed:" >&5
32958	$ECHO "$OUTPUT" >&5
32959	JVM_ARG_OK=false
32960    fi
32961
32962    fi
32963fi
32964if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
32965
32966    $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
32967    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
32968    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
32969    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32970    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32971    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32972        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
32973	JVM_ARG_OK=true
32974    else
32975	$ECHO "Arg failed:" >&5
32976	$ECHO "$OUTPUT" >&5
32977	JVM_ARG_OK=false
32978    fi
32979
32980fi
32981if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
32982
32983    $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
32984    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
32985    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
32986    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32987    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32988    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32989        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
32990	JVM_ARG_OK=true
32991    else
32992	$ECHO "Arg failed:" >&5
32993	$ECHO "$OUTPUT" >&5
32994	JVM_ARG_OK=false
32995    fi
32996
32997fi
32998if test "$JVM_ARG_OK" = false; then
32999
33000    $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
33001    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
33002    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
33003    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33004    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33005    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33006        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
33007	JVM_ARG_OK=true
33008    else
33009	$ECHO "Arg failed:" >&5
33010	$ECHO "$OUTPUT" >&5
33011	JVM_ARG_OK=false
33012    fi
33013
33014fi
33015
33016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
33017$as_echo_n "checking whether to use sjavac... " >&6; }
33018# Check whether --enable-sjavac was given.
33019if test "${enable_sjavac+set}" = set; then :
33020  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
33021else
33022  ENABLE_SJAVAC='no'
33023fi
33024
33025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
33026$as_echo "$ENABLE_SJAVAC" >&6; }
33027
33028
33029if test "x$ENABLE_SJAVAC" = xyes; then
33030    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
33031else
33032    SJAVAC_SERVER_DIR=
33033fi
33034
33035
33036
33037
33038# Can the C/C++ compiler use precompiled headers?
33039
33040
33041###############################################################################
33042#
33043# Can the C/C++ compiler use precompiled headers?
33044#
33045# Check whether --enable-precompiled-headers was given.
33046if test "${enable_precompiled_headers+set}" = set; then :
33047  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
33048else
33049  ENABLE_PRECOMPH=yes
33050fi
33051
33052
33053USE_PRECOMPILED_HEADER=1
33054if test "x$ENABLE_PRECOMPH" = xno; then
33055    USE_PRECOMPILED_HEADER=0
33056fi
33057
33058if test "x$ENABLE_PRECOMPH" = xyes; then
33059    # Check that the compiler actually supports precomp headers.
33060    if test "x$GCC" = xyes; then
33061         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
33062$as_echo_n "checking that precompiled headers work... " >&6; }
33063         echo "int alfa();" > conftest.h
33064         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
33065         if test ! -f conftest.hpp.gch; then
33066             USE_PRECOMPILED_HEADER=0
33067             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33068$as_echo "no" >&6; }
33069         else
33070             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33071$as_echo "yes" >&6; }
33072         fi
33073         rm -f conftest.h conftest.hpp.gch
33074    fi
33075fi
33076
33077
33078
33079
33080# Setup use of ccache, if available
33081
33082    # Check whether --enable-ccache was given.
33083if test "${enable_ccache+set}" = set; then :
33084  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
33085else
33086  ENABLE_CCACHE=yes
33087fi
33088
33089    if test "x$ENABLE_CCACHE" = xyes; then
33090        OLD_PATH="$PATH"
33091        if test "x$TOOLS_DIR" != x; then
33092          PATH=$TOOLS_DIR:$PATH
33093        fi
33094        # Extract the first word of "ccache", so it can be a program name with args.
33095set dummy ccache; ac_word=$2
33096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33097$as_echo_n "checking for $ac_word... " >&6; }
33098if ${ac_cv_path_CCACHE+:} false; then :
33099  $as_echo_n "(cached) " >&6
33100else
33101  case $CCACHE in
33102  [\\/]* | ?:[\\/]*)
33103  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
33104  ;;
33105  *)
33106  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33107for as_dir in $PATH
33108do
33109  IFS=$as_save_IFS
33110  test -z "$as_dir" && as_dir=.
33111    for ac_exec_ext in '' $ac_executable_extensions; do
33112  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33113    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
33114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33115    break 2
33116  fi
33117done
33118  done
33119IFS=$as_save_IFS
33120
33121  ;;
33122esac
33123fi
33124CCACHE=$ac_cv_path_CCACHE
33125if test -n "$CCACHE"; then
33126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
33127$as_echo "$CCACHE" >&6; }
33128else
33129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33130$as_echo "no" >&6; }
33131fi
33132
33133
33134        PATH="$OLD_PATH"
33135    else
33136        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
33137$as_echo_n "checking for ccache... " >&6; }
33138        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
33139$as_echo "explicitly disabled" >&6; }
33140        CCACHE=
33141    fi
33142
33143
33144
33145# Check whether --with-ccache-dir was given.
33146if test "${with_ccache_dir+set}" = set; then :
33147  withval=$with_ccache_dir;
33148fi
33149
33150
33151    if test "x$with_ccache_dir" != x; then
33152        # When using a non home ccache directory, assume the use is to share ccache files
33153        # with other users. Thus change the umask.
33154        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
33155    fi
33156    CCACHE_FOUND=""
33157    if test "x$CCACHE" != x; then
33158
33159    if test "x$CCACHE" != x; then
33160        CCACHE_FOUND="true"
33161        # Only use ccache if it is 3.1.4 or later, which supports
33162        # precompiled headers.
33163        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
33164$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
33165        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
33166        if test "x$HAS_GOOD_CCACHE" = x; then
33167            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
33168$as_echo "no, disabling ccache" >&6; }
33169            CCACHE=
33170        else
33171            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33172$as_echo "yes" >&6; }
33173            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
33174$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
33175            PUSHED_FLAGS="$CXXFLAGS"
33176            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
33177            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33178/* end confdefs.h.  */
33179
33180int
33181main ()
33182{
33183
33184  ;
33185  return 0;
33186}
33187_ACEOF
33188if ac_fn_cxx_try_compile "$LINENO"; then :
33189  CC_KNOWS_CCACHE_TRICK=yes
33190else
33191  CC_KNOWS_CCACHE_TRICK=no
33192fi
33193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33194            CXXFLAGS="$PUSHED_FLAGS"
33195            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
33196                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33197$as_echo "yes" >&6; }
33198            else
33199                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
33200$as_echo "no, disabling ccaching of precompiled headers" >&6; }
33201                CCACHE=
33202            fi
33203        fi
33204    fi
33205
33206    if test "x$CCACHE" != x; then
33207        CCACHE_SLOPPINESS=time_macros
33208        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
33209        CCACHE_FLAGS=-fpch-preprocess
33210
33211        if test "x$SET_CCACHE_DIR" != x; then
33212            mkdir -p $CCACHE_DIR > /dev/null 2>&1
33213	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
33214        fi
33215    fi
33216
33217    fi
33218
33219
33220###############################################################################
33221#
33222# And now the finish...
33223#
33224###############################################################################
33225
33226# Check for some common pitfalls
33227
33228  if test x"$OPENJDK_BUILD_OS" = xwindows; then
33229    file_to_test="$SRC_ROOT/LICENSE"
33230    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
33231      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
33232    fi
33233  fi
33234
33235
33236
33237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
33238$as_echo_n "checking if build directory is on local disk... " >&6; }
33239
33240	# df -l lists only local disks; if the given directory is not found then
33241	# a non-zero exit code is given
33242  if test "x$DF" = x; then
33243    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33244      # msys does not have df; use Windows "net use" instead.
33245      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
33246      if test "x$IS_NETWORK_DISK" = x; then
33247        OUTPUT_DIR_IS_LOCAL="yes"
33248      else
33249        OUTPUT_DIR_IS_LOCAL="no"
33250      fi
33251    else
33252      # No df here, say it's local
33253      OUTPUT_DIR_IS_LOCAL="yes"
33254    fi
33255  else
33256    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
33257      OUTPUT_DIR_IS_LOCAL="yes"
33258    else
33259      OUTPUT_DIR_IS_LOCAL="no"
33260    fi
33261  fi
33262
33263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
33264$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
33265
33266
33267
33268# Check if the user has any old-style ALT_ variables set.
33269FOUND_ALT_VARIABLES=`env | grep ^ALT_`
33270
33271# Before generating output files, test if they exist. If they do, this is a reconfigure.
33272# Since we can't properly handle the dependencies for this, warn the user about the situation
33273if test -e $OUTPUT_ROOT/spec.gmk; then
33274  IS_RECONFIGURE=yes
33275else
33276  IS_RECONFIGURE=no
33277fi
33278
33279if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
33280  HIDE_PERFORMANCE_HINTS=yes
33281else
33282  HIDE_PERFORMANCE_HINTS=no
33283  # Hide it the next time around...
33284  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
33285fi
33286
33287
33288
33289# At the end, call the custom hook. (Dummy macro if no custom sources available)
33290
33291
33292# We're messing a bit with internal autoconf variables to put the config.status
33293# in the output directory instead of the current directory.
33294CONFIG_STATUS="$OUTPUT_ROOT/config.status"
33295
33296# Create the actual output files. Now the main work of configure is done.
33297cat >confcache <<\_ACEOF
33298# This file is a shell script that caches the results of configure
33299# tests run on this system so they can be shared between configure
33300# scripts and configure runs, see configure's option --config-cache.
33301# It is not useful on other systems.  If it contains results you don't
33302# want to keep, you may remove or edit it.
33303#
33304# config.status only pays attention to the cache file if you give it
33305# the --recheck option to rerun configure.
33306#
33307# `ac_cv_env_foo' variables (set or unset) will be overridden when
33308# loading this file, other *unset* `ac_cv_foo' will be assigned the
33309# following values.
33310
33311_ACEOF
33312
33313# The following way of writing the cache mishandles newlines in values,
33314# but we know of no workaround that is simple, portable, and efficient.
33315# So, we kill variables containing newlines.
33316# Ultrix sh set writes to stderr and can't be redirected directly,
33317# and sets the high bit in the cache file unless we assign to the vars.
33318(
33319  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
33320    eval ac_val=\$$ac_var
33321    case $ac_val in #(
33322    *${as_nl}*)
33323      case $ac_var in #(
33324      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
33325$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
33326      esac
33327      case $ac_var in #(
33328      _ | IFS | as_nl) ;; #(
33329      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
33330      *) { eval $ac_var=; unset $ac_var;} ;;
33331      esac ;;
33332    esac
33333  done
33334
33335  (set) 2>&1 |
33336    case $as_nl`(ac_space=' '; set) 2>&1` in #(
33337    *${as_nl}ac_space=\ *)
33338      # `set' does not quote correctly, so add quotes: double-quote
33339      # substitution turns \\\\ into \\, and sed turns \\ into \.
33340      sed -n \
33341	"s/'/'\\\\''/g;
33342	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
33343      ;; #(
33344    *)
33345      # `set' quotes correctly as required by POSIX, so do not add quotes.
33346      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
33347      ;;
33348    esac |
33349    sort
33350) |
33351  sed '
33352     /^ac_cv_env_/b end
33353     t clear
33354     :clear
33355     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
33356     t end
33357     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
33358     :end' >>confcache
33359if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
33360  if test -w "$cache_file"; then
33361    if test "x$cache_file" != "x/dev/null"; then
33362      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
33363$as_echo "$as_me: updating cache $cache_file" >&6;}
33364      if test ! -f "$cache_file" || test -h "$cache_file"; then
33365	cat confcache >"$cache_file"
33366      else
33367        case $cache_file in #(
33368        */* | ?:*)
33369	  mv -f confcache "$cache_file"$$ &&
33370	  mv -f "$cache_file"$$ "$cache_file" ;; #(
33371        *)
33372	  mv -f confcache "$cache_file" ;;
33373	esac
33374      fi
33375    fi
33376  else
33377    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
33378$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
33379  fi
33380fi
33381rm -f confcache
33382
33383test "x$prefix" = xNONE && prefix=$ac_default_prefix
33384# Let make expand exec_prefix.
33385test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
33386
33387DEFS=-DHAVE_CONFIG_H
33388
33389ac_libobjs=
33390ac_ltlibobjs=
33391U=
33392for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
33393  # 1. Remove the extension, and $U if already installed.
33394  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
33395  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
33396  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
33397  #    will be set to the directory where LIBOBJS objects are built.
33398  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
33399  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
33400done
33401LIBOBJS=$ac_libobjs
33402
33403LTLIBOBJS=$ac_ltlibobjs
33404
33405
33406
33407: "${CONFIG_STATUS=./config.status}"
33408ac_write_fail=0
33409ac_clean_files_save=$ac_clean_files
33410ac_clean_files="$ac_clean_files $CONFIG_STATUS"
33411{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
33412$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
33413as_write_fail=0
33414cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
33415#! $SHELL
33416# Generated by $as_me.
33417# Run this file to recreate the current configuration.
33418# Compiler output produced by configure, useful for debugging
33419# configure, is in config.log if it exists.
33420
33421debug=false
33422ac_cs_recheck=false
33423ac_cs_silent=false
33424
33425SHELL=\${CONFIG_SHELL-$SHELL}
33426export SHELL
33427_ASEOF
33428cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
33429## -------------------- ##
33430## M4sh Initialization. ##
33431## -------------------- ##
33432
33433# Be more Bourne compatible
33434DUALCASE=1; export DUALCASE # for MKS sh
33435if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
33436  emulate sh
33437  NULLCMD=:
33438  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
33439  # is contrary to our usage.  Disable this feature.
33440  alias -g '${1+"$@"}'='"$@"'
33441  setopt NO_GLOB_SUBST
33442else
33443  case `(set -o) 2>/dev/null` in #(
33444  *posix*) :
33445    set -o posix ;; #(
33446  *) :
33447     ;;
33448esac
33449fi
33450
33451
33452as_nl='
33453'
33454export as_nl
33455# Printing a long string crashes Solaris 7 /usr/bin/printf.
33456as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
33457as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
33458as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
33459# Prefer a ksh shell builtin over an external printf program on Solaris,
33460# but without wasting forks for bash or zsh.
33461if test -z "$BASH_VERSION$ZSH_VERSION" \
33462    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
33463  as_echo='print -r --'
33464  as_echo_n='print -rn --'
33465elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
33466  as_echo='printf %s\n'
33467  as_echo_n='printf %s'
33468else
33469  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
33470    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
33471    as_echo_n='/usr/ucb/echo -n'
33472  else
33473    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
33474    as_echo_n_body='eval
33475      arg=$1;
33476      case $arg in #(
33477      *"$as_nl"*)
33478	expr "X$arg" : "X\\(.*\\)$as_nl";
33479	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
33480      esac;
33481      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
33482    '
33483    export as_echo_n_body
33484    as_echo_n='sh -c $as_echo_n_body as_echo'
33485  fi
33486  export as_echo_body
33487  as_echo='sh -c $as_echo_body as_echo'
33488fi
33489
33490# The user is always right.
33491if test "${PATH_SEPARATOR+set}" != set; then
33492  PATH_SEPARATOR=:
33493  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
33494    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
33495      PATH_SEPARATOR=';'
33496  }
33497fi
33498
33499
33500# IFS
33501# We need space, tab and new line, in precisely that order.  Quoting is
33502# there to prevent editors from complaining about space-tab.
33503# (If _AS_PATH_WALK were called with IFS unset, it would disable word
33504# splitting by setting IFS to empty value.)
33505IFS=" ""	$as_nl"
33506
33507# Find who we are.  Look in the path if we contain no directory separator.
33508as_myself=
33509case $0 in #((
33510  *[\\/]* ) as_myself=$0 ;;
33511  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33512for as_dir in $PATH
33513do
33514  IFS=$as_save_IFS
33515  test -z "$as_dir" && as_dir=.
33516    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
33517  done
33518IFS=$as_save_IFS
33519
33520     ;;
33521esac
33522# We did not find ourselves, most probably we were run as `sh COMMAND'
33523# in which case we are not to be found in the path.
33524if test "x$as_myself" = x; then
33525  as_myself=$0
33526fi
33527if test ! -f "$as_myself"; then
33528  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
33529  exit 1
33530fi
33531
33532# Unset variables that we do not need and which cause bugs (e.g. in
33533# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
33534# suppresses any "Segmentation fault" message there.  '((' could
33535# trigger a bug in pdksh 5.2.14.
33536for as_var in BASH_ENV ENV MAIL MAILPATH
33537do eval test x\${$as_var+set} = xset \
33538  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
33539done
33540PS1='$ '
33541PS2='> '
33542PS4='+ '
33543
33544# NLS nuisances.
33545LC_ALL=C
33546export LC_ALL
33547LANGUAGE=C
33548export LANGUAGE
33549
33550# CDPATH.
33551(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
33552
33553
33554# as_fn_error STATUS ERROR [LINENO LOG_FD]
33555# ----------------------------------------
33556# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
33557# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
33558# script with STATUS, using 1 if that was 0.
33559as_fn_error ()
33560{
33561  as_status=$1; test $as_status -eq 0 && as_status=1
33562  if test "$4"; then
33563    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
33564    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
33565  fi
33566  $as_echo "$as_me: error: $2" >&2
33567  as_fn_exit $as_status
33568} # as_fn_error
33569
33570
33571# as_fn_set_status STATUS
33572# -----------------------
33573# Set $? to STATUS, without forking.
33574as_fn_set_status ()
33575{
33576  return $1
33577} # as_fn_set_status
33578
33579# as_fn_exit STATUS
33580# -----------------
33581# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
33582as_fn_exit ()
33583{
33584  set +e
33585  as_fn_set_status $1
33586  exit $1
33587} # as_fn_exit
33588
33589# as_fn_unset VAR
33590# ---------------
33591# Portably unset VAR.
33592as_fn_unset ()
33593{
33594  { eval $1=; unset $1;}
33595}
33596as_unset=as_fn_unset
33597# as_fn_append VAR VALUE
33598# ----------------------
33599# Append the text in VALUE to the end of the definition contained in VAR. Take
33600# advantage of any shell optimizations that allow amortized linear growth over
33601# repeated appends, instead of the typical quadratic growth present in naive
33602# implementations.
33603if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
33604  eval 'as_fn_append ()
33605  {
33606    eval $1+=\$2
33607  }'
33608else
33609  as_fn_append ()
33610  {
33611    eval $1=\$$1\$2
33612  }
33613fi # as_fn_append
33614
33615# as_fn_arith ARG...
33616# ------------------
33617# Perform arithmetic evaluation on the ARGs, and store the result in the
33618# global $as_val. Take advantage of shells that can avoid forks. The arguments
33619# must be portable across $(()) and expr.
33620if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
33621  eval 'as_fn_arith ()
33622  {
33623    as_val=$(( $* ))
33624  }'
33625else
33626  as_fn_arith ()
33627  {
33628    as_val=`expr "$@" || test $? -eq 1`
33629  }
33630fi # as_fn_arith
33631
33632
33633if expr a : '\(a\)' >/dev/null 2>&1 &&
33634   test "X`expr 00001 : '.*\(...\)'`" = X001; then
33635  as_expr=expr
33636else
33637  as_expr=false
33638fi
33639
33640if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
33641  as_basename=basename
33642else
33643  as_basename=false
33644fi
33645
33646if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
33647  as_dirname=dirname
33648else
33649  as_dirname=false
33650fi
33651
33652as_me=`$as_basename -- "$0" ||
33653$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
33654	 X"$0" : 'X\(//\)$' \| \
33655	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
33656$as_echo X/"$0" |
33657    sed '/^.*\/\([^/][^/]*\)\/*$/{
33658	    s//\1/
33659	    q
33660	  }
33661	  /^X\/\(\/\/\)$/{
33662	    s//\1/
33663	    q
33664	  }
33665	  /^X\/\(\/\).*/{
33666	    s//\1/
33667	    q
33668	  }
33669	  s/.*/./; q'`
33670
33671# Avoid depending upon Character Ranges.
33672as_cr_letters='abcdefghijklmnopqrstuvwxyz'
33673as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
33674as_cr_Letters=$as_cr_letters$as_cr_LETTERS
33675as_cr_digits='0123456789'
33676as_cr_alnum=$as_cr_Letters$as_cr_digits
33677
33678ECHO_C= ECHO_N= ECHO_T=
33679case `echo -n x` in #(((((
33680-n*)
33681  case `echo 'xy\c'` in
33682  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
33683  xy)  ECHO_C='\c';;
33684  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
33685       ECHO_T='	';;
33686  esac;;
33687*)
33688  ECHO_N='-n';;
33689esac
33690
33691rm -f conf$$ conf$$.exe conf$$.file
33692if test -d conf$$.dir; then
33693  rm -f conf$$.dir/conf$$.file
33694else
33695  rm -f conf$$.dir
33696  mkdir conf$$.dir 2>/dev/null
33697fi
33698if (echo >conf$$.file) 2>/dev/null; then
33699  if ln -s conf$$.file conf$$ 2>/dev/null; then
33700    as_ln_s='ln -s'
33701    # ... but there are two gotchas:
33702    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
33703    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
33704    # In both cases, we have to default to `cp -pR'.
33705    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
33706      as_ln_s='cp -pR'
33707  elif ln conf$$.file conf$$ 2>/dev/null; then
33708    as_ln_s=ln
33709  else
33710    as_ln_s='cp -pR'
33711  fi
33712else
33713  as_ln_s='cp -pR'
33714fi
33715rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
33716rmdir conf$$.dir 2>/dev/null
33717
33718
33719# as_fn_mkdir_p
33720# -------------
33721# Create "$as_dir" as a directory, including parents if necessary.
33722as_fn_mkdir_p ()
33723{
33724
33725  case $as_dir in #(
33726  -*) as_dir=./$as_dir;;
33727  esac
33728  test -d "$as_dir" || eval $as_mkdir_p || {
33729    as_dirs=
33730    while :; do
33731      case $as_dir in #(
33732      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
33733      *) as_qdir=$as_dir;;
33734      esac
33735      as_dirs="'$as_qdir' $as_dirs"
33736      as_dir=`$as_dirname -- "$as_dir" ||
33737$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
33738	 X"$as_dir" : 'X\(//\)[^/]' \| \
33739	 X"$as_dir" : 'X\(//\)$' \| \
33740	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
33741$as_echo X"$as_dir" |
33742    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
33743	    s//\1/
33744	    q
33745	  }
33746	  /^X\(\/\/\)[^/].*/{
33747	    s//\1/
33748	    q
33749	  }
33750	  /^X\(\/\/\)$/{
33751	    s//\1/
33752	    q
33753	  }
33754	  /^X\(\/\).*/{
33755	    s//\1/
33756	    q
33757	  }
33758	  s/.*/./; q'`
33759      test -d "$as_dir" && break
33760    done
33761    test -z "$as_dirs" || eval "mkdir $as_dirs"
33762  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
33763
33764
33765} # as_fn_mkdir_p
33766if mkdir -p . 2>/dev/null; then
33767  as_mkdir_p='mkdir -p "$as_dir"'
33768else
33769  test -d ./-p && rmdir ./-p
33770  as_mkdir_p=false
33771fi
33772
33773
33774# as_fn_executable_p FILE
33775# -----------------------
33776# Test if FILE is an executable regular file.
33777as_fn_executable_p ()
33778{
33779  test -f "$1" && test -x "$1"
33780} # as_fn_executable_p
33781as_test_x='test -x'
33782as_executable_p=as_fn_executable_p
33783
33784# Sed expression to map a string onto a valid CPP name.
33785as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
33786
33787# Sed expression to map a string onto a valid variable name.
33788as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
33789
33790
33791exec 6>&1
33792## ----------------------------------- ##
33793## Main body of $CONFIG_STATUS script. ##
33794## ----------------------------------- ##
33795_ASEOF
33796test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
33797
33798cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33799# Save the log message, to keep $0 and so on meaningful, and to
33800# report actual input values of CONFIG_FILES etc. instead of their
33801# values after options handling.
33802ac_log="
33803This file was extended by OpenJDK $as_me jdk8, which was
33804generated by GNU Autoconf 2.69.  Invocation command line was
33805
33806  CONFIG_FILES    = $CONFIG_FILES
33807  CONFIG_HEADERS  = $CONFIG_HEADERS
33808  CONFIG_LINKS    = $CONFIG_LINKS
33809  CONFIG_COMMANDS = $CONFIG_COMMANDS
33810  $ $0 $@
33811
33812on `(hostname || uname -n) 2>/dev/null | sed 1q`
33813"
33814
33815_ACEOF
33816
33817case $ac_config_files in *"
33818"*) set x $ac_config_files; shift; ac_config_files=$*;;
33819esac
33820
33821case $ac_config_headers in *"
33822"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
33823esac
33824
33825
33826cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33827# Files that config.status was made for.
33828config_files="$ac_config_files"
33829config_headers="$ac_config_headers"
33830
33831_ACEOF
33832
33833cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33834ac_cs_usage="\
33835\`$as_me' instantiates files and other configuration actions
33836from templates according to the current configuration.  Unless the files
33837and actions are specified as TAGs, all are instantiated by default.
33838
33839Usage: $0 [OPTION]... [TAG]...
33840
33841  -h, --help       print this help, then exit
33842  -V, --version    print version number and configuration settings, then exit
33843      --config     print configuration, then exit
33844  -q, --quiet, --silent
33845                   do not print progress messages
33846  -d, --debug      don't remove temporary files
33847      --recheck    update $as_me by reconfiguring in the same conditions
33848      --file=FILE[:TEMPLATE]
33849                   instantiate the configuration file FILE
33850      --header=FILE[:TEMPLATE]
33851                   instantiate the configuration header FILE
33852
33853Configuration files:
33854$config_files
33855
33856Configuration headers:
33857$config_headers
33858
33859Report bugs to <build-dev@openjdk.java.net>.
33860OpenJDK home page: <http://openjdk.java.net>."
33861
33862_ACEOF
33863cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33864ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
33865ac_cs_version="\\
33866OpenJDK config.status jdk8
33867configured by $0, generated by GNU Autoconf 2.69,
33868  with options \\"\$ac_cs_config\\"
33869
33870Copyright (C) 2012 Free Software Foundation, Inc.
33871This config.status script is free software; the Free Software Foundation
33872gives unlimited permission to copy, distribute and modify it."
33873
33874ac_pwd='$ac_pwd'
33875srcdir='$srcdir'
33876AWK='$AWK'
33877test -n "\$AWK" || AWK=awk
33878_ACEOF
33879
33880cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33881# The default lists apply if the user does not specify any file.
33882ac_need_defaults=:
33883while test $# != 0
33884do
33885  case $1 in
33886  --*=?*)
33887    ac_option=`expr "X$1" : 'X\([^=]*\)='`
33888    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
33889    ac_shift=:
33890    ;;
33891  --*=)
33892    ac_option=`expr "X$1" : 'X\([^=]*\)='`
33893    ac_optarg=
33894    ac_shift=:
33895    ;;
33896  *)
33897    ac_option=$1
33898    ac_optarg=$2
33899    ac_shift=shift
33900    ;;
33901  esac
33902
33903  case $ac_option in
33904  # Handling of the options.
33905  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
33906    ac_cs_recheck=: ;;
33907  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
33908    $as_echo "$ac_cs_version"; exit ;;
33909  --config | --confi | --conf | --con | --co | --c )
33910    $as_echo "$ac_cs_config"; exit ;;
33911  --debug | --debu | --deb | --de | --d | -d )
33912    debug=: ;;
33913  --file | --fil | --fi | --f )
33914    $ac_shift
33915    case $ac_optarg in
33916    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
33917    '') as_fn_error $? "missing file argument" ;;
33918    esac
33919    as_fn_append CONFIG_FILES " '$ac_optarg'"
33920    ac_need_defaults=false;;
33921  --header | --heade | --head | --hea )
33922    $ac_shift
33923    case $ac_optarg in
33924    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
33925    esac
33926    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
33927    ac_need_defaults=false;;
33928  --he | --h)
33929    # Conflict between --help and --header
33930    as_fn_error $? "ambiguous option: \`$1'
33931Try \`$0 --help' for more information.";;
33932  --help | --hel | -h )
33933    $as_echo "$ac_cs_usage"; exit ;;
33934  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
33935  | -silent | --silent | --silen | --sile | --sil | --si | --s)
33936    ac_cs_silent=: ;;
33937
33938  # This is an error.
33939  -*) as_fn_error $? "unrecognized option: \`$1'
33940Try \`$0 --help' for more information." ;;
33941
33942  *) as_fn_append ac_config_targets " $1"
33943     ac_need_defaults=false ;;
33944
33945  esac
33946  shift
33947done
33948
33949ac_configure_extra_args=
33950
33951if $ac_cs_silent; then
33952  exec 6>/dev/null
33953  ac_configure_extra_args="$ac_configure_extra_args --silent"
33954fi
33955
33956_ACEOF
33957cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33958if \$ac_cs_recheck; then
33959  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
33960  shift
33961  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
33962  CONFIG_SHELL='$SHELL'
33963  export CONFIG_SHELL
33964  exec "\$@"
33965fi
33966
33967_ACEOF
33968cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33969exec 5>>config.log
33970{
33971  echo
33972  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
33973## Running $as_me. ##
33974_ASBOX
33975  $as_echo "$ac_log"
33976} >&5
33977
33978_ACEOF
33979cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33980_ACEOF
33981
33982cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33983
33984# Handling of arguments.
33985for ac_config_target in $ac_config_targets
33986do
33987  case $ac_config_target in
33988    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
33989    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
33990    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
33991    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
33992    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
33993    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
33994    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
33995
33996  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
33997  esac
33998done
33999
34000
34001# If the user did not use the arguments to specify the items to instantiate,
34002# then the envvar interface is used.  Set only those that are not.
34003# We use the long form for the default assignment because of an extremely
34004# bizarre bug on SunOS 4.1.3.
34005if $ac_need_defaults; then
34006  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
34007  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
34008fi
34009
34010# Have a temporary directory for convenience.  Make it in the build tree
34011# simply because there is no reason against having it here, and in addition,
34012# creating and moving files from /tmp can sometimes cause problems.
34013# Hook for its removal unless debugging.
34014# Note that there is a small window in which the directory will not be cleaned:
34015# after its creation but before its name has been assigned to `$tmp'.
34016$debug ||
34017{
34018  tmp= ac_tmp=
34019  trap 'exit_status=$?
34020  : "${ac_tmp:=$tmp}"
34021  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
34022' 0
34023  trap 'as_fn_exit 1' 1 2 13 15
34024}
34025# Create a (secure) tmp directory for tmp files.
34026
34027{
34028  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
34029  test -d "$tmp"
34030}  ||
34031{
34032  tmp=./conf$$-$RANDOM
34033  (umask 077 && mkdir "$tmp")
34034} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
34035ac_tmp=$tmp
34036
34037# Set up the scripts for CONFIG_FILES section.
34038# No need to generate them if there are no CONFIG_FILES.
34039# This happens for instance with `./config.status config.h'.
34040if test -n "$CONFIG_FILES"; then
34041
34042
34043ac_cr=`echo X | tr X '\015'`
34044# On cygwin, bash can eat \r inside `` if the user requested igncr.
34045# But we know of no other shell where ac_cr would be empty at this
34046# point, so we can use a bashism as a fallback.
34047if test "x$ac_cr" = x; then
34048  eval ac_cr=\$\'\\r\'
34049fi
34050ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
34051if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
34052  ac_cs_awk_cr='\\r'
34053else
34054  ac_cs_awk_cr=$ac_cr
34055fi
34056
34057echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
34058_ACEOF
34059
34060
34061{
34062  echo "cat >conf$$subs.awk <<_ACEOF" &&
34063  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
34064  echo "_ACEOF"
34065} >conf$$subs.sh ||
34066  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34067ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
34068ac_delim='%!_!# '
34069for ac_last_try in false false false false false :; do
34070  . ./conf$$subs.sh ||
34071    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34072
34073  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
34074  if test $ac_delim_n = $ac_delim_num; then
34075    break
34076  elif $ac_last_try; then
34077    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34078  else
34079    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34080  fi
34081done
34082rm -f conf$$subs.sh
34083
34084cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34085cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
34086_ACEOF
34087sed -n '
34088h
34089s/^/S["/; s/!.*/"]=/
34090p
34091g
34092s/^[^!]*!//
34093:repl
34094t repl
34095s/'"$ac_delim"'$//
34096t delim
34097:nl
34098h
34099s/\(.\{148\}\)..*/\1/
34100t more1
34101s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
34102p
34103n
34104b repl
34105:more1
34106s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34107p
34108g
34109s/.\{148\}//
34110t nl
34111:delim
34112h
34113s/\(.\{148\}\)..*/\1/
34114t more2
34115s/["\\]/\\&/g; s/^/"/; s/$/"/
34116p
34117b
34118:more2
34119s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34120p
34121g
34122s/.\{148\}//
34123t delim
34124' <conf$$subs.awk | sed '
34125/^[^""]/{
34126  N
34127  s/\n//
34128}
34129' >>$CONFIG_STATUS || ac_write_fail=1
34130rm -f conf$$subs.awk
34131cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34132_ACAWK
34133cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
34134  for (key in S) S_is_set[key] = 1
34135  FS = ""
34136
34137}
34138{
34139  line = $ 0
34140  nfields = split(line, field, "@")
34141  substed = 0
34142  len = length(field[1])
34143  for (i = 2; i < nfields; i++) {
34144    key = field[i]
34145    keylen = length(key)
34146    if (S_is_set[key]) {
34147      value = S[key]
34148      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
34149      len += length(value) + length(field[++i])
34150      substed = 1
34151    } else
34152      len += 1 + keylen
34153  }
34154
34155  print line
34156}
34157
34158_ACAWK
34159_ACEOF
34160cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34161if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
34162  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
34163else
34164  cat
34165fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
34166  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
34167_ACEOF
34168
34169# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
34170# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
34171# trailing colons and then remove the whole line if VPATH becomes empty
34172# (actually we leave an empty line to preserve line numbers).
34173if test "x$srcdir" = x.; then
34174  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
34175h
34176s///
34177s/^/:/
34178s/[	 ]*$/:/
34179s/:\$(srcdir):/:/g
34180s/:\${srcdir}:/:/g
34181s/:@srcdir@:/:/g
34182s/^:*//
34183s/:*$//
34184x
34185s/\(=[	 ]*\).*/\1/
34186G
34187s/\n//
34188s/^[^=]*=[	 ]*$//
34189}'
34190fi
34191
34192cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34193fi # test -n "$CONFIG_FILES"
34194
34195# Set up the scripts for CONFIG_HEADERS section.
34196# No need to generate them if there are no CONFIG_HEADERS.
34197# This happens for instance with `./config.status Makefile'.
34198if test -n "$CONFIG_HEADERS"; then
34199cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
34200BEGIN {
34201_ACEOF
34202
34203# Transform confdefs.h into an awk script `defines.awk', embedded as
34204# here-document in config.status, that substitutes the proper values into
34205# config.h.in to produce config.h.
34206
34207# Create a delimiter string that does not exist in confdefs.h, to ease
34208# handling of long lines.
34209ac_delim='%!_!# '
34210for ac_last_try in false false :; do
34211  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
34212  if test -z "$ac_tt"; then
34213    break
34214  elif $ac_last_try; then
34215    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
34216  else
34217    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34218  fi
34219done
34220
34221# For the awk script, D is an array of macro values keyed by name,
34222# likewise P contains macro parameters if any.  Preserve backslash
34223# newline sequences.
34224
34225ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
34226sed -n '
34227s/.\{148\}/&'"$ac_delim"'/g
34228t rset
34229:rset
34230s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
34231t def
34232d
34233:def
34234s/\\$//
34235t bsnl
34236s/["\\]/\\&/g
34237s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34238D["\1"]=" \3"/p
34239s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
34240d
34241:bsnl
34242s/["\\]/\\&/g
34243s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34244D["\1"]=" \3\\\\\\n"\\/p
34245t cont
34246s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
34247t cont
34248d
34249:cont
34250n
34251s/.\{148\}/&'"$ac_delim"'/g
34252t clear
34253:clear
34254s/\\$//
34255t bsnlc
34256s/["\\]/\\&/g; s/^/"/; s/$/"/p
34257d
34258:bsnlc
34259s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
34260b cont
34261' <confdefs.h | sed '
34262s/'"$ac_delim"'/"\\\
34263"/g' >>$CONFIG_STATUS || ac_write_fail=1
34264
34265cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34266  for (key in D) D_is_set[key] = 1
34267  FS = ""
34268}
34269/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
34270  line = \$ 0
34271  split(line, arg, " ")
34272  if (arg[1] == "#") {
34273    defundef = arg[2]
34274    mac1 = arg[3]
34275  } else {
34276    defundef = substr(arg[1], 2)
34277    mac1 = arg[2]
34278  }
34279  split(mac1, mac2, "(") #)
34280  macro = mac2[1]
34281  prefix = substr(line, 1, index(line, defundef) - 1)
34282  if (D_is_set[macro]) {
34283    # Preserve the white space surrounding the "#".
34284    print prefix "define", macro P[macro] D[macro]
34285    next
34286  } else {
34287    # Replace #undef with comments.  This is necessary, for example,
34288    # in the case of _POSIX_SOURCE, which is predefined and required
34289    # on some systems where configure will not decide to define it.
34290    if (defundef == "undef") {
34291      print "/*", prefix defundef, macro, "*/"
34292      next
34293    }
34294  }
34295}
34296{ print }
34297_ACAWK
34298_ACEOF
34299cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34300  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
34301fi # test -n "$CONFIG_HEADERS"
34302
34303
34304eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
34305shift
34306for ac_tag
34307do
34308  case $ac_tag in
34309  :[FHLC]) ac_mode=$ac_tag; continue;;
34310  esac
34311  case $ac_mode$ac_tag in
34312  :[FHL]*:*);;
34313  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
34314  :[FH]-) ac_tag=-:-;;
34315  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
34316  esac
34317  ac_save_IFS=$IFS
34318  IFS=:
34319  set x $ac_tag
34320  IFS=$ac_save_IFS
34321  shift
34322  ac_file=$1
34323  shift
34324
34325  case $ac_mode in
34326  :L) ac_source=$1;;
34327  :[FH])
34328    ac_file_inputs=
34329    for ac_f
34330    do
34331      case $ac_f in
34332      -) ac_f="$ac_tmp/stdin";;
34333      *) # Look for the file first in the build tree, then in the source tree
34334	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
34335	 # because $ac_f cannot contain `:'.
34336	 test -f "$ac_f" ||
34337	   case $ac_f in
34338	   [\\/$]*) false;;
34339	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
34340	   esac ||
34341	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
34342      esac
34343      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
34344      as_fn_append ac_file_inputs " '$ac_f'"
34345    done
34346
34347    # Let's still pretend it is `configure' which instantiates (i.e., don't
34348    # use $as_me), people would be surprised to read:
34349    #    /* config.h.  Generated by config.status.  */
34350    configure_input='Generated from '`
34351	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
34352	`' by configure.'
34353    if test x"$ac_file" != x-; then
34354      configure_input="$ac_file.  $configure_input"
34355      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
34356$as_echo "$as_me: creating $ac_file" >&6;}
34357    fi
34358    # Neutralize special characters interpreted by sed in replacement strings.
34359    case $configure_input in #(
34360    *\&* | *\|* | *\\* )
34361       ac_sed_conf_input=`$as_echo "$configure_input" |
34362       sed 's/[\\\\&|]/\\\\&/g'`;; #(
34363    *) ac_sed_conf_input=$configure_input;;
34364    esac
34365
34366    case $ac_tag in
34367    *:-:* | *:-) cat >"$ac_tmp/stdin" \
34368      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
34369    esac
34370    ;;
34371  esac
34372
34373  ac_dir=`$as_dirname -- "$ac_file" ||
34374$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34375	 X"$ac_file" : 'X\(//\)[^/]' \| \
34376	 X"$ac_file" : 'X\(//\)$' \| \
34377	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
34378$as_echo X"$ac_file" |
34379    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34380	    s//\1/
34381	    q
34382	  }
34383	  /^X\(\/\/\)[^/].*/{
34384	    s//\1/
34385	    q
34386	  }
34387	  /^X\(\/\/\)$/{
34388	    s//\1/
34389	    q
34390	  }
34391	  /^X\(\/\).*/{
34392	    s//\1/
34393	    q
34394	  }
34395	  s/.*/./; q'`
34396  as_dir="$ac_dir"; as_fn_mkdir_p
34397  ac_builddir=.
34398
34399case "$ac_dir" in
34400.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
34401*)
34402  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
34403  # A ".." for each directory in $ac_dir_suffix.
34404  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
34405  case $ac_top_builddir_sub in
34406  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
34407  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
34408  esac ;;
34409esac
34410ac_abs_top_builddir=$ac_pwd
34411ac_abs_builddir=$ac_pwd$ac_dir_suffix
34412# for backward compatibility:
34413ac_top_builddir=$ac_top_build_prefix
34414
34415case $srcdir in
34416  .)  # We are building in place.
34417    ac_srcdir=.
34418    ac_top_srcdir=$ac_top_builddir_sub
34419    ac_abs_top_srcdir=$ac_pwd ;;
34420  [\\/]* | ?:[\\/]* )  # Absolute name.
34421    ac_srcdir=$srcdir$ac_dir_suffix;
34422    ac_top_srcdir=$srcdir
34423    ac_abs_top_srcdir=$srcdir ;;
34424  *) # Relative name.
34425    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
34426    ac_top_srcdir=$ac_top_build_prefix$srcdir
34427    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
34428esac
34429ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
34430
34431
34432  case $ac_mode in
34433  :F)
34434  #
34435  # CONFIG_FILE
34436  #
34437
34438_ACEOF
34439
34440cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34441# If the template does not know about datarootdir, expand it.
34442# FIXME: This hack should be removed a few years after 2.60.
34443ac_datarootdir_hack=; ac_datarootdir_seen=
34444ac_sed_dataroot='
34445/datarootdir/ {
34446  p
34447  q
34448}
34449/@datadir@/p
34450/@docdir@/p
34451/@infodir@/p
34452/@localedir@/p
34453/@mandir@/p'
34454case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
34455*datarootdir*) ac_datarootdir_seen=yes;;
34456*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
34457  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
34458$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
34459_ACEOF
34460cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34461  ac_datarootdir_hack='
34462  s&@datadir@&$datadir&g
34463  s&@docdir@&$docdir&g
34464  s&@infodir@&$infodir&g
34465  s&@localedir@&$localedir&g
34466  s&@mandir@&$mandir&g
34467  s&\\\${datarootdir}&$datarootdir&g' ;;
34468esac
34469_ACEOF
34470
34471# Neutralize VPATH when `$srcdir' = `.'.
34472# Shell code in configure.ac might set extrasub.
34473# FIXME: do we really want to maintain this feature?
34474cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34475ac_sed_extra="$ac_vpsub
34476$extrasub
34477_ACEOF
34478cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34479:t
34480/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
34481s|@configure_input@|$ac_sed_conf_input|;t t
34482s&@top_builddir@&$ac_top_builddir_sub&;t t
34483s&@top_build_prefix@&$ac_top_build_prefix&;t t
34484s&@srcdir@&$ac_srcdir&;t t
34485s&@abs_srcdir@&$ac_abs_srcdir&;t t
34486s&@top_srcdir@&$ac_top_srcdir&;t t
34487s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
34488s&@builddir@&$ac_builddir&;t t
34489s&@abs_builddir@&$ac_abs_builddir&;t t
34490s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
34491$ac_datarootdir_hack
34492"
34493eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
34494  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34495
34496test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
34497  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
34498  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
34499      "$ac_tmp/out"`; test -z "$ac_out"; } &&
34500  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34501which seems to be undefined.  Please make sure it is defined" >&5
34502$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34503which seems to be undefined.  Please make sure it is defined" >&2;}
34504
34505  rm -f "$ac_tmp/stdin"
34506  case $ac_file in
34507  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
34508  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
34509  esac \
34510  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34511 ;;
34512  :H)
34513  #
34514  # CONFIG_HEADER
34515  #
34516  if test x"$ac_file" != x-; then
34517    {
34518      $as_echo "/* $configure_input  */" \
34519      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
34520    } >"$ac_tmp/config.h" \
34521      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34522    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
34523      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
34524$as_echo "$as_me: $ac_file is unchanged" >&6;}
34525    else
34526      rm -f "$ac_file"
34527      mv "$ac_tmp/config.h" "$ac_file" \
34528	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
34529    fi
34530  else
34531    $as_echo "/* $configure_input  */" \
34532      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
34533      || as_fn_error $? "could not create -" "$LINENO" 5
34534  fi
34535 ;;
34536
34537
34538  esac
34539
34540done # for ac_tag
34541
34542
34543as_fn_exit 0
34544_ACEOF
34545ac_clean_files=$ac_clean_files_save
34546
34547test $ac_write_fail = 0 ||
34548  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
34549
34550
34551# configure is writing to config.log, and then calls config.status.
34552# config.status does its own redirection, appending to config.log.
34553# Unfortunately, on DOS this fails, as config.log is still kept open
34554# by configure, so config.status won't be able to write to it; its
34555# output is simply discarded.  So we exec the FD to /dev/null,
34556# effectively closing config.log, so it can be properly (re)opened and
34557# appended to by config.status.  When coming back to configure, we
34558# need to make the FD available again.
34559if test "$no_create" != yes; then
34560  ac_cs_success=:
34561  ac_config_status_args=
34562  test "$silent" = yes &&
34563    ac_config_status_args="$ac_config_status_args --quiet"
34564  exec 5>/dev/null
34565  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
34566  exec 5>>config.log
34567  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
34568  # would make configure fail if this is the last instruction.
34569  $ac_cs_success || as_fn_exit 1
34570fi
34571if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
34572  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
34573$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
34574fi
34575
34576
34577# Try to move the config.log file to the output directory.
34578if test -e ./config.log; then
34579  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
34580fi
34581
34582# Make the compare script executable
34583$CHMOD +x $OUTPUT_ROOT/compare.sh
34584
34585# Finally output some useful information to the user
34586
34587# Finally output some useful information to the user
34588
34589if test "x$CCACHE_FOUND" != x; then
34590	if  test "x$HAS_GOOD_CCACHE" = x; then
34591		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
34592		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
34593	else
34594		CCACHE_STATUS="installed and in use"
34595	fi
34596else
34597	if test "x$GCC" = xyes; then
34598		CCACHE_STATUS="not installed (consider installing)"
34599		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
34600	else
34601		CCACHE_STATUS="not available for your system"
34602	fi
34603fi
34604
34605printf "\n"
34606printf "====================================================\n"
34607printf "A new configuration has been successfully created in\n"
34608printf "$OUTPUT_ROOT\n"
34609if test "x$CONFIGURE_COMMAND_LINE" != x; then
34610	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
34611else
34612	printf "using default settings.\n"
34613fi
34614
34615printf "\n"
34616printf "Configuration summary:\n"
34617printf "* Debug level:    $DEBUG_LEVEL\n"
34618printf "* JDK variant:    $JDK_VARIANT\n"
34619printf "* JVM variants:   $with_jvm_variants\n"
34620printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
34621
34622printf "\n"
34623printf "Tools summary:\n"
34624if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
34625  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
34626fi
34627printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
34628printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
34629printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
34630
34631printf "\n"
34632printf "Build performance summary:\n"
34633printf "* Cores to use:   $JOBS\n"
34634printf "* Memory limit:   $MEMORY_SIZE MB\n"
34635printf "* ccache status:  $CCACHE_STATUS\n"
34636printf "\n"
34637
34638if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
34639	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
34640	printf "$CCACHE_HELP_MSG\n"
34641
34642    # Print a helpful message on how to acquire the necessary build dependency.
34643    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
34644    MISSING_DEPENDENCY=ccache
34645    PKGHANDLER_COMMAND=
34646
34647    case $PKGHANDLER in
34648	apt-get)
34649                apt_help     $MISSING_DEPENDENCY ;;
34650    yum)
34651                yum_help     $MISSING_DEPENDENCY ;;
34652	port)
34653                port_help    $MISSING_DEPENDENCY ;;
34654	pkgutil)
34655                pkgutil_help $MISSING_DEPENDENCY ;;
34656	pkgadd)
34657                pkgadd_help  $MISSING_DEPENDENCY ;;
34658    * )
34659      break ;;
34660    esac
34661
34662    if test "x$PKGHANDLER_COMMAND" != x; then
34663        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34664    fi
34665
34666	printf "$HELP_MSG\n"
34667	printf "\n"
34668fi
34669
34670if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
34671	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
34672	printf "will result in longer build times.\n"
34673	printf "\n"
34674fi
34675
34676if test "x$FOUND_ALT_VARIABLES" != "x"; then
34677	printf "WARNING: You have old-style ALT_ environment variables set.\n"
34678	printf "These are not respected, and will be ignored. It is recommended\n"
34679	printf "that you clean your environment. The following variables are set:\n"
34680	printf "$FOUND_ALT_VARIABLES\n"
34681	printf "\n"
34682fi
34683
34684if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
34685	printf "WARNING: Your build output directory is not on a local disk.\n"
34686	printf "This will severely degrade build performance!\n"
34687	printf "It is recommended that you create an output directory on a local disk,\n"
34688	printf "and run the configure script again from that directory.\n"
34689	printf "\n"
34690fi
34691
34692if test "x$IS_RECONFIGURE" = "xyes"; then
34693	printf "WARNING: The result of this configuration has overridden an older\n"
34694	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
34695	printf "proper build. Failure to do so might result in strange build problems.\n"
34696	printf "\n"
34697fi
34698
34699