generated-configure.sh revision 945:584dc2e95e04
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.69 for OpenJDK jdk8.
4#
5# Report bugs to <build-dev@openjdk.java.net>.
6#
7#
8# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
9#
10#
11# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
13## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
16
17# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
19if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
20  emulate sh
21  NULLCMD=:
22  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
23  # is contrary to our usage.  Disable this feature.
24  alias -g '${1+"$@"}'='"$@"'
25  setopt NO_GLOB_SUBST
26else
27  case `(set -o) 2>/dev/null` in #(
28  *posix*) :
29    set -o posix ;; #(
30  *) :
31     ;;
32esac
33fi
34
35
36as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47  as_echo='print -r --'
48  as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50  as_echo='printf %s\n'
51  as_echo_n='printf %s'
52else
53  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55    as_echo_n='/usr/ucb/echo -n'
56  else
57    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58    as_echo_n_body='eval
59      arg=$1;
60      case $arg in #(
61      *"$as_nl"*)
62	expr "X$arg" : "X\\(.*\\)$as_nl";
63	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64      esac;
65      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66    '
67    export as_echo_n_body
68    as_echo_n='sh -c $as_echo_n_body as_echo'
69  fi
70  export as_echo_body
71  as_echo='sh -c $as_echo_body as_echo'
72fi
73
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
76  PATH_SEPARATOR=:
77  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79      PATH_SEPARATOR=';'
80  }
81fi
82
83
84# IFS
85# We need space, tab and new line, in precisely that order.  Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
89IFS=" ""	$as_nl"
90
91# Find who we are.  Look in the path if we contain no directory separator.
92as_myself=
93case $0 in #((
94  *[\\/]* ) as_myself=$0 ;;
95  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
96for as_dir in $PATH
97do
98  IFS=$as_save_IFS
99  test -z "$as_dir" && as_dir=.
100    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101  done
102IFS=$as_save_IFS
103
104     ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109  as_myself=$0
110fi
111if test ! -f "$as_myself"; then
112  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113  exit 1
114fi
115
116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there.  '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
133
134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
137# Use a proper internal environment variable to ensure we don't fall
138  # into an infinite loop, continuously re-executing ourselves.
139  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140    _as_can_reexec=no; export _as_can_reexec;
141    # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149  *v*x* | *x*v* ) as_opts=-vx ;;
150  *v* ) as_opts=-v ;;
151  *x* ) as_opts=-x ;;
152  * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159  fi
160  # We don't want this to propagate to other subprocesses.
161          { _as_can_reexec=; unset _as_can_reexec;}
162if test "x$CONFIG_SHELL" = x; then
163  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164  emulate sh
165  NULLCMD=:
166  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167  # is contrary to our usage.  Disable this feature.
168  alias -g '\${1+\"\$@\"}'='\"\$@\"'
169  setopt NO_GLOB_SUBST
170else
171  case \`(set -o) 2>/dev/null\` in #(
172  *posix*) :
173    set -o posix ;; #(
174  *) :
175     ;;
176esac
177fi
178"
179  as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193  exitcode=1; echo positional parameters were not saved.
194fi
195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
197  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202  if (eval "$as_required") 2>/dev/null; then :
203  as_have_required=yes
204else
205  as_have_required=no
206fi
207  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214  IFS=$as_save_IFS
215  test -z "$as_dir" && as_dir=.
216  as_found=:
217  case $as_dir in #(
218	 /*)
219	   for as_base in sh bash ksh sh5; do
220	     # Try only shells that exist, to save several forks.
221	     as_shell=$as_dir/$as_base
222	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224  CONFIG_SHELL=$as_shell as_have_required=yes
225		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226  break 2
227fi
228fi
229	   done;;
230       esac
231  as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235  CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240      if test "x$CONFIG_SHELL" != x; then :
241  export CONFIG_SHELL
242             # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250  *v*x* | *x*v* ) as_opts=-vx ;;
251  *v* ) as_opts=-v ;;
252  *x* ) as_opts=-x ;;
253  * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
260fi
261
262    if test x$as_have_required = xno; then :
263  $as_echo "$0: This script requires a shell more modern than all"
264  $as_echo "$0: the shells that I found on your system."
265  if test x${ZSH_VERSION+set} = xset ; then
266    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268  else
269    $as_echo "$0: Please tell bug-autoconf@gnu.org and
270$0: build-dev@openjdk.java.net about your system, including
271$0: any error possibly output before this message. Then
272$0: install a modern shell, or manually run the script
273$0: under such a shell if you do have one."
274  fi
275  exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293  { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302  return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310  set +e
311  as_fn_set_status $1
312  exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321  case $as_dir in #(
322  -*) as_dir=./$as_dir;;
323  esac
324  test -d "$as_dir" || eval $as_mkdir_p || {
325    as_dirs=
326    while :; do
327      case $as_dir in #(
328      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329      *) as_qdir=$as_dir;;
330      esac
331      as_dirs="'$as_qdir' $as_dirs"
332      as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334	 X"$as_dir" : 'X\(//\)[^/]' \| \
335	 X"$as_dir" : 'X\(//\)$' \| \
336	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339	    s//\1/
340	    q
341	  }
342	  /^X\(\/\/\)[^/].*/{
343	    s//\1/
344	    q
345	  }
346	  /^X\(\/\/\)$/{
347	    s//\1/
348	    q
349	  }
350	  /^X\(\/\).*/{
351	    s//\1/
352	    q
353	  }
354	  s/.*/./; q'`
355      test -d "$as_dir" && break
356    done
357    test -z "$as_dirs" || eval "mkdir $as_dirs"
358  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
359
360
361} # as_fn_mkdir_p
362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368  test -f "$1" && test -x "$1"
369} # as_fn_executable_p
370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377  eval 'as_fn_append ()
378  {
379    eval $1+=\$2
380  }'
381else
382  as_fn_append ()
383  {
384    eval $1=\$$1\$2
385  }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394  eval 'as_fn_arith ()
395  {
396    as_val=$(( $* ))
397  }'
398else
399  as_fn_arith ()
400  {
401    as_val=`expr "$@" || test $? -eq 1`
402  }
403fi # as_fn_arith
404
405
406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
410# script with STATUS, using 1 if that was 0.
411as_fn_error ()
412{
413  as_status=$1; test $as_status -eq 0 && as_status=1
414  if test "$4"; then
415    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
417  fi
418  $as_echo "$as_me: error: $2" >&2
419  as_fn_exit $as_status
420} # as_fn_error
421
422if expr a : '\(a\)' >/dev/null 2>&1 &&
423   test "X`expr 00001 : '.*\(...\)'`" = X001; then
424  as_expr=expr
425else
426  as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430  as_basename=basename
431else
432  as_basename=false
433fi
434
435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436  as_dirname=dirname
437else
438  as_dirname=false
439fi
440
441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443	 X"$0" : 'X\(//\)$' \| \
444	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
445$as_echo X/"$0" |
446    sed '/^.*\/\([^/][^/]*\)\/*$/{
447	    s//\1/
448	    q
449	  }
450	  /^X\/\(\/\/\)$/{
451	    s//\1/
452	    q
453	  }
454	  /^X\/\(\/\).*/{
455	    s//\1/
456	    q
457	  }
458	  s/.*/./; q'`
459
460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
466
467
468  as_lineno_1=$LINENO as_lineno_1a=$LINENO
469  as_lineno_2=$LINENO as_lineno_2a=$LINENO
470  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
473  sed -n '
474    p
475    /[$]LINENO/=
476  ' <$as_myself |
477    sed '
478      s/[$]LINENO.*/&-/
479      t lineno
480      b
481      :lineno
482      N
483      :loop
484      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
485      t loop
486      s/-\n.*//
487    ' >$as_me.lineno &&
488  chmod +x "$as_me.lineno" ||
489    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
490
491  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492  # already done that, so ensure we don't try to do so again and fall
493  # in an infinite loop.  This has already happened in practice.
494  _as_can_reexec=no; export _as_can_reexec
495  # Don't try to exec as it changes $[0], causing all sort of problems
496  # (the dirname of $[0] is not the place where we might find the
497  # original and so on.  Autoconf is especially sensitive to this).
498  . "./$as_me.lineno"
499  # Exit status is that of the last command.
500  exit
501}
502
503ECHO_C= ECHO_N= ECHO_T=
504case `echo -n x` in #(((((
505-n*)
506  case `echo 'xy\c'` in
507  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
508  xy)  ECHO_C='\c';;
509  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
510       ECHO_T='	';;
511  esac;;
512*)
513  ECHO_N='-n';;
514esac
515
516rm -f conf$$ conf$$.exe conf$$.file
517if test -d conf$$.dir; then
518  rm -f conf$$.dir/conf$$.file
519else
520  rm -f conf$$.dir
521  mkdir conf$$.dir 2>/dev/null
522fi
523if (echo >conf$$.file) 2>/dev/null; then
524  if ln -s conf$$.file conf$$ 2>/dev/null; then
525    as_ln_s='ln -s'
526    # ... but there are two gotchas:
527    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
529    # In both cases, we have to default to `cp -pR'.
530    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
531      as_ln_s='cp -pR'
532  elif ln conf$$.file conf$$ 2>/dev/null; then
533    as_ln_s=ln
534  else
535    as_ln_s='cp -pR'
536  fi
537else
538  as_ln_s='cp -pR'
539fi
540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
542
543if mkdir -p . 2>/dev/null; then
544  as_mkdir_p='mkdir -p "$as_dir"'
545else
546  test -d ./-p && rmdir ./-p
547  as_mkdir_p=false
548fi
549
550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
552
553# Sed expression to map a string onto a valid CPP name.
554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
555
556# Sed expression to map a string onto a valid variable name.
557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
558
559
560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
562
563# Name of the host.
564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
568#
569# Initializations.
570#
571ac_default_prefix=/usr/local
572ac_clean_files=
573ac_config_libobj_dir=.
574LIBOBJS=
575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
579
580# Identity of this package.
581PACKAGE_NAME='OpenJDK'
582PACKAGE_TARNAME='openjdk'
583PACKAGE_VERSION='jdk8'
584PACKAGE_STRING='OpenJDK jdk8'
585PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
586PACKAGE_URL='http://openjdk.java.net'
587
588# Factoring default headers for most tests.
589ac_includes_default="\
590#include <stdio.h>
591#ifdef HAVE_SYS_TYPES_H
592# include <sys/types.h>
593#endif
594#ifdef HAVE_SYS_STAT_H
595# include <sys/stat.h>
596#endif
597#ifdef STDC_HEADERS
598# include <stdlib.h>
599# include <stddef.h>
600#else
601# ifdef HAVE_STDLIB_H
602#  include <stdlib.h>
603# endif
604#endif
605#ifdef HAVE_STRING_H
606# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
607#  include <memory.h>
608# endif
609# include <string.h>
610#endif
611#ifdef HAVE_STRINGS_H
612# include <strings.h>
613#endif
614#ifdef HAVE_INTTYPES_H
615# include <inttypes.h>
616#endif
617#ifdef HAVE_STDINT_H
618# include <stdint.h>
619#endif
620#ifdef HAVE_UNISTD_H
621# include <unistd.h>
622#endif"
623
624ac_subst_vars='LTLIBOBJS
625LIBOBJS
626CCACHE
627USE_PRECOMPILED_HEADER
628SJAVAC_SERVER_DIR
629ENABLE_SJAVAC
630SJAVAC_SERVER_JAVA
631JOBS
632MEMORY_SIZE
633NUM_CORES
634ENABLE_INTREE_EC
635SALIB_NAME
636HOTSPOT_MAKE_ARGS
637FIXPATH
638LIBCXX
639LLVM_LIBS
640LLVM_LDFLAGS
641LLVM_CFLAGS
642LLVM_CONFIG
643LIBFFI_LIBS
644LIBFFI_CFLAGS
645STATIC_CXX_SETTING
646LIBDL
647LIBM
648LIBZIP_CAN_USE_MMAP
649USE_EXTERNAL_LIBZ
650USE_EXTERNAL_LIBGIF
651USE_EXTERNAL_LIBJPEG
652ALSA_LIBS
653ALSA_CFLAGS
654FREETYPE2_LIB_PATH
655USING_SYSTEM_FT_LIB
656FREETYPE2_LIBS
657FREETYPE2_CFLAGS
658CUPS_CFLAGS
659OPENWIN_HOME
660X_EXTRA_LIBS
661X_LIBS
662X_PRE_LIBS
663X_CFLAGS
664XMKMF
665CXXFLAGS_DEBUG_SYMBOLS
666CFLAGS_DEBUG_SYMBOLS
667ZIP_DEBUGINFO_FILES
668ENABLE_DEBUG_SYMBOLS
669USING_BROKEN_SUSE_LD
670COMPILER_SUPPORTS_TARGET_BITS_FLAG
671ZERO_ARCHFLAG
672LDFLAGS_CXX_JDK
673LDFLAGS_JDKEXE_SUFFIX
674LDFLAGS_JDKLIB_SUFFIX
675LDFLAGS_JDKEXE
676LDFLAGS_JDKLIB
677CXXFLAGS_JDKEXE
678CXXFLAGS_JDKLIB
679CFLAGS_JDKEXE
680CFLAGS_JDKLIB
681MACOSX_VERSION_MIN
682PACKAGE_PATH
683LEGACY_EXTRA_LDFLAGS
684LEGACY_EXTRA_CXXFLAGS
685LEGACY_EXTRA_CFLAGS
686CXX_FLAG_DEPS
687C_FLAG_DEPS
688CXX_O_FLAG_NONE
689CXX_O_FLAG_NORM
690CXX_O_FLAG_HI
691CXX_O_FLAG_HIGHEST
692C_O_FLAG_NONE
693C_O_FLAG_NORM
694C_O_FLAG_HI
695C_O_FLAG_HIGHEST
696POST_MCS_CMD
697POST_STRIP_CMD
698SET_EXECUTABLE_ORIGIN
699SET_SHARED_LIBRARY_ORIGIN
700CXX_FLAG_REORDER
701C_FLAG_REORDER
702SET_SHARED_LIBRARY_MAPFILE
703SET_SHARED_LIBRARY_NAME
704SHARED_LIBRARY_FLAGS
705EXE_SUFFIX
706STATIC_LIBRARY_SUFFIX
707SHARED_LIBRARY_SUFFIX
708LIBRARY_PREFIX
709STATIC_LIBRARY
710SHARED_LIBRARY
711OBJ_SUFFIX
712COMPILER_NAME
713JT_HOME
714JTREGEXE
715LIPO
716ac_ct_OBJDUMP
717OBJDUMP
718ac_ct_OBJCOPY
719OBJCOPY
720MCS
721STRIP
722GNM
723NM
724AS
725CXXCPP
726CPP
727COMPILER_TYPE
728RC_FLAGS
729DUMPBIN
730WINAR
731HOTSPOT_RC
732HOTSPOT_MT
733RC
734MT
735WINLD
736HOTSPOT_LD
737HOTSPOT_CXX
738ARFLAGS
739AR
740LDEXECXX
741LDCXX
742LDEXE
743LD
744ac_ct_OBJC
745OBJCFLAGS
746OBJC
747ac_ct_CXX
748CXXFLAGS
749CXX
750ac_ct_PROPER_COMPILER_CXX
751PROPER_COMPILER_CXX
752POTENTIAL_CXX
753TOOLS_DIR_CXX
754COMPILER_TARGET_BITS_FLAG
755OBJEXT
756EXEEXT
757ac_ct_CC
758CPPFLAGS
759LDFLAGS
760CFLAGS
761CC
762ac_ct_PROPER_COMPILER_CC
763PROPER_COMPILER_CC
764POTENTIAL_CC
765TOOLS_DIR_CC
766BUILD_LD
767BUILD_CXX
768BUILD_CC
769MSVCR_DLL
770DXSDK_INCLUDE_PATH
771DXSDK_LIB_PATH
772VS_PATH
773VS_LIB
774VS_INCLUDE
775CYGWIN_LINK
776AR_OUT_OPTION
777LD_OUT_OPTION
778EXE_OUT_OPTION
779CC_OUT_OPTION
780BUILD_HOTSPOT
781HOTSPOT_DIST
782BUILD_OUTPUT
783OVERRIDE_SRC_ROOT
784ADD_SRC_ROOT
785JDK_TOPDIR
786NASHORN_TOPDIR
787HOTSPOT_TOPDIR
788JAXWS_TOPDIR
789JAXP_TOPDIR
790CORBA_TOPDIR
791LANGTOOLS_TOPDIR
792BOOT_JDK_JVMARGS
793JAVAC_FLAGS
794BOOT_JDK_SOURCETARGET
795BOOT_JDK
796BOOT_TOOLSJAR
797BOOT_RTJAR
798JAVA_CHECK
799JAVAC_CHECK
800COOKED_BUILD_NUMBER
801JDK_VERSION
802COPYRIGHT_YEAR
803MACOSX_BUNDLE_ID_BASE
804MACOSX_BUNDLE_NAME_BASE
805COMPANY_NAME
806JDK_RC_PLATFORM_NAME
807PRODUCT_SUFFIX
808PRODUCT_NAME
809LAUNCHER_NAME
810MILESTONE
811JDK_BUILD_NUMBER
812JDK_UPDATE_VERSION
813JDK_MICRO_VERSION
814JDK_MINOR_VERSION
815JDK_MAJOR_VERSION
816USER_RELEASE_SUFFIX
817COMPRESS_JARS
818UNLIMITED_CRYPTO
819CACERTS_FILE
820TEST_IN_BUILD
821BUILD_HEADLESS
822SUPPORT_HEADFUL
823SUPPORT_HEADLESS
824BDEPS_FTP
825BDEPS_UNZIP
826OS_VERSION_MICRO
827OS_VERSION_MINOR
828OS_VERSION_MAJOR
829PKG_CONFIG
830CODESIGN
831XATTR
832IS_GNU_TIME
833TIME
834STAT
835HG
836READELF
837OTOOL
838LDD
839ZIP
840UNZIP
841FIND_DELETE
842MAKE
843CHECK_TOOLSDIR_MAKE
844CHECK_TOOLSDIR_GMAKE
845CHECK_MAKE
846CHECK_GMAKE
847PKGHANDLER
848OUTPUT_ROOT
849CONF_NAME
850SPEC
851BUILD_VARIANT_RELEASE
852DEBUG_CLASSFILES
853FASTDEBUG
854VARIANT
855DEBUG_LEVEL
856MACOSX_UNIVERSAL
857INCLUDE_SA
858JVM_VARIANT_CORE
859JVM_VARIANT_ZEROSHARK
860JVM_VARIANT_ZERO
861JVM_VARIANT_KERNEL
862JVM_VARIANT_MINIMAL1
863JVM_VARIANT_CLIENT
864JVM_VARIANT_SERVER
865JVM_VARIANTS
866JVM_INTERPRETER
867JDK_VARIANT
868SET_OPENJDK
869BUILD_LOG_WRAPPER
870BUILD_LOG_PREVIOUS
871BUILD_LOG
872SYS_ROOT
873PATH_SEP
874SRC_ROOT
875ZERO_ARCHDEF
876DEFINE_CROSS_COMPILE_ARCH
877LP64
878OPENJDK_TARGET_OS_API_DIR
879OPENJDK_TARGET_CPU_JLI_CFLAGS
880OPENJDK_TARGET_CPU_OSARCH
881OPENJDK_TARGET_CPU_ISADIR
882OPENJDK_TARGET_CPU_LIBDIR
883OPENJDK_TARGET_CPU_LEGACY_LIB
884OPENJDK_TARGET_CPU_LEGACY
885REQUIRED_OS_VERSION
886REQUIRED_OS_NAME
887COMPILE_TYPE
888OPENJDK_TARGET_CPU_ENDIAN
889OPENJDK_TARGET_CPU_BITS
890OPENJDK_TARGET_CPU_ARCH
891OPENJDK_TARGET_CPU
892OPENJDK_TARGET_OS_API
893OPENJDK_TARGET_OS
894OPENJDK_BUILD_CPU_ENDIAN
895OPENJDK_BUILD_CPU_BITS
896OPENJDK_BUILD_CPU_ARCH
897OPENJDK_BUILD_CPU
898OPENJDK_BUILD_OS_API
899OPENJDK_BUILD_OS
900OPENJDK_BUILD_AUTOCONF_NAME
901OPENJDK_TARGET_AUTOCONF_NAME
902target_os
903target_vendor
904target_cpu
905target
906host_os
907host_vendor
908host_cpu
909host
910build_os
911build_vendor
912build_cpu
913build
914SETFILE
915DF
916READLINK
917CYGPATH
918NAWK
919SED
920FGREP
921EGREP
922GREP
923AWK
924XARGS
925WHICH
926WC
927UNIQ
928UNAME
929TR
930TOUCH
931TEE
932TAR
933TAIL
934SORT
935SH
936RM
937PRINTF
938MV
939MKTEMP
940MKDIR
941LS
942LN
943HEAD
944FIND
945FILE
946EXPR
947ECHO
948DIRNAME
949DIFF
950DATE
951CUT
952CPIO
953CP
954COMM
955CMP
956CHMOD
957CAT
958BASH
959BASENAME
960DATE_WHEN_CONFIGURED
961CONFIGURE_COMMAND_LINE
962CUSTOM_MAKE_DIR
963target_alias
964host_alias
965build_alias
966LIBS
967ECHO_T
968ECHO_N
969ECHO_C
970DEFS
971mandir
972localedir
973libdir
974psdir
975pdfdir
976dvidir
977htmldir
978infodir
979docdir
980oldincludedir
981includedir
982localstatedir
983sharedstatedir
984sysconfdir
985datadir
986datarootdir
987libexecdir
988sbindir
989bindir
990program_transform_name
991prefix
992exec_prefix
993PACKAGE_URL
994PACKAGE_BUGREPORT
995PACKAGE_STRING
996PACKAGE_VERSION
997PACKAGE_TARNAME
998PACKAGE_NAME
999PATH_SEPARATOR
1000SHELL'
1001ac_subst_files=''
1002ac_user_opts='
1003enable_option_checking
1004with_custom_make_dir
1005with_target_bits
1006with_sys_root
1007with_tools_dir
1008with_devkit
1009enable_openjdk_only
1010with_jdk_variant
1011with_jvm_interpreter
1012with_jvm_variants
1013enable_debug
1014with_debug_level
1015with_conf_name
1016with_builddeps_conf
1017with_builddeps_server
1018with_builddeps_dir
1019with_builddeps_group
1020enable_headful
1021enable_hotspot_test_in_build
1022with_cacerts_file
1023enable_unlimited_crypto
1024with_milestone
1025with_update_version
1026with_build_number
1027with_user_release_suffix
1028with_boot_jdk
1029with_boot_jdk_jvmargs
1030with_add_source_root
1031with_override_source_root
1032with_adds_and_overrides
1033with_override_langtools
1034with_override_corba
1035with_override_jaxp
1036with_override_jaxws
1037with_override_hotspot
1038with_override_jdk
1039with_import_hotspot
1040with_msvcr_dll
1041with_dxsdk
1042with_dxsdk_lib
1043with_dxsdk_include
1044with_jtreg
1045with_extra_cflags
1046with_extra_cxxflags
1047with_extra_ldflags
1048enable_debug_symbols
1049enable_zip_debug_info
1050enable_macosx_runtime_support
1051with_x
1052with_cups
1053with_cups_include
1054with_freetype
1055with_alsa
1056with_alsa_include
1057with_alsa_lib
1058with_giflib
1059with_zlib
1060with_stdc__lib
1061with_num_cores
1062with_memory_size
1063with_jobs
1064with_sjavac_server_java
1065enable_sjavac
1066enable_precompiled_headers
1067enable_ccache
1068with_ccache_dir
1069'
1070      ac_precious_vars='build_alias
1071host_alias
1072target_alias
1073PKG_CONFIG
1074CC
1075CFLAGS
1076LDFLAGS
1077LIBS
1078CPPFLAGS
1079CXX
1080CXXFLAGS
1081CCC
1082OBJC
1083OBJCFLAGS
1084CPP
1085CXXCPP
1086XMKMF
1087FREETYPE2_CFLAGS
1088FREETYPE2_LIBS
1089ALSA_CFLAGS
1090ALSA_LIBS
1091LIBFFI_CFLAGS
1092LIBFFI_LIBS'
1093
1094
1095# Initialize some variables set by options.
1096ac_init_help=
1097ac_init_version=false
1098ac_unrecognized_opts=
1099ac_unrecognized_sep=
1100# The variables have the same names as the options, with
1101# dashes changed to underlines.
1102cache_file=/dev/null
1103exec_prefix=NONE
1104no_create=
1105no_recursion=
1106prefix=NONE
1107program_prefix=NONE
1108program_suffix=NONE
1109program_transform_name=s,x,x,
1110silent=
1111site=
1112srcdir=
1113verbose=
1114x_includes=NONE
1115x_libraries=NONE
1116
1117# Installation directory options.
1118# These are left unexpanded so users can "make install exec_prefix=/foo"
1119# and all the variables that are supposed to be based on exec_prefix
1120# by default will actually change.
1121# Use braces instead of parens because sh, perl, etc. also accept them.
1122# (The list follows the same order as the GNU Coding Standards.)
1123bindir='${exec_prefix}/bin'
1124sbindir='${exec_prefix}/sbin'
1125libexecdir='${exec_prefix}/libexec'
1126datarootdir='${prefix}/share'
1127datadir='${datarootdir}'
1128sysconfdir='${prefix}/etc'
1129sharedstatedir='${prefix}/com'
1130localstatedir='${prefix}/var'
1131includedir='${prefix}/include'
1132oldincludedir='/usr/include'
1133docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1134infodir='${datarootdir}/info'
1135htmldir='${docdir}'
1136dvidir='${docdir}'
1137pdfdir='${docdir}'
1138psdir='${docdir}'
1139libdir='${exec_prefix}/lib'
1140localedir='${datarootdir}/locale'
1141mandir='${datarootdir}/man'
1142
1143ac_prev=
1144ac_dashdash=
1145for ac_option
1146do
1147  # If the previous option needs an argument, assign it.
1148  if test -n "$ac_prev"; then
1149    eval $ac_prev=\$ac_option
1150    ac_prev=
1151    continue
1152  fi
1153
1154  case $ac_option in
1155  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1156  *=)   ac_optarg= ;;
1157  *)    ac_optarg=yes ;;
1158  esac
1159
1160  # Accept the important Cygnus configure options, so we can diagnose typos.
1161
1162  case $ac_dashdash$ac_option in
1163  --)
1164    ac_dashdash=yes ;;
1165
1166  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1167    ac_prev=bindir ;;
1168  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1169    bindir=$ac_optarg ;;
1170
1171  -build | --build | --buil | --bui | --bu)
1172    ac_prev=build_alias ;;
1173  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1174    build_alias=$ac_optarg ;;
1175
1176  -cache-file | --cache-file | --cache-fil | --cache-fi \
1177  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1178    ac_prev=cache_file ;;
1179  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1180  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1181    cache_file=$ac_optarg ;;
1182
1183  --config-cache | -C)
1184    cache_file=config.cache ;;
1185
1186  -datadir | --datadir | --datadi | --datad)
1187    ac_prev=datadir ;;
1188  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1189    datadir=$ac_optarg ;;
1190
1191  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1192  | --dataroo | --dataro | --datar)
1193    ac_prev=datarootdir ;;
1194  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1195  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1196    datarootdir=$ac_optarg ;;
1197
1198  -disable-* | --disable-*)
1199    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1200    # Reject names that are not valid shell variable names.
1201    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1202      as_fn_error $? "invalid feature name: $ac_useropt"
1203    ac_useropt_orig=$ac_useropt
1204    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1205    case $ac_user_opts in
1206      *"
1207"enable_$ac_useropt"
1208"*) ;;
1209      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1210	 ac_unrecognized_sep=', ';;
1211    esac
1212    eval enable_$ac_useropt=no ;;
1213
1214  -docdir | --docdir | --docdi | --doc | --do)
1215    ac_prev=docdir ;;
1216  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1217    docdir=$ac_optarg ;;
1218
1219  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1220    ac_prev=dvidir ;;
1221  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1222    dvidir=$ac_optarg ;;
1223
1224  -enable-* | --enable-*)
1225    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1226    # Reject names that are not valid shell variable names.
1227    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1228      as_fn_error $? "invalid feature name: $ac_useropt"
1229    ac_useropt_orig=$ac_useropt
1230    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1231    case $ac_user_opts in
1232      *"
1233"enable_$ac_useropt"
1234"*) ;;
1235      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1236	 ac_unrecognized_sep=', ';;
1237    esac
1238    eval enable_$ac_useropt=\$ac_optarg ;;
1239
1240  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1241  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1242  | --exec | --exe | --ex)
1243    ac_prev=exec_prefix ;;
1244  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1245  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1246  | --exec=* | --exe=* | --ex=*)
1247    exec_prefix=$ac_optarg ;;
1248
1249  -gas | --gas | --ga | --g)
1250    # Obsolete; use --with-gas.
1251    with_gas=yes ;;
1252
1253  -help | --help | --hel | --he | -h)
1254    ac_init_help=long ;;
1255  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1256    ac_init_help=recursive ;;
1257  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1258    ac_init_help=short ;;
1259
1260  -host | --host | --hos | --ho)
1261    ac_prev=host_alias ;;
1262  -host=* | --host=* | --hos=* | --ho=*)
1263    host_alias=$ac_optarg ;;
1264
1265  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1266    ac_prev=htmldir ;;
1267  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1268  | --ht=*)
1269    htmldir=$ac_optarg ;;
1270
1271  -includedir | --includedir | --includedi | --included | --include \
1272  | --includ | --inclu | --incl | --inc)
1273    ac_prev=includedir ;;
1274  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1275  | --includ=* | --inclu=* | --incl=* | --inc=*)
1276    includedir=$ac_optarg ;;
1277
1278  -infodir | --infodir | --infodi | --infod | --info | --inf)
1279    ac_prev=infodir ;;
1280  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1281    infodir=$ac_optarg ;;
1282
1283  -libdir | --libdir | --libdi | --libd)
1284    ac_prev=libdir ;;
1285  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1286    libdir=$ac_optarg ;;
1287
1288  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1289  | --libexe | --libex | --libe)
1290    ac_prev=libexecdir ;;
1291  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1292  | --libexe=* | --libex=* | --libe=*)
1293    libexecdir=$ac_optarg ;;
1294
1295  -localedir | --localedir | --localedi | --localed | --locale)
1296    ac_prev=localedir ;;
1297  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1298    localedir=$ac_optarg ;;
1299
1300  -localstatedir | --localstatedir | --localstatedi | --localstated \
1301  | --localstate | --localstat | --localsta | --localst | --locals)
1302    ac_prev=localstatedir ;;
1303  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1304  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1305    localstatedir=$ac_optarg ;;
1306
1307  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1308    ac_prev=mandir ;;
1309  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1310    mandir=$ac_optarg ;;
1311
1312  -nfp | --nfp | --nf)
1313    # Obsolete; use --without-fp.
1314    with_fp=no ;;
1315
1316  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1317  | --no-cr | --no-c | -n)
1318    no_create=yes ;;
1319
1320  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1321  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1322    no_recursion=yes ;;
1323
1324  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1325  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1326  | --oldin | --oldi | --old | --ol | --o)
1327    ac_prev=oldincludedir ;;
1328  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1329  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1330  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1331    oldincludedir=$ac_optarg ;;
1332
1333  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1334    ac_prev=prefix ;;
1335  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1336    prefix=$ac_optarg ;;
1337
1338  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1339  | --program-pre | --program-pr | --program-p)
1340    ac_prev=program_prefix ;;
1341  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1342  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1343    program_prefix=$ac_optarg ;;
1344
1345  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1346  | --program-suf | --program-su | --program-s)
1347    ac_prev=program_suffix ;;
1348  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1349  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1350    program_suffix=$ac_optarg ;;
1351
1352  -program-transform-name | --program-transform-name \
1353  | --program-transform-nam | --program-transform-na \
1354  | --program-transform-n | --program-transform- \
1355  | --program-transform | --program-transfor \
1356  | --program-transfo | --program-transf \
1357  | --program-trans | --program-tran \
1358  | --progr-tra | --program-tr | --program-t)
1359    ac_prev=program_transform_name ;;
1360  -program-transform-name=* | --program-transform-name=* \
1361  | --program-transform-nam=* | --program-transform-na=* \
1362  | --program-transform-n=* | --program-transform-=* \
1363  | --program-transform=* | --program-transfor=* \
1364  | --program-transfo=* | --program-transf=* \
1365  | --program-trans=* | --program-tran=* \
1366  | --progr-tra=* | --program-tr=* | --program-t=*)
1367    program_transform_name=$ac_optarg ;;
1368
1369  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1370    ac_prev=pdfdir ;;
1371  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1372    pdfdir=$ac_optarg ;;
1373
1374  -psdir | --psdir | --psdi | --psd | --ps)
1375    ac_prev=psdir ;;
1376  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1377    psdir=$ac_optarg ;;
1378
1379  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1380  | -silent | --silent | --silen | --sile | --sil)
1381    silent=yes ;;
1382
1383  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1384    ac_prev=sbindir ;;
1385  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1386  | --sbi=* | --sb=*)
1387    sbindir=$ac_optarg ;;
1388
1389  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1390  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1391  | --sharedst | --shareds | --shared | --share | --shar \
1392  | --sha | --sh)
1393    ac_prev=sharedstatedir ;;
1394  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1395  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1396  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1397  | --sha=* | --sh=*)
1398    sharedstatedir=$ac_optarg ;;
1399
1400  -site | --site | --sit)
1401    ac_prev=site ;;
1402  -site=* | --site=* | --sit=*)
1403    site=$ac_optarg ;;
1404
1405  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1406    ac_prev=srcdir ;;
1407  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1408    srcdir=$ac_optarg ;;
1409
1410  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1411  | --syscon | --sysco | --sysc | --sys | --sy)
1412    ac_prev=sysconfdir ;;
1413  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1414  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1415    sysconfdir=$ac_optarg ;;
1416
1417  -target | --target | --targe | --targ | --tar | --ta | --t)
1418    ac_prev=target_alias ;;
1419  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1420    target_alias=$ac_optarg ;;
1421
1422  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1423    verbose=yes ;;
1424
1425  -version | --version | --versio | --versi | --vers | -V)
1426    ac_init_version=: ;;
1427
1428  -with-* | --with-*)
1429    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1430    # Reject names that are not valid shell variable names.
1431    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1432      as_fn_error $? "invalid package name: $ac_useropt"
1433    ac_useropt_orig=$ac_useropt
1434    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1435    case $ac_user_opts in
1436      *"
1437"with_$ac_useropt"
1438"*) ;;
1439      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1440	 ac_unrecognized_sep=', ';;
1441    esac
1442    eval with_$ac_useropt=\$ac_optarg ;;
1443
1444  -without-* | --without-*)
1445    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1446    # Reject names that are not valid shell variable names.
1447    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1448      as_fn_error $? "invalid package name: $ac_useropt"
1449    ac_useropt_orig=$ac_useropt
1450    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1451    case $ac_user_opts in
1452      *"
1453"with_$ac_useropt"
1454"*) ;;
1455      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1456	 ac_unrecognized_sep=', ';;
1457    esac
1458    eval with_$ac_useropt=no ;;
1459
1460  --x)
1461    # Obsolete; use --with-x.
1462    with_x=yes ;;
1463
1464  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1465  | --x-incl | --x-inc | --x-in | --x-i)
1466    ac_prev=x_includes ;;
1467  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1468  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1469    x_includes=$ac_optarg ;;
1470
1471  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1472  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1473    ac_prev=x_libraries ;;
1474  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1475  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1476    x_libraries=$ac_optarg ;;
1477
1478  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1479Try \`$0 --help' for more information"
1480    ;;
1481
1482  *=*)
1483    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1484    # Reject names that are not valid shell variable names.
1485    case $ac_envvar in #(
1486      '' | [0-9]* | *[!_$as_cr_alnum]* )
1487      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1488    esac
1489    eval $ac_envvar=\$ac_optarg
1490    export $ac_envvar ;;
1491
1492  *)
1493    # FIXME: should be removed in autoconf 3.0.
1494    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1495    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1496      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1497    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1498    ;;
1499
1500  esac
1501done
1502
1503if test -n "$ac_prev"; then
1504  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1505  as_fn_error $? "missing argument to $ac_option"
1506fi
1507
1508if test -n "$ac_unrecognized_opts"; then
1509  case $enable_option_checking in
1510    no) ;;
1511    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1512    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1513  esac
1514fi
1515
1516# Check all directory arguments for consistency.
1517for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1518		datadir sysconfdir sharedstatedir localstatedir includedir \
1519		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1520		libdir localedir mandir
1521do
1522  eval ac_val=\$$ac_var
1523  # Remove trailing slashes.
1524  case $ac_val in
1525    */ )
1526      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1527      eval $ac_var=\$ac_val;;
1528  esac
1529  # Be sure to have absolute directory names.
1530  case $ac_val in
1531    [\\/$]* | ?:[\\/]* )  continue;;
1532    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1533  esac
1534  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1535done
1536
1537# There might be people who depend on the old broken behavior: `$host'
1538# used to hold the argument of --host etc.
1539# FIXME: To remove some day.
1540build=$build_alias
1541host=$host_alias
1542target=$target_alias
1543
1544# FIXME: To remove some day.
1545if test "x$host_alias" != x; then
1546  if test "x$build_alias" = x; then
1547    cross_compiling=maybe
1548  elif test "x$build_alias" != "x$host_alias"; then
1549    cross_compiling=yes
1550  fi
1551fi
1552
1553ac_tool_prefix=
1554test -n "$host_alias" && ac_tool_prefix=$host_alias-
1555
1556test "$silent" = yes && exec 6>/dev/null
1557
1558
1559ac_pwd=`pwd` && test -n "$ac_pwd" &&
1560ac_ls_di=`ls -di .` &&
1561ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1562  as_fn_error $? "working directory cannot be determined"
1563test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1564  as_fn_error $? "pwd does not report name of working directory"
1565
1566
1567# Find the source files, if location was not specified.
1568if test -z "$srcdir"; then
1569  ac_srcdir_defaulted=yes
1570  # Try the directory containing this script, then the parent directory.
1571  ac_confdir=`$as_dirname -- "$as_myself" ||
1572$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1573	 X"$as_myself" : 'X\(//\)[^/]' \| \
1574	 X"$as_myself" : 'X\(//\)$' \| \
1575	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1576$as_echo X"$as_myself" |
1577    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1578	    s//\1/
1579	    q
1580	  }
1581	  /^X\(\/\/\)[^/].*/{
1582	    s//\1/
1583	    q
1584	  }
1585	  /^X\(\/\/\)$/{
1586	    s//\1/
1587	    q
1588	  }
1589	  /^X\(\/\).*/{
1590	    s//\1/
1591	    q
1592	  }
1593	  s/.*/./; q'`
1594  srcdir=$ac_confdir
1595  if test ! -r "$srcdir/$ac_unique_file"; then
1596    srcdir=..
1597  fi
1598else
1599  ac_srcdir_defaulted=no
1600fi
1601if test ! -r "$srcdir/$ac_unique_file"; then
1602  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1603  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1604fi
1605ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1606ac_abs_confdir=`(
1607	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1608	pwd)`
1609# When building in place, set srcdir=.
1610if test "$ac_abs_confdir" = "$ac_pwd"; then
1611  srcdir=.
1612fi
1613# Remove unnecessary trailing slashes from srcdir.
1614# Double slashes in file names in object file debugging info
1615# mess up M-x gdb in Emacs.
1616case $srcdir in
1617*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1618esac
1619for ac_var in $ac_precious_vars; do
1620  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1621  eval ac_env_${ac_var}_value=\$${ac_var}
1622  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1623  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1624done
1625
1626#
1627# Report the --help message.
1628#
1629if test "$ac_init_help" = "long"; then
1630  # Omit some internal or obsolete options to make the list less imposing.
1631  # This message is too long to be a string in the A/UX 3.1 sh.
1632  cat <<_ACEOF
1633\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1634
1635Usage: $0 [OPTION]... [VAR=VALUE]...
1636
1637To assign environment variables (e.g., CC, CFLAGS...), specify them as
1638VAR=VALUE.  See below for descriptions of some of the useful variables.
1639
1640Defaults for the options are specified in brackets.
1641
1642Configuration:
1643  -h, --help              display this help and exit
1644      --help=short        display options specific to this package
1645      --help=recursive    display the short help of all the included packages
1646  -V, --version           display version information and exit
1647  -q, --quiet, --silent   do not print \`checking ...' messages
1648      --cache-file=FILE   cache test results in FILE [disabled]
1649  -C, --config-cache      alias for \`--cache-file=config.cache'
1650  -n, --no-create         do not create output files
1651      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1652
1653Installation directories:
1654  --prefix=PREFIX         install architecture-independent files in PREFIX
1655                          [$ac_default_prefix]
1656  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1657                          [PREFIX]
1658
1659By default, \`make install' will install all the files in
1660\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1661an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1662for instance \`--prefix=\$HOME'.
1663
1664For better control, use the options below.
1665
1666Fine tuning of the installation directories:
1667  --bindir=DIR            user executables [EPREFIX/bin]
1668  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1669  --libexecdir=DIR        program executables [EPREFIX/libexec]
1670  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1671  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1672  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1673  --libdir=DIR            object code libraries [EPREFIX/lib]
1674  --includedir=DIR        C header files [PREFIX/include]
1675  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1676  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1677  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1678  --infodir=DIR           info documentation [DATAROOTDIR/info]
1679  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1680  --mandir=DIR            man documentation [DATAROOTDIR/man]
1681  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1682  --htmldir=DIR           html documentation [DOCDIR]
1683  --dvidir=DIR            dvi documentation [DOCDIR]
1684  --pdfdir=DIR            pdf documentation [DOCDIR]
1685  --psdir=DIR             ps documentation [DOCDIR]
1686_ACEOF
1687
1688  cat <<\_ACEOF
1689
1690X features:
1691  --x-includes=DIR    X include files are in DIR
1692  --x-libraries=DIR   X library files are in DIR
1693
1694System types:
1695  --build=BUILD     configure for building on BUILD [guessed]
1696  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1697  --target=TARGET   configure for building compilers for TARGET [HOST]
1698_ACEOF
1699fi
1700
1701if test -n "$ac_init_help"; then
1702  case $ac_init_help in
1703     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1704   esac
1705  cat <<\_ACEOF
1706
1707Optional Features:
1708  --disable-option-checking  ignore unrecognized --enable/--with options
1709  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1710  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1711  --enable-openjdk-only   suppress building custom source even if present
1712                          [disabled]
1713  --enable-debug          set the debug level to fastdebug (shorthand for
1714                          --with-debug-level=fastdebug) [disabled]
1715  --disable-headful       disable building headful support (graphical UI
1716                          support) [enabled]
1717  --enable-hotspot-test-in-build
1718                          run the Queens test after Hotspot build [disabled]
1719  --enable-unlimited-crypto
1720                          Enable unlimited crypto policy [disabled]
1721  --disable-debug-symbols disable generation of debug symbols [enabled]
1722  --disable-zip-debug-info
1723                          disable zipping of debug-info files [enabled]
1724  --disable-macosx-runtime-support
1725                          disable the use of MacOSX Java runtime support
1726                          framework [enabled]
1727  --enable-sjavac         use sjavac to do fast incremental compiles
1728                          [disabled]
1729  --disable-precompiled-headers
1730                          disable using precompiled headers when compiling C++
1731                          [enabled]
1732  --disable-ccache        disable using ccache to speed up recompilations
1733                          [enabled]
1734
1735Optional Packages:
1736  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1737  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1738  --with-custom-make-dir  use this directory for custom build/make files
1739  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1740                          support it), e.g. --with-target-bits=32 [guessed]
1741  --with-sys-root         pass this sys-root to the compilers and tools (for
1742                          cross-compiling)
1743  --with-tools-dir        search this directory for compilers and tools (for
1744                          cross-compiling)
1745  --with-devkit           use this directory as base for tools-dir and
1746                          sys-root (for cross-compiling)
1747  --with-jdk-variant      JDK variant to build (normal) [normal]
1748  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1749  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1750                          client, minimal1, kernel, zero, zeroshark, core)
1751                          [server]
1752  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1753                          [release]
1754  --with-conf-name        use this as the name of the configuration [generated
1755                          from important configuration options]
1756  --with-builddeps-conf   use this configuration file for the builddeps
1757  --with-builddeps-server download and use build dependencies from this server
1758                          url
1759  --with-builddeps-dir    store downloaded build dependencies here
1760                          [/localhome/builddeps]
1761  --with-builddeps-group  chgrp the downloaded build dependencies to this
1762                          group
1763  --with-cacerts-file     specify alternative cacerts file
1764  --with-milestone        Set milestone value for build [internal]
1765  --with-update-version   Set update version value for build [b00]
1766  --with-build-number     Set build number value for build [b00]
1767  --with-user-release-suffix
1768                          Add a custom string to the version string if build
1769                          number isn't set.[username_builddateb00]
1770  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1771  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1772                          invocations of the Boot JDK, overriding the default
1773                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1774                          -enableassertions"
1775  --with-add-source-root  for each and every source directory, look in this
1776                          additional source root for the same directory; if it
1777                          exists and have files in it, include it in the build
1778  --with-override-source-root
1779                          for each and every source directory, look in this
1780                          override source root for the same directory; if it
1781                          exists, use that directory instead and ignore the
1782                          directory in the original source root
1783  --with-adds-and-overrides
1784                          use the subdirs 'adds' and 'overrides' in the
1785                          specified directory as add-source-root and
1786                          override-source-root
1787  --with-override-langtools
1788                          use this langtools dir for the build
1789  --with-override-corba   use this corba dir for the build
1790  --with-override-jaxp    use this jaxp dir for the build
1791  --with-override-jaxws   use this jaxws dir for the build
1792  --with-override-hotspot use this hotspot dir for the build
1793  --with-override-jdk     use this jdk dir for the build
1794  --with-import-hotspot   import hotspot binaries from this jdk image or
1795                          hotspot build dist dir instead of building from
1796                          source
1797  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1798                          only) [probed]
1799  --with-dxsdk            the DirectX SDK (Windows only) [probed]
1800  --with-dxsdk-lib        the DirectX SDK lib directory (Windows only)
1801                          [probed]
1802  --with-dxsdk-include    the DirectX SDK include directory (Windows only)
1803                          [probed]
1804  --with-jtreg            Regression Test Harness [probed]
1805  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1806  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1807  --with-extra-ldflags    extra flags to be used when linking jdk
1808  --with-x                use the X Window System
1809  --with-cups             specify prefix directory for the cups package
1810                          (expecting the headers under PATH/include)
1811  --with-cups-include     specify directory for the cups include files
1812  --with-freetype         specify prefix directory for the freetype2 package
1813                          (expecting the libraries under PATH/lib and the
1814                          headers under PATH/include)
1815  --with-alsa             specify prefix directory for the alsa package
1816                          (expecting the libraries under PATH/lib and the
1817                          headers under PATH/include)
1818  --with-alsa-include     specify directory for the alsa include files
1819  --with-alsa-lib         specify directory for the alsa library
1820  --with-giflib           use giflib from build system or OpenJDK source
1821                          (system, bundled) [bundled]
1822  --with-zlib             use zlib from build system or OpenJDK source
1823                          (system, bundled) [bundled]
1824  --with-stdc++lib=<static>,<dynamic>,<default>
1825                          force linking of the C++ runtime on Linux to either
1826                          static or dynamic, default is static with dynamic as
1827                          fallback
1828  --with-num-cores        number of cores in the build system, e.g.
1829                          --with-num-cores=8 [probed]
1830  --with-memory-size      memory (in MB) available in the build system, e.g.
1831                          --with-memory-size=1024 [probed]
1832  --with-jobs             number of parallel jobs to let make run [calculated
1833                          based on cores and memory]
1834  --with-sjavac-server-java
1835                          use this java binary for running the sjavac
1836                          background server [Boot JDK java]
1837  --with-ccache-dir       where to store ccache files [~/.ccache]
1838
1839Some influential environment variables:
1840  PKG_CONFIG  path to pkg-config utility
1841  CC          C compiler command
1842  CFLAGS      C compiler flags
1843  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1844              nonstandard directory <lib dir>
1845  LIBS        libraries to pass to the linker, e.g. -l<library>
1846  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1847              you have headers in a nonstandard directory <include dir>
1848  CXX         C++ compiler command
1849  CXXFLAGS    C++ compiler flags
1850  OBJC        Objective C compiler command
1851  OBJCFLAGS   Objective C compiler flags
1852  CPP         C preprocessor
1853  CXXCPP      C++ preprocessor
1854  XMKMF       Path to xmkmf, Makefile generator for X Window System
1855  FREETYPE2_CFLAGS
1856              C compiler flags for FREETYPE2, overriding pkg-config
1857  FREETYPE2_LIBS
1858              linker flags for FREETYPE2, overriding pkg-config
1859  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1860  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1861  LIBFFI_CFLAGS
1862              C compiler flags for LIBFFI, overriding pkg-config
1863  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
1864
1865Use these variables to override the choices made by `configure' or to help
1866it to find libraries and programs with nonstandard names/locations.
1867
1868Report bugs to <build-dev@openjdk.java.net>.
1869OpenJDK home page: <http://openjdk.java.net>.
1870_ACEOF
1871ac_status=$?
1872fi
1873
1874if test "$ac_init_help" = "recursive"; then
1875  # If there are subdirs, report their specific --help.
1876  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1877    test -d "$ac_dir" ||
1878      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1879      continue
1880    ac_builddir=.
1881
1882case "$ac_dir" in
1883.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1884*)
1885  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1886  # A ".." for each directory in $ac_dir_suffix.
1887  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1888  case $ac_top_builddir_sub in
1889  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1890  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1891  esac ;;
1892esac
1893ac_abs_top_builddir=$ac_pwd
1894ac_abs_builddir=$ac_pwd$ac_dir_suffix
1895# for backward compatibility:
1896ac_top_builddir=$ac_top_build_prefix
1897
1898case $srcdir in
1899  .)  # We are building in place.
1900    ac_srcdir=.
1901    ac_top_srcdir=$ac_top_builddir_sub
1902    ac_abs_top_srcdir=$ac_pwd ;;
1903  [\\/]* | ?:[\\/]* )  # Absolute name.
1904    ac_srcdir=$srcdir$ac_dir_suffix;
1905    ac_top_srcdir=$srcdir
1906    ac_abs_top_srcdir=$srcdir ;;
1907  *) # Relative name.
1908    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1909    ac_top_srcdir=$ac_top_build_prefix$srcdir
1910    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1911esac
1912ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1913
1914    cd "$ac_dir" || { ac_status=$?; continue; }
1915    # Check for guested configure.
1916    if test -f "$ac_srcdir/configure.gnu"; then
1917      echo &&
1918      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1919    elif test -f "$ac_srcdir/configure"; then
1920      echo &&
1921      $SHELL "$ac_srcdir/configure" --help=recursive
1922    else
1923      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1924    fi || ac_status=$?
1925    cd "$ac_pwd" || { ac_status=$?; break; }
1926  done
1927fi
1928
1929test -n "$ac_init_help" && exit $ac_status
1930if $ac_init_version; then
1931  cat <<\_ACEOF
1932OpenJDK configure jdk8
1933generated by GNU Autoconf 2.69
1934
1935Copyright (C) 2012 Free Software Foundation, Inc.
1936This configure script is free software; the Free Software Foundation
1937gives unlimited permission to copy, distribute and modify it.
1938_ACEOF
1939  exit
1940fi
1941
1942## ------------------------ ##
1943## Autoconf initialization. ##
1944## ------------------------ ##
1945
1946# ac_fn_c_try_compile LINENO
1947# --------------------------
1948# Try to compile conftest.$ac_ext, and return whether this succeeded.
1949ac_fn_c_try_compile ()
1950{
1951  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1952  rm -f conftest.$ac_objext
1953  if { { ac_try="$ac_compile"
1954case "(($ac_try" in
1955  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1956  *) ac_try_echo=$ac_try;;
1957esac
1958eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1959$as_echo "$ac_try_echo"; } >&5
1960  (eval "$ac_compile") 2>conftest.err
1961  ac_status=$?
1962  if test -s conftest.err; then
1963    grep -v '^ *+' conftest.err >conftest.er1
1964    cat conftest.er1 >&5
1965    mv -f conftest.er1 conftest.err
1966  fi
1967  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1968  test $ac_status = 0; } && {
1969	 test -z "$ac_c_werror_flag" ||
1970	 test ! -s conftest.err
1971       } && test -s conftest.$ac_objext; then :
1972  ac_retval=0
1973else
1974  $as_echo "$as_me: failed program was:" >&5
1975sed 's/^/| /' conftest.$ac_ext >&5
1976
1977	ac_retval=1
1978fi
1979  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1980  as_fn_set_status $ac_retval
1981
1982} # ac_fn_c_try_compile
1983
1984# ac_fn_cxx_try_compile LINENO
1985# ----------------------------
1986# Try to compile conftest.$ac_ext, and return whether this succeeded.
1987ac_fn_cxx_try_compile ()
1988{
1989  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1990  rm -f conftest.$ac_objext
1991  if { { ac_try="$ac_compile"
1992case "(($ac_try" in
1993  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1994  *) ac_try_echo=$ac_try;;
1995esac
1996eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1997$as_echo "$ac_try_echo"; } >&5
1998  (eval "$ac_compile") 2>conftest.err
1999  ac_status=$?
2000  if test -s conftest.err; then
2001    grep -v '^ *+' conftest.err >conftest.er1
2002    cat conftest.er1 >&5
2003    mv -f conftest.er1 conftest.err
2004  fi
2005  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2006  test $ac_status = 0; } && {
2007	 test -z "$ac_cxx_werror_flag" ||
2008	 test ! -s conftest.err
2009       } && test -s conftest.$ac_objext; then :
2010  ac_retval=0
2011else
2012  $as_echo "$as_me: failed program was:" >&5
2013sed 's/^/| /' conftest.$ac_ext >&5
2014
2015	ac_retval=1
2016fi
2017  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2018  as_fn_set_status $ac_retval
2019
2020} # ac_fn_cxx_try_compile
2021
2022# ac_fn_objc_try_compile LINENO
2023# -----------------------------
2024# Try to compile conftest.$ac_ext, and return whether this succeeded.
2025ac_fn_objc_try_compile ()
2026{
2027  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2028  rm -f conftest.$ac_objext
2029  if { { ac_try="$ac_compile"
2030case "(($ac_try" in
2031  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2032  *) ac_try_echo=$ac_try;;
2033esac
2034eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2035$as_echo "$ac_try_echo"; } >&5
2036  (eval "$ac_compile") 2>conftest.err
2037  ac_status=$?
2038  if test -s conftest.err; then
2039    grep -v '^ *+' conftest.err >conftest.er1
2040    cat conftest.er1 >&5
2041    mv -f conftest.er1 conftest.err
2042  fi
2043  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2044  test $ac_status = 0; } && {
2045	 test -z "$ac_objc_werror_flag" ||
2046	 test ! -s conftest.err
2047       } && test -s conftest.$ac_objext; then :
2048  ac_retval=0
2049else
2050  $as_echo "$as_me: failed program was:" >&5
2051sed 's/^/| /' conftest.$ac_ext >&5
2052
2053	ac_retval=1
2054fi
2055  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2056  as_fn_set_status $ac_retval
2057
2058} # ac_fn_objc_try_compile
2059
2060# ac_fn_c_try_cpp LINENO
2061# ----------------------
2062# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2063ac_fn_c_try_cpp ()
2064{
2065  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2066  if { { ac_try="$ac_cpp conftest.$ac_ext"
2067case "(($ac_try" in
2068  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2069  *) ac_try_echo=$ac_try;;
2070esac
2071eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2072$as_echo "$ac_try_echo"; } >&5
2073  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2074  ac_status=$?
2075  if test -s conftest.err; then
2076    grep -v '^ *+' conftest.err >conftest.er1
2077    cat conftest.er1 >&5
2078    mv -f conftest.er1 conftest.err
2079  fi
2080  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2081  test $ac_status = 0; } > conftest.i && {
2082	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2083	 test ! -s conftest.err
2084       }; then :
2085  ac_retval=0
2086else
2087  $as_echo "$as_me: failed program was:" >&5
2088sed 's/^/| /' conftest.$ac_ext >&5
2089
2090    ac_retval=1
2091fi
2092  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2093  as_fn_set_status $ac_retval
2094
2095} # ac_fn_c_try_cpp
2096
2097# ac_fn_cxx_try_cpp LINENO
2098# ------------------------
2099# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2100ac_fn_cxx_try_cpp ()
2101{
2102  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2103  if { { ac_try="$ac_cpp conftest.$ac_ext"
2104case "(($ac_try" in
2105  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2106  *) ac_try_echo=$ac_try;;
2107esac
2108eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2109$as_echo "$ac_try_echo"; } >&5
2110  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2111  ac_status=$?
2112  if test -s conftest.err; then
2113    grep -v '^ *+' conftest.err >conftest.er1
2114    cat conftest.er1 >&5
2115    mv -f conftest.er1 conftest.err
2116  fi
2117  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2118  test $ac_status = 0; } > conftest.i && {
2119	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2120	 test ! -s conftest.err
2121       }; then :
2122  ac_retval=0
2123else
2124  $as_echo "$as_me: failed program was:" >&5
2125sed 's/^/| /' conftest.$ac_ext >&5
2126
2127    ac_retval=1
2128fi
2129  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2130  as_fn_set_status $ac_retval
2131
2132} # ac_fn_cxx_try_cpp
2133
2134# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2135# ---------------------------------------------------------
2136# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2137# the include files in INCLUDES and setting the cache variable VAR
2138# accordingly.
2139ac_fn_cxx_check_header_mongrel ()
2140{
2141  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2142  if eval \${$3+:} false; then :
2143  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2144$as_echo_n "checking for $2... " >&6; }
2145if eval \${$3+:} false; then :
2146  $as_echo_n "(cached) " >&6
2147fi
2148eval ac_res=\$$3
2149	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2150$as_echo "$ac_res" >&6; }
2151else
2152  # Is the header compilable?
2153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2154$as_echo_n "checking $2 usability... " >&6; }
2155cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2156/* end confdefs.h.  */
2157$4
2158#include <$2>
2159_ACEOF
2160if ac_fn_cxx_try_compile "$LINENO"; then :
2161  ac_header_compiler=yes
2162else
2163  ac_header_compiler=no
2164fi
2165rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2167$as_echo "$ac_header_compiler" >&6; }
2168
2169# Is the header present?
2170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2171$as_echo_n "checking $2 presence... " >&6; }
2172cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2173/* end confdefs.h.  */
2174#include <$2>
2175_ACEOF
2176if ac_fn_cxx_try_cpp "$LINENO"; then :
2177  ac_header_preproc=yes
2178else
2179  ac_header_preproc=no
2180fi
2181rm -f conftest.err conftest.i conftest.$ac_ext
2182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2183$as_echo "$ac_header_preproc" >&6; }
2184
2185# So?  What about this header?
2186case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2187  yes:no: )
2188    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2189$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2190    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2191$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2192    ;;
2193  no:yes:* )
2194    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2195$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2196    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2197$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2198    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2199$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2200    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2201$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2202    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2203$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2204( $as_echo "## ----------------------------------------- ##
2205## Report this to build-dev@openjdk.java.net ##
2206## ----------------------------------------- ##"
2207     ) | sed "s/^/$as_me: WARNING:     /" >&2
2208    ;;
2209esac
2210  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2211$as_echo_n "checking for $2... " >&6; }
2212if eval \${$3+:} false; then :
2213  $as_echo_n "(cached) " >&6
2214else
2215  eval "$3=\$ac_header_compiler"
2216fi
2217eval ac_res=\$$3
2218	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2219$as_echo "$ac_res" >&6; }
2220fi
2221  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2222
2223} # ac_fn_cxx_check_header_mongrel
2224
2225# ac_fn_cxx_try_run LINENO
2226# ------------------------
2227# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2228# that executables *can* be run.
2229ac_fn_cxx_try_run ()
2230{
2231  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2232  if { { ac_try="$ac_link"
2233case "(($ac_try" in
2234  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2235  *) ac_try_echo=$ac_try;;
2236esac
2237eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2238$as_echo "$ac_try_echo"; } >&5
2239  (eval "$ac_link") 2>&5
2240  ac_status=$?
2241  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2242  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2243  { { case "(($ac_try" in
2244  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2245  *) ac_try_echo=$ac_try;;
2246esac
2247eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2248$as_echo "$ac_try_echo"; } >&5
2249  (eval "$ac_try") 2>&5
2250  ac_status=$?
2251  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2252  test $ac_status = 0; }; }; then :
2253  ac_retval=0
2254else
2255  $as_echo "$as_me: program exited with status $ac_status" >&5
2256       $as_echo "$as_me: failed program was:" >&5
2257sed 's/^/| /' conftest.$ac_ext >&5
2258
2259       ac_retval=$ac_status
2260fi
2261  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2262  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2263  as_fn_set_status $ac_retval
2264
2265} # ac_fn_cxx_try_run
2266
2267# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2268# ---------------------------------------------------------
2269# Tests whether HEADER exists and can be compiled using the include files in
2270# INCLUDES, setting the cache variable VAR accordingly.
2271ac_fn_cxx_check_header_compile ()
2272{
2273  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2274  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2275$as_echo_n "checking for $2... " >&6; }
2276if eval \${$3+:} false; then :
2277  $as_echo_n "(cached) " >&6
2278else
2279  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2280/* end confdefs.h.  */
2281$4
2282#include <$2>
2283_ACEOF
2284if ac_fn_cxx_try_compile "$LINENO"; then :
2285  eval "$3=yes"
2286else
2287  eval "$3=no"
2288fi
2289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2290fi
2291eval ac_res=\$$3
2292	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2293$as_echo "$ac_res" >&6; }
2294  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2295
2296} # ac_fn_cxx_check_header_compile
2297
2298# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2299# ----------------------------------------------
2300# Tries to find the compile-time value of EXPR in a program that includes
2301# INCLUDES, setting VAR accordingly. Returns whether the value could be
2302# computed
2303ac_fn_cxx_compute_int ()
2304{
2305  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2306  if test "$cross_compiling" = yes; then
2307    # Depending upon the size, compute the lo and hi bounds.
2308cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2309/* end confdefs.h.  */
2310$4
2311int
2312main ()
2313{
2314static int test_array [1 - 2 * !(($2) >= 0)];
2315test_array [0] = 0;
2316return test_array [0];
2317
2318  ;
2319  return 0;
2320}
2321_ACEOF
2322if ac_fn_cxx_try_compile "$LINENO"; then :
2323  ac_lo=0 ac_mid=0
2324  while :; do
2325    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2326/* end confdefs.h.  */
2327$4
2328int
2329main ()
2330{
2331static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2332test_array [0] = 0;
2333return test_array [0];
2334
2335  ;
2336  return 0;
2337}
2338_ACEOF
2339if ac_fn_cxx_try_compile "$LINENO"; then :
2340  ac_hi=$ac_mid; break
2341else
2342  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2343			if test $ac_lo -le $ac_mid; then
2344			  ac_lo= ac_hi=
2345			  break
2346			fi
2347			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2348fi
2349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2350  done
2351else
2352  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2353/* end confdefs.h.  */
2354$4
2355int
2356main ()
2357{
2358static int test_array [1 - 2 * !(($2) < 0)];
2359test_array [0] = 0;
2360return test_array [0];
2361
2362  ;
2363  return 0;
2364}
2365_ACEOF
2366if ac_fn_cxx_try_compile "$LINENO"; then :
2367  ac_hi=-1 ac_mid=-1
2368  while :; do
2369    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2370/* end confdefs.h.  */
2371$4
2372int
2373main ()
2374{
2375static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2376test_array [0] = 0;
2377return test_array [0];
2378
2379  ;
2380  return 0;
2381}
2382_ACEOF
2383if ac_fn_cxx_try_compile "$LINENO"; then :
2384  ac_lo=$ac_mid; break
2385else
2386  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2387			if test $ac_mid -le $ac_hi; then
2388			  ac_lo= ac_hi=
2389			  break
2390			fi
2391			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2392fi
2393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2394  done
2395else
2396  ac_lo= ac_hi=
2397fi
2398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2399fi
2400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2401# Binary search between lo and hi bounds.
2402while test "x$ac_lo" != "x$ac_hi"; do
2403  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2404  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2405/* end confdefs.h.  */
2406$4
2407int
2408main ()
2409{
2410static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2411test_array [0] = 0;
2412return test_array [0];
2413
2414  ;
2415  return 0;
2416}
2417_ACEOF
2418if ac_fn_cxx_try_compile "$LINENO"; then :
2419  ac_hi=$ac_mid
2420else
2421  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2422fi
2423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2424done
2425case $ac_lo in #((
2426?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2427'') ac_retval=1 ;;
2428esac
2429  else
2430    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2431/* end confdefs.h.  */
2432$4
2433static long int longval () { return $2; }
2434static unsigned long int ulongval () { return $2; }
2435#include <stdio.h>
2436#include <stdlib.h>
2437int
2438main ()
2439{
2440
2441  FILE *f = fopen ("conftest.val", "w");
2442  if (! f)
2443    return 1;
2444  if (($2) < 0)
2445    {
2446      long int i = longval ();
2447      if (i != ($2))
2448	return 1;
2449      fprintf (f, "%ld", i);
2450    }
2451  else
2452    {
2453      unsigned long int i = ulongval ();
2454      if (i != ($2))
2455	return 1;
2456      fprintf (f, "%lu", i);
2457    }
2458  /* Do not output a trailing newline, as this causes \r\n confusion
2459     on some platforms.  */
2460  return ferror (f) || fclose (f) != 0;
2461
2462  ;
2463  return 0;
2464}
2465_ACEOF
2466if ac_fn_cxx_try_run "$LINENO"; then :
2467  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2468else
2469  ac_retval=1
2470fi
2471rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2472  conftest.$ac_objext conftest.beam conftest.$ac_ext
2473rm -f conftest.val
2474
2475  fi
2476  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2477  as_fn_set_status $ac_retval
2478
2479} # ac_fn_cxx_compute_int
2480
2481# ac_fn_cxx_try_link LINENO
2482# -------------------------
2483# Try to link conftest.$ac_ext, and return whether this succeeded.
2484ac_fn_cxx_try_link ()
2485{
2486  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2487  rm -f conftest.$ac_objext conftest$ac_exeext
2488  if { { ac_try="$ac_link"
2489case "(($ac_try" in
2490  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2491  *) ac_try_echo=$ac_try;;
2492esac
2493eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2494$as_echo "$ac_try_echo"; } >&5
2495  (eval "$ac_link") 2>conftest.err
2496  ac_status=$?
2497  if test -s conftest.err; then
2498    grep -v '^ *+' conftest.err >conftest.er1
2499    cat conftest.er1 >&5
2500    mv -f conftest.er1 conftest.err
2501  fi
2502  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2503  test $ac_status = 0; } && {
2504	 test -z "$ac_cxx_werror_flag" ||
2505	 test ! -s conftest.err
2506       } && test -s conftest$ac_exeext && {
2507	 test "$cross_compiling" = yes ||
2508	 test -x conftest$ac_exeext
2509       }; then :
2510  ac_retval=0
2511else
2512  $as_echo "$as_me: failed program was:" >&5
2513sed 's/^/| /' conftest.$ac_ext >&5
2514
2515	ac_retval=1
2516fi
2517  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2518  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2519  # interfere with the next link command; also delete a directory that is
2520  # left behind by Apple's compiler.  We do this before executing the actions.
2521  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2522  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2523  as_fn_set_status $ac_retval
2524
2525} # ac_fn_cxx_try_link
2526
2527# ac_fn_cxx_check_func LINENO FUNC VAR
2528# ------------------------------------
2529# Tests whether FUNC exists, setting the cache variable VAR accordingly
2530ac_fn_cxx_check_func ()
2531{
2532  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2533  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2534$as_echo_n "checking for $2... " >&6; }
2535if eval \${$3+:} false; then :
2536  $as_echo_n "(cached) " >&6
2537else
2538  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2539/* end confdefs.h.  */
2540/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2541   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2542#define $2 innocuous_$2
2543
2544/* System header to define __stub macros and hopefully few prototypes,
2545    which can conflict with char $2 (); below.
2546    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2547    <limits.h> exists even on freestanding compilers.  */
2548
2549#ifdef __STDC__
2550# include <limits.h>
2551#else
2552# include <assert.h>
2553#endif
2554
2555#undef $2
2556
2557/* Override any GCC internal prototype to avoid an error.
2558   Use char because int might match the return type of a GCC
2559   builtin and then its argument prototype would still apply.  */
2560#ifdef __cplusplus
2561extern "C"
2562#endif
2563char $2 ();
2564/* The GNU C library defines this for functions which it implements
2565    to always fail with ENOSYS.  Some functions are actually named
2566    something starting with __ and the normal name is an alias.  */
2567#if defined __stub_$2 || defined __stub___$2
2568choke me
2569#endif
2570
2571int
2572main ()
2573{
2574return $2 ();
2575  ;
2576  return 0;
2577}
2578_ACEOF
2579if ac_fn_cxx_try_link "$LINENO"; then :
2580  eval "$3=yes"
2581else
2582  eval "$3=no"
2583fi
2584rm -f core conftest.err conftest.$ac_objext \
2585    conftest$ac_exeext conftest.$ac_ext
2586fi
2587eval ac_res=\$$3
2588	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2589$as_echo "$ac_res" >&6; }
2590  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2591
2592} # ac_fn_cxx_check_func
2593
2594# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2595# -------------------------------------------------------
2596# Tests whether HEADER exists and can be compiled using the include files in
2597# INCLUDES, setting the cache variable VAR accordingly.
2598ac_fn_c_check_header_compile ()
2599{
2600  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2601  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2602$as_echo_n "checking for $2... " >&6; }
2603if eval \${$3+:} false; then :
2604  $as_echo_n "(cached) " >&6
2605else
2606  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2607/* end confdefs.h.  */
2608$4
2609#include <$2>
2610_ACEOF
2611if ac_fn_c_try_compile "$LINENO"; then :
2612  eval "$3=yes"
2613else
2614  eval "$3=no"
2615fi
2616rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2617fi
2618eval ac_res=\$$3
2619	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2620$as_echo "$ac_res" >&6; }
2621  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2622
2623} # ac_fn_c_check_header_compile
2624cat >config.log <<_ACEOF
2625This file contains any messages produced by compilers while
2626running configure, to aid debugging if configure makes a mistake.
2627
2628It was created by OpenJDK $as_me jdk8, which was
2629generated by GNU Autoconf 2.69.  Invocation command line was
2630
2631  $ $0 $@
2632
2633_ACEOF
2634exec 5>>config.log
2635{
2636cat <<_ASUNAME
2637## --------- ##
2638## Platform. ##
2639## --------- ##
2640
2641hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2642uname -m = `(uname -m) 2>/dev/null || echo unknown`
2643uname -r = `(uname -r) 2>/dev/null || echo unknown`
2644uname -s = `(uname -s) 2>/dev/null || echo unknown`
2645uname -v = `(uname -v) 2>/dev/null || echo unknown`
2646
2647/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2648/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2649
2650/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2651/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2652/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2653/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2654/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2655/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2656/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2657
2658_ASUNAME
2659
2660as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2661for as_dir in $PATH
2662do
2663  IFS=$as_save_IFS
2664  test -z "$as_dir" && as_dir=.
2665    $as_echo "PATH: $as_dir"
2666  done
2667IFS=$as_save_IFS
2668
2669} >&5
2670
2671cat >&5 <<_ACEOF
2672
2673
2674## ----------- ##
2675## Core tests. ##
2676## ----------- ##
2677
2678_ACEOF
2679
2680
2681# Keep a trace of the command line.
2682# Strip out --no-create and --no-recursion so they do not pile up.
2683# Strip out --silent because we don't want to record it for future runs.
2684# Also quote any args containing shell meta-characters.
2685# Make two passes to allow for proper duplicate-argument suppression.
2686ac_configure_args=
2687ac_configure_args0=
2688ac_configure_args1=
2689ac_must_keep_next=false
2690for ac_pass in 1 2
2691do
2692  for ac_arg
2693  do
2694    case $ac_arg in
2695    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2696    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2697    | -silent | --silent | --silen | --sile | --sil)
2698      continue ;;
2699    *\'*)
2700      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2701    esac
2702    case $ac_pass in
2703    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2704    2)
2705      as_fn_append ac_configure_args1 " '$ac_arg'"
2706      if test $ac_must_keep_next = true; then
2707	ac_must_keep_next=false # Got value, back to normal.
2708      else
2709	case $ac_arg in
2710	  *=* | --config-cache | -C | -disable-* | --disable-* \
2711	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2712	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2713	  | -with-* | --with-* | -without-* | --without-* | --x)
2714	    case "$ac_configure_args0 " in
2715	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2716	    esac
2717	    ;;
2718	  -* ) ac_must_keep_next=true ;;
2719	esac
2720      fi
2721      as_fn_append ac_configure_args " '$ac_arg'"
2722      ;;
2723    esac
2724  done
2725done
2726{ ac_configure_args0=; unset ac_configure_args0;}
2727{ ac_configure_args1=; unset ac_configure_args1;}
2728
2729# When interrupted or exit'd, cleanup temporary files, and complete
2730# config.log.  We remove comments because anyway the quotes in there
2731# would cause problems or look ugly.
2732# WARNING: Use '\'' to represent an apostrophe within the trap.
2733# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2734trap 'exit_status=$?
2735  # Save into config.log some information that might help in debugging.
2736  {
2737    echo
2738
2739    $as_echo "## ---------------- ##
2740## Cache variables. ##
2741## ---------------- ##"
2742    echo
2743    # The following way of writing the cache mishandles newlines in values,
2744(
2745  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2746    eval ac_val=\$$ac_var
2747    case $ac_val in #(
2748    *${as_nl}*)
2749      case $ac_var in #(
2750      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2751$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2752      esac
2753      case $ac_var in #(
2754      _ | IFS | as_nl) ;; #(
2755      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2756      *) { eval $ac_var=; unset $ac_var;} ;;
2757      esac ;;
2758    esac
2759  done
2760  (set) 2>&1 |
2761    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2762    *${as_nl}ac_space=\ *)
2763      sed -n \
2764	"s/'\''/'\''\\\\'\'''\''/g;
2765	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2766      ;; #(
2767    *)
2768      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2769      ;;
2770    esac |
2771    sort
2772)
2773    echo
2774
2775    $as_echo "## ----------------- ##
2776## Output variables. ##
2777## ----------------- ##"
2778    echo
2779    for ac_var in $ac_subst_vars
2780    do
2781      eval ac_val=\$$ac_var
2782      case $ac_val in
2783      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2784      esac
2785      $as_echo "$ac_var='\''$ac_val'\''"
2786    done | sort
2787    echo
2788
2789    if test -n "$ac_subst_files"; then
2790      $as_echo "## ------------------- ##
2791## File substitutions. ##
2792## ------------------- ##"
2793      echo
2794      for ac_var in $ac_subst_files
2795      do
2796	eval ac_val=\$$ac_var
2797	case $ac_val in
2798	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2799	esac
2800	$as_echo "$ac_var='\''$ac_val'\''"
2801      done | sort
2802      echo
2803    fi
2804
2805    if test -s confdefs.h; then
2806      $as_echo "## ----------- ##
2807## confdefs.h. ##
2808## ----------- ##"
2809      echo
2810      cat confdefs.h
2811      echo
2812    fi
2813    test "$ac_signal" != 0 &&
2814      $as_echo "$as_me: caught signal $ac_signal"
2815    $as_echo "$as_me: exit $exit_status"
2816  } >&5
2817  rm -f core *.core core.conftest.* &&
2818    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2819    exit $exit_status
2820' 0
2821for ac_signal in 1 2 13 15; do
2822  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2823done
2824ac_signal=0
2825
2826# confdefs.h avoids OS command line length limits that DEFS can exceed.
2827rm -f -r conftest* confdefs.h
2828
2829$as_echo "/* confdefs.h */" > confdefs.h
2830
2831# Predefined preprocessor variables.
2832
2833cat >>confdefs.h <<_ACEOF
2834#define PACKAGE_NAME "$PACKAGE_NAME"
2835_ACEOF
2836
2837cat >>confdefs.h <<_ACEOF
2838#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2839_ACEOF
2840
2841cat >>confdefs.h <<_ACEOF
2842#define PACKAGE_VERSION "$PACKAGE_VERSION"
2843_ACEOF
2844
2845cat >>confdefs.h <<_ACEOF
2846#define PACKAGE_STRING "$PACKAGE_STRING"
2847_ACEOF
2848
2849cat >>confdefs.h <<_ACEOF
2850#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2851_ACEOF
2852
2853cat >>confdefs.h <<_ACEOF
2854#define PACKAGE_URL "$PACKAGE_URL"
2855_ACEOF
2856
2857
2858# Let the site file select an alternate cache file if it wants to.
2859# Prefer an explicitly selected file to automatically selected ones.
2860ac_site_file1=NONE
2861ac_site_file2=NONE
2862if test -n "$CONFIG_SITE"; then
2863  # We do not want a PATH search for config.site.
2864  case $CONFIG_SITE in #((
2865    -*)  ac_site_file1=./$CONFIG_SITE;;
2866    */*) ac_site_file1=$CONFIG_SITE;;
2867    *)   ac_site_file1=./$CONFIG_SITE;;
2868  esac
2869elif test "x$prefix" != xNONE; then
2870  ac_site_file1=$prefix/share/config.site
2871  ac_site_file2=$prefix/etc/config.site
2872else
2873  ac_site_file1=$ac_default_prefix/share/config.site
2874  ac_site_file2=$ac_default_prefix/etc/config.site
2875fi
2876for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2877do
2878  test "x$ac_site_file" = xNONE && continue
2879  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2880    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2881$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2882    sed 's/^/| /' "$ac_site_file" >&5
2883    . "$ac_site_file" \
2884      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2885$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2886as_fn_error $? "failed to load site script $ac_site_file
2887See \`config.log' for more details" "$LINENO" 5; }
2888  fi
2889done
2890
2891if test -r "$cache_file"; then
2892  # Some versions of bash will fail to source /dev/null (special files
2893  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2894  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2895    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2896$as_echo "$as_me: loading cache $cache_file" >&6;}
2897    case $cache_file in
2898      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2899      *)                      . "./$cache_file";;
2900    esac
2901  fi
2902else
2903  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2904$as_echo "$as_me: creating cache $cache_file" >&6;}
2905  >$cache_file
2906fi
2907
2908# Check that the precious variables saved in the cache have kept the same
2909# value.
2910ac_cache_corrupted=false
2911for ac_var in $ac_precious_vars; do
2912  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2913  eval ac_new_set=\$ac_env_${ac_var}_set
2914  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2915  eval ac_new_val=\$ac_env_${ac_var}_value
2916  case $ac_old_set,$ac_new_set in
2917    set,)
2918      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2919$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2920      ac_cache_corrupted=: ;;
2921    ,set)
2922      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2923$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2924      ac_cache_corrupted=: ;;
2925    ,);;
2926    *)
2927      if test "x$ac_old_val" != "x$ac_new_val"; then
2928	# differences in whitespace do not lead to failure.
2929	ac_old_val_w=`echo x $ac_old_val`
2930	ac_new_val_w=`echo x $ac_new_val`
2931	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2932	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2933$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2934	  ac_cache_corrupted=:
2935	else
2936	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2937$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2938	  eval $ac_var=\$ac_old_val
2939	fi
2940	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2941$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2942	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2943$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2944      fi;;
2945  esac
2946  # Pass precious variables to config.status.
2947  if test "$ac_new_set" = set; then
2948    case $ac_new_val in
2949    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2950    *) ac_arg=$ac_var=$ac_new_val ;;
2951    esac
2952    case " $ac_configure_args " in
2953      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2954      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2955    esac
2956  fi
2957done
2958if $ac_cache_corrupted; then
2959  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2960$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2961  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2962$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2963  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2964fi
2965## -------------------- ##
2966## Main body of script. ##
2967## -------------------- ##
2968
2969ac_ext=c
2970ac_cpp='$CPP $CPPFLAGS'
2971ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2972ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2973ac_compiler_gnu=$ac_cv_c_compiler_gnu
2974
2975
2976
2977ac_aux_dir=
2978for ac_dir in build-aux "$srcdir"/build-aux; do
2979  if test -f "$ac_dir/install-sh"; then
2980    ac_aux_dir=$ac_dir
2981    ac_install_sh="$ac_aux_dir/install-sh -c"
2982    break
2983  elif test -f "$ac_dir/install.sh"; then
2984    ac_aux_dir=$ac_dir
2985    ac_install_sh="$ac_aux_dir/install.sh -c"
2986    break
2987  elif test -f "$ac_dir/shtool"; then
2988    ac_aux_dir=$ac_dir
2989    ac_install_sh="$ac_aux_dir/shtool install -c"
2990    break
2991  fi
2992done
2993if test -z "$ac_aux_dir"; then
2994  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2995fi
2996
2997# These three variables are undocumented and unsupported,
2998# and are intended to be withdrawn in a future Autoconf release.
2999# They can cause serious problems if a builder's source tree is in a directory
3000# whose full name contains unusual characters.
3001ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3002ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3003ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3004
3005
3006# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3007
3008#
3009# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3010# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3011#
3012# This code is free software; you can redistribute it and/or modify it
3013# under the terms of the GNU General Public License version 2 only, as
3014# published by the Free Software Foundation.  Oracle designates this
3015# particular file as subject to the "Classpath" exception as provided
3016# by Oracle in the LICENSE file that accompanied this code.
3017#
3018# This code is distributed in the hope that it will be useful, but WITHOUT
3019# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3020# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3021# version 2 for more details (a copy is included in the LICENSE file that
3022# accompanied this code).
3023#
3024# You should have received a copy of the GNU General Public License version
3025# 2 along with this work; if not, write to the Free Software Foundation,
3026# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3027#
3028# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3029# or visit www.oracle.com if you need additional information or have any
3030# questions.
3031#
3032
3033#
3034# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3035#
3036# This program is free software; you can redistribute it and/or modify
3037# it under the terms of the GNU General Public License as published by
3038# the Free Software Foundation; either version 2 of the License, or
3039# (at your option) any later version.
3040#
3041# This program is distributed in the hope that it will be useful, but
3042# WITHOUT ANY WARRANTY; without even the implied warranty of
3043# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3044# General Public License for more details.
3045#
3046# You should have received a copy of the GNU General Public License
3047# along with this program; if not, write to the Free Software
3048# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3049#
3050# As a special exception to the GNU General Public License, if you
3051# distribute this file as part of a program that contains a
3052# configuration script generated by Autoconf, you may include it under
3053# the same distribution terms that you use for the rest of that program.
3054
3055# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3056# ----------------------------------
3057# PKG_PROG_PKG_CONFIG
3058
3059# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3060#
3061# Check to see whether a particular set of modules exists.  Similar
3062# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3063#
3064#
3065# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3066# this or PKG_CHECK_MODULES is called, or make sure to call
3067# PKG_CHECK_EXISTS manually
3068# --------------------------------------------------------------
3069
3070
3071
3072# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3073# ---------------------------------------------
3074# _PKG_CONFIG
3075
3076# _PKG_SHORT_ERRORS_SUPPORTED
3077# -----------------------------
3078# _PKG_SHORT_ERRORS_SUPPORTED
3079
3080
3081# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3082# [ACTION-IF-NOT-FOUND])
3083#
3084#
3085# Note that if there is a possibility the first call to
3086# PKG_CHECK_MODULES might not happen, you should be sure to include an
3087# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3088#
3089#
3090# --------------------------------------------------------------
3091# PKG_CHECK_MODULES
3092
3093
3094# Include these first...
3095#
3096# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3097# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3098#
3099# This code is free software; you can redistribute it and/or modify it
3100# under the terms of the GNU General Public License version 2 only, as
3101# published by the Free Software Foundation.  Oracle designates this
3102# particular file as subject to the "Classpath" exception as provided
3103# by Oracle in the LICENSE file that accompanied this code.
3104#
3105# This code is distributed in the hope that it will be useful, but WITHOUT
3106# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3107# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3108# version 2 for more details (a copy is included in the LICENSE file that
3109# accompanied this code).
3110#
3111# You should have received a copy of the GNU General Public License version
3112# 2 along with this work; if not, write to the Free Software Foundation,
3113# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3114#
3115# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3116# or visit www.oracle.com if you need additional information or have any
3117# questions.
3118#
3119
3120# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3121# If so, then append $1 to $2\
3122# Also set JVM_ARG_OK to true/false depending on outcome.
3123
3124
3125# Appends a string to a path variable, only adding the : when needed.
3126
3127
3128# This will make sure the given variable points to a full and proper
3129# path. This means:
3130# 1) There will be no spaces in the path. On posix platforms,
3131#    spaces in the path will result in an error. On Windows,
3132#    the path will be rewritten using short-style to be space-free.
3133# 2) The path will be absolute, and it will be in unix-style (on
3134#     cygwin).
3135# $1: The name of the variable to fix
3136
3137
3138# This will make sure the given variable points to a executable
3139# with a full and proper path. This means:
3140# 1) There will be no spaces in the path. On posix platforms,
3141#    spaces in the path will result in an error. On Windows,
3142#    the path will be rewritten using short-style to be space-free.
3143# 2) The path will be absolute, and it will be in unix-style (on
3144#     cygwin).
3145# Any arguments given to the executable is preserved.
3146# If the input variable does not have a directory specification, then
3147# it need to be in the PATH.
3148# $1: The name of the variable to fix
3149
3150
3151
3152
3153
3154
3155# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3156# $1: variable to check
3157# $2: executable name to print in warning (optional)
3158
3159
3160# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3161# Arguments as AC_PATH_PROG:
3162# $1: variable to set
3163# $2: executable name to look for
3164
3165
3166# Setup the most fundamental tools that relies on not much else to set up,
3167# but is used by much of the early bootstrap code.
3168
3169
3170# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3171
3172
3173
3174
3175
3176
3177
3178#%%% Simple tools %%%
3179
3180# Check if we have found a usable version of make
3181# $1: the path to a potential make binary (or empty)
3182# $2: the description on how we found this
3183
3184
3185# Goes looking for a usable version of GNU make.
3186
3187
3188
3189
3190
3191
3192# Check if build directory is on local disk. If not possible to determine,
3193# we prefer to claim it's local.
3194# Argument 1: directory to test
3195# Argument 2: what to do if it is on local disk
3196# Argument 3: what to do otherwise (remote disk or failure)
3197
3198
3199# Check that source files have basic read permissions set. This might
3200# not be the case in cygwin in certain conditions.
3201
3202
3203
3204
3205#
3206# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3207# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3208#
3209# This code is free software; you can redistribute it and/or modify it
3210# under the terms of the GNU General Public License version 2 only, as
3211# published by the Free Software Foundation.  Oracle designates this
3212# particular file as subject to the "Classpath" exception as provided
3213# by Oracle in the LICENSE file that accompanied this code.
3214#
3215# This code is distributed in the hope that it will be useful, but WITHOUT
3216# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3217# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3218# version 2 for more details (a copy is included in the LICENSE file that
3219# accompanied this code).
3220#
3221# You should have received a copy of the GNU General Public License version
3222# 2 along with this work; if not, write to the Free Software Foundation,
3223# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3224#
3225# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3226# or visit www.oracle.com if you need additional information or have any
3227# questions.
3228#
3229
3230
3231
3232
3233
3234# Helper function which possibly converts a path using DOS-style short mode.
3235# If so, the updated path is stored in $new_path.
3236# $1: The path to check
3237
3238
3239# Helper function which possibly converts a path using DOS-style short mode.
3240# If so, the updated path is stored in $new_path.
3241# $1: The path to check
3242
3243
3244# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3245# and could probably be heavily simplified. However, all changes in this
3246# area tend to need lot of testing in different scenarios, and in lack of
3247# proper unit testing, cleaning this up has not been deemed worth the effort
3248# at the moment.
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3259
3260
3261
3262
3263#
3264# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3265# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3266#
3267# This code is free software; you can redistribute it and/or modify it
3268# under the terms of the GNU General Public License version 2 only, as
3269# published by the Free Software Foundation.  Oracle designates this
3270# particular file as subject to the "Classpath" exception as provided
3271# by Oracle in the LICENSE file that accompanied this code.
3272#
3273# This code is distributed in the hope that it will be useful, but WITHOUT
3274# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3275# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3276# version 2 for more details (a copy is included in the LICENSE file that
3277# accompanied this code).
3278#
3279# You should have received a copy of the GNU General Public License version
3280# 2 along with this work; if not, write to the Free Software Foundation,
3281# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3282#
3283# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3284# or visit www.oracle.com if you need additional information or have any
3285# questions.
3286#
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298# ... then the rest
3299#
3300# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3301# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3302#
3303# This code is free software; you can redistribute it and/or modify it
3304# under the terms of the GNU General Public License version 2 only, as
3305# published by the Free Software Foundation.  Oracle designates this
3306# particular file as subject to the "Classpath" exception as provided
3307# by Oracle in the LICENSE file that accompanied this code.
3308#
3309# This code is distributed in the hope that it will be useful, but WITHOUT
3310# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3311# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3312# version 2 for more details (a copy is included in the LICENSE file that
3313# accompanied this code).
3314#
3315# You should have received a copy of the GNU General Public License version
3316# 2 along with this work; if not, write to the Free Software Foundation,
3317# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3318#
3319# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3320# or visit www.oracle.com if you need additional information or have any
3321# questions.
3322#
3323
3324# Execute the check given as argument, and verify the result
3325# If the Boot JDK was previously found, do nothing
3326# $1 A command line (typically autoconf macro) to execute
3327
3328
3329# Test: Is bootjdk explicitely set by command line arguments?
3330
3331
3332# Test: Is bootjdk available from builddeps?
3333
3334
3335# Test: Is $JAVA_HOME set?
3336
3337
3338# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3339
3340
3341# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3342
3343
3344# Look for a jdk in the given path. If there are multiple, try to select the newest.
3345# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3346# $1 = Path to directory containing jdk installations.
3347# $2 = String to append to the found JDK directory to get the proper JDK home
3348
3349
3350# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3351# environmental variable as base for where to look.
3352# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3353
3354
3355# Test: Is there a JDK installed in default, well-known locations?
3356
3357
3358# Check that a command-line tool in the Boot JDK is correct
3359# $1 = name of variable to assign
3360# $2 = name of binary
3361
3362
3363###############################################################################
3364#
3365# We need a Boot JDK to bootstrap the build.
3366#
3367
3368
3369
3370
3371
3372#
3373# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3374# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3375#
3376# This code is free software; you can redistribute it and/or modify it
3377# under the terms of the GNU General Public License version 2 only, as
3378# published by the Free Software Foundation.  Oracle designates this
3379# particular file as subject to the "Classpath" exception as provided
3380# by Oracle in the LICENSE file that accompanied this code.
3381#
3382# This code is distributed in the hope that it will be useful, but WITHOUT
3383# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3384# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3385# version 2 for more details (a copy is included in the LICENSE file that
3386# accompanied this code).
3387#
3388# You should have received a copy of the GNU General Public License version
3389# 2 along with this work; if not, write to the Free Software Foundation,
3390# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3391#
3392# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3393# or visit www.oracle.com if you need additional information or have any
3394# questions.
3395#
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416#
3417# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3418# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3419#
3420# This code is free software; you can redistribute it and/or modify it
3421# under the terms of the GNU General Public License version 2 only, as
3422# published by the Free Software Foundation.  Oracle designates this
3423# particular file as subject to the "Classpath" exception as provided
3424# by Oracle in the LICENSE file that accompanied this code.
3425#
3426# This code is distributed in the hope that it will be useful, but WITHOUT
3427# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3428# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3429# version 2 for more details (a copy is included in the LICENSE file that
3430# accompanied this code).
3431#
3432# You should have received a copy of the GNU General Public License version
3433# 2 along with this work; if not, write to the Free Software Foundation,
3434# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3435#
3436# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3437# or visit www.oracle.com if you need additional information or have any
3438# questions.
3439#
3440
3441
3442
3443
3444
3445cygwin_help() {
3446    case $1 in
3447    unzip)
3448        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3449    zip)
3450        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3451    make)
3452        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3453    esac
3454}
3455
3456apt_help() {
3457    case $1 in
3458    devkit)
3459        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3460    openjdk)
3461        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3462    alsa)
3463        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3464    cups)
3465        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3466    freetype2)
3467        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3468    pulse)
3469        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3470    x11)
3471        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3472    ccache)
3473        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3474    esac
3475}
3476
3477yum_help() {
3478    case $1 in
3479    devkit)
3480        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3481    openjdk)
3482        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3483    alsa)
3484        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3485    cups)
3486        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3487    freetype2)
3488        PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3489    pulse)
3490        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3491    x11)
3492        PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
3493    ccache)
3494        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3495    esac
3496}
3497
3498port_help() {
3499    PKGHANDLER_COMMAND=""
3500}
3501
3502pkgutil_help() {
3503    PKGHANDLER_COMMAND=""
3504}
3505
3506pkgadd_help() {
3507    PKGHANDLER_COMMAND=""
3508}
3509
3510
3511
3512#
3513# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3514# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3515#
3516# This code is free software; you can redistribute it and/or modify it
3517# under the terms of the GNU General Public License version 2 only, as
3518# published by the Free Software Foundation.  Oracle designates this
3519# particular file as subject to the "Classpath" exception as provided
3520# by Oracle in the LICENSE file that accompanied this code.
3521#
3522# This code is distributed in the hope that it will be useful, but WITHOUT
3523# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3524# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3525# version 2 for more details (a copy is included in the LICENSE file that
3526# accompanied this code).
3527#
3528# You should have received a copy of the GNU General Public License version
3529# 2 along with this work; if not, write to the Free Software Foundation,
3530# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3531#
3532# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3533# or visit www.oracle.com if you need additional information or have any
3534# questions.
3535#
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546###############################################################################
3547#
3548# Should we build only OpenJDK even if closed sources are present?
3549#
3550
3551
3552
3553
3554###############################################################################
3555#
3556# Setup version numbers
3557#
3558
3559
3560
3561
3562
3563
3564# Support for customization of the build process. Some build files
3565# will include counterparts from this location, if they exist. This allows
3566# for a degree of customization of the build targets and the rules/recipes
3567# to create them
3568
3569# Check whether --with-custom-make-dir was given.
3570if test "${with_custom_make_dir+set}" = set; then :
3571  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3572fi
3573
3574
3575
3576#
3577# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3578# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3579#
3580# This code is free software; you can redistribute it and/or modify it
3581# under the terms of the GNU General Public License version 2 only, as
3582# published by the Free Software Foundation.  Oracle designates this
3583# particular file as subject to the "Classpath" exception as provided
3584# by Oracle in the LICENSE file that accompanied this code.
3585#
3586# This code is distributed in the hope that it will be useful, but WITHOUT
3587# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3588# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3589# version 2 for more details (a copy is included in the LICENSE file that
3590# accompanied this code).
3591#
3592# You should have received a copy of the GNU General Public License version
3593# 2 along with this work; if not, write to the Free Software Foundation,
3594# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3595#
3596# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3597# or visit www.oracle.com if you need additional information or have any
3598# questions.
3599#
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615#
3616# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3617# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3618#
3619# This code is free software; you can redistribute it and/or modify it
3620# under the terms of the GNU General Public License version 2 only, as
3621# published by the Free Software Foundation.  Oracle designates this
3622# particular file as subject to the "Classpath" exception as provided
3623# by Oracle in the LICENSE file that accompanied this code.
3624#
3625# This code is distributed in the hope that it will be useful, but WITHOUT
3626# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3627# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3628# version 2 for more details (a copy is included in the LICENSE file that
3629# accompanied this code).
3630#
3631# You should have received a copy of the GNU General Public License version
3632# 2 along with this work; if not, write to the Free Software Foundation,
3633# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3634#
3635# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3636# or visit www.oracle.com if you need additional information or have any
3637# questions.
3638#
3639
3640# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3641# Converts autoconf style CPU name to OpenJDK style, into
3642# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3643
3644
3645# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3646# Converts autoconf style OS name to OpenJDK style, into
3647# VAR_OS and VAR_OS_API.
3648
3649
3650# Expects $host_os $host_cpu $build_os and $build_cpu
3651# and $with_target_bits to have been setup!
3652#
3653# Translate the standard triplet(quadruplet) definition
3654# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3655# OPENJDK_BUILD_OS, etc.
3656
3657
3658# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3659# accordingly. Must be done after setting up build and target system, but before
3660# doing anything else with these values.
3661
3662
3663    # Setup the legacy variables, for controlling the old makefiles.
3664    #
3665
3666
3667
3668
3669#%%% Build and target systems %%%
3670
3671
3672
3673
3674# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3675# Add -mX to various FLAGS variables.
3676
3677
3678
3679
3680
3681
3682#
3683# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3684# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3685#
3686# This code is free software; you can redistribute it and/or modify it
3687# under the terms of the GNU General Public License version 2 only, as
3688# published by the Free Software Foundation.  Oracle designates this
3689# particular file as subject to the "Classpath" exception as provided
3690# by Oracle in the LICENSE file that accompanied this code.
3691#
3692# This code is distributed in the hope that it will be useful, but WITHOUT
3693# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3694# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3695# version 2 for more details (a copy is included in the LICENSE file that
3696# accompanied this code).
3697#
3698# You should have received a copy of the GNU General Public License version
3699# 2 along with this work; if not, write to the Free Software Foundation,
3700# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3701#
3702# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3703# or visit www.oracle.com if you need additional information or have any
3704# questions.
3705#
3706
3707
3708
3709
3710
3711
3712
3713
3714#
3715# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3716# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3717#
3718# This code is free software; you can redistribute it and/or modify it
3719# under the terms of the GNU General Public License version 2 only, as
3720# published by the Free Software Foundation.  Oracle designates this
3721# particular file as subject to the "Classpath" exception as provided
3722# by Oracle in the LICENSE file that accompanied this code.
3723#
3724# This code is distributed in the hope that it will be useful, but WITHOUT
3725# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3726# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3727# version 2 for more details (a copy is included in the LICENSE file that
3728# accompanied this code).
3729#
3730# You should have received a copy of the GNU General Public License version
3731# 2 along with this work; if not, write to the Free Software Foundation,
3732# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3733#
3734# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3735# or visit www.oracle.com if you need additional information or have any
3736# questions.
3737#
3738
3739# $1 = compiler to test (CC or CXX)
3740# $2 = human readable name of compiler (C or C++)
3741
3742
3743
3744
3745
3746# $1 = compiler to test (CC or CXX)
3747# $2 = human readable name of compiler (C or C++)
3748# $3 = list of compiler names to search for
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762# TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3763#                                   [RUN-IF-FALSE])
3764# ------------------------------------------------------------
3765# Check that the c and c++ compilers support an argument
3766
3767
3768
3769
3770# Setup the JTREG paths
3771
3772
3773#
3774# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3775# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3776#
3777# This code is free software; you can redistribute it and/or modify it
3778# under the terms of the GNU General Public License version 2 only, as
3779# published by the Free Software Foundation.  Oracle designates this
3780# particular file as subject to the "Classpath" exception as provided
3781# by Oracle in the LICENSE file that accompanied this code.
3782#
3783# This code is distributed in the hope that it will be useful, but WITHOUT
3784# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3785# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3786# version 2 for more details (a copy is included in the LICENSE file that
3787# accompanied this code).
3788#
3789# You should have received a copy of the GNU General Public License version
3790# 2 along with this work; if not, write to the Free Software Foundation,
3791# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3792#
3793# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3794# or visit www.oracle.com if you need additional information or have any
3795# questions.
3796#
3797
3798
3799
3800
3801
3802
3803
3804# Check if the VS env variables were setup prior to running configure.
3805# If not, then find vcvarsall.bat and run it automatically, and integrate
3806# the set env variables into the spec file.
3807
3808
3809
3810# Setup the DXSDK paths
3811
3812
3813
3814
3815
3816
3817# This line needs to be here, verbatim, after all includes and the dummy hook
3818# definitions. It is replaced with custom functionality when building
3819# custom sources.
3820#CUSTOM_AUTOCONF_INCLUDE
3821
3822# Do not change or remove the following line, it is needed for consistency checks:
3823DATE_WHEN_GENERATED=1379014108
3824
3825###############################################################################
3826#
3827# Initialization / Boot-strapping
3828#
3829# The bootstrapping process needs to solve the "chicken or the egg" problem,
3830# thus it jumps back and forth, each time gaining something needed later on.
3831#
3832###############################################################################
3833
3834# Basic initialization that must happen first of all
3835
3836# Save the original command line. This is passed to us by the wrapper configure script.
3837
3838DATE_WHEN_CONFIGURED=`LANG=C date`
3839
3840{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3841$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3842{ $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3843$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3844
3845
3846
3847# Start with tools that do not need have cross compilation support
3848# and can be expected to be found in the default PATH. These tools are
3849# used by configure. Nor are these tools expected to be found in the
3850# devkit from the builddeps server either, since they are
3851# needed to download the devkit.
3852
3853# First are all the simple required tools.
3854
3855    for ac_prog in basename
3856do
3857  # Extract the first word of "$ac_prog", so it can be a program name with args.
3858set dummy $ac_prog; ac_word=$2
3859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3860$as_echo_n "checking for $ac_word... " >&6; }
3861if ${ac_cv_path_BASENAME+:} false; then :
3862  $as_echo_n "(cached) " >&6
3863else
3864  case $BASENAME in
3865  [\\/]* | ?:[\\/]*)
3866  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3867  ;;
3868  *)
3869  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3870for as_dir in $PATH
3871do
3872  IFS=$as_save_IFS
3873  test -z "$as_dir" && as_dir=.
3874    for ac_exec_ext in '' $ac_executable_extensions; do
3875  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3876    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3878    break 2
3879  fi
3880done
3881  done
3882IFS=$as_save_IFS
3883
3884  ;;
3885esac
3886fi
3887BASENAME=$ac_cv_path_BASENAME
3888if test -n "$BASENAME"; then
3889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3890$as_echo "$BASENAME" >&6; }
3891else
3892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3893$as_echo "no" >&6; }
3894fi
3895
3896
3897  test -n "$BASENAME" && break
3898done
3899
3900
3901    if test "x$BASENAME" = x; then
3902        if test "xbasename" = x; then
3903          PROG_NAME=basename
3904        else
3905          PROG_NAME=basename
3906        fi
3907        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3908$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3909        as_fn_error $? "Cannot continue" "$LINENO" 5
3910    fi
3911
3912
3913
3914    for ac_prog in bash
3915do
3916  # Extract the first word of "$ac_prog", so it can be a program name with args.
3917set dummy $ac_prog; ac_word=$2
3918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3919$as_echo_n "checking for $ac_word... " >&6; }
3920if ${ac_cv_path_BASH+:} false; then :
3921  $as_echo_n "(cached) " >&6
3922else
3923  case $BASH in
3924  [\\/]* | ?:[\\/]*)
3925  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3926  ;;
3927  *)
3928  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3929for as_dir in $PATH
3930do
3931  IFS=$as_save_IFS
3932  test -z "$as_dir" && as_dir=.
3933    for ac_exec_ext in '' $ac_executable_extensions; do
3934  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3935    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3936    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3937    break 2
3938  fi
3939done
3940  done
3941IFS=$as_save_IFS
3942
3943  ;;
3944esac
3945fi
3946BASH=$ac_cv_path_BASH
3947if test -n "$BASH"; then
3948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3949$as_echo "$BASH" >&6; }
3950else
3951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3952$as_echo "no" >&6; }
3953fi
3954
3955
3956  test -n "$BASH" && break
3957done
3958
3959
3960    if test "x$BASH" = x; then
3961        if test "xbash" = x; then
3962          PROG_NAME=bash
3963        else
3964          PROG_NAME=bash
3965        fi
3966        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3967$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3968        as_fn_error $? "Cannot continue" "$LINENO" 5
3969    fi
3970
3971
3972
3973    for ac_prog in cat
3974do
3975  # Extract the first word of "$ac_prog", so it can be a program name with args.
3976set dummy $ac_prog; ac_word=$2
3977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3978$as_echo_n "checking for $ac_word... " >&6; }
3979if ${ac_cv_path_CAT+:} false; then :
3980  $as_echo_n "(cached) " >&6
3981else
3982  case $CAT in
3983  [\\/]* | ?:[\\/]*)
3984  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3985  ;;
3986  *)
3987  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3988for as_dir in $PATH
3989do
3990  IFS=$as_save_IFS
3991  test -z "$as_dir" && as_dir=.
3992    for ac_exec_ext in '' $ac_executable_extensions; do
3993  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3994    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3995    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3996    break 2
3997  fi
3998done
3999  done
4000IFS=$as_save_IFS
4001
4002  ;;
4003esac
4004fi
4005CAT=$ac_cv_path_CAT
4006if test -n "$CAT"; then
4007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4008$as_echo "$CAT" >&6; }
4009else
4010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4011$as_echo "no" >&6; }
4012fi
4013
4014
4015  test -n "$CAT" && break
4016done
4017
4018
4019    if test "x$CAT" = x; then
4020        if test "xcat" = x; then
4021          PROG_NAME=cat
4022        else
4023          PROG_NAME=cat
4024        fi
4025        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4026$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4027        as_fn_error $? "Cannot continue" "$LINENO" 5
4028    fi
4029
4030
4031
4032    for ac_prog in chmod
4033do
4034  # Extract the first word of "$ac_prog", so it can be a program name with args.
4035set dummy $ac_prog; ac_word=$2
4036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4037$as_echo_n "checking for $ac_word... " >&6; }
4038if ${ac_cv_path_CHMOD+:} false; then :
4039  $as_echo_n "(cached) " >&6
4040else
4041  case $CHMOD in
4042  [\\/]* | ?:[\\/]*)
4043  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4044  ;;
4045  *)
4046  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4047for as_dir in $PATH
4048do
4049  IFS=$as_save_IFS
4050  test -z "$as_dir" && as_dir=.
4051    for ac_exec_ext in '' $ac_executable_extensions; do
4052  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4053    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4054    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4055    break 2
4056  fi
4057done
4058  done
4059IFS=$as_save_IFS
4060
4061  ;;
4062esac
4063fi
4064CHMOD=$ac_cv_path_CHMOD
4065if test -n "$CHMOD"; then
4066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4067$as_echo "$CHMOD" >&6; }
4068else
4069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4070$as_echo "no" >&6; }
4071fi
4072
4073
4074  test -n "$CHMOD" && break
4075done
4076
4077
4078    if test "x$CHMOD" = x; then
4079        if test "xchmod" = x; then
4080          PROG_NAME=chmod
4081        else
4082          PROG_NAME=chmod
4083        fi
4084        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4085$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4086        as_fn_error $? "Cannot continue" "$LINENO" 5
4087    fi
4088
4089
4090
4091    for ac_prog in cmp
4092do
4093  # Extract the first word of "$ac_prog", so it can be a program name with args.
4094set dummy $ac_prog; ac_word=$2
4095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4096$as_echo_n "checking for $ac_word... " >&6; }
4097if ${ac_cv_path_CMP+:} false; then :
4098  $as_echo_n "(cached) " >&6
4099else
4100  case $CMP in
4101  [\\/]* | ?:[\\/]*)
4102  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4103  ;;
4104  *)
4105  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4106for as_dir in $PATH
4107do
4108  IFS=$as_save_IFS
4109  test -z "$as_dir" && as_dir=.
4110    for ac_exec_ext in '' $ac_executable_extensions; do
4111  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4112    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4113    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4114    break 2
4115  fi
4116done
4117  done
4118IFS=$as_save_IFS
4119
4120  ;;
4121esac
4122fi
4123CMP=$ac_cv_path_CMP
4124if test -n "$CMP"; then
4125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4126$as_echo "$CMP" >&6; }
4127else
4128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4129$as_echo "no" >&6; }
4130fi
4131
4132
4133  test -n "$CMP" && break
4134done
4135
4136
4137    if test "x$CMP" = x; then
4138        if test "xcmp" = x; then
4139          PROG_NAME=cmp
4140        else
4141          PROG_NAME=cmp
4142        fi
4143        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4144$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4145        as_fn_error $? "Cannot continue" "$LINENO" 5
4146    fi
4147
4148
4149
4150    for ac_prog in comm
4151do
4152  # Extract the first word of "$ac_prog", so it can be a program name with args.
4153set dummy $ac_prog; ac_word=$2
4154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4155$as_echo_n "checking for $ac_word... " >&6; }
4156if ${ac_cv_path_COMM+:} false; then :
4157  $as_echo_n "(cached) " >&6
4158else
4159  case $COMM in
4160  [\\/]* | ?:[\\/]*)
4161  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4162  ;;
4163  *)
4164  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4165for as_dir in $PATH
4166do
4167  IFS=$as_save_IFS
4168  test -z "$as_dir" && as_dir=.
4169    for ac_exec_ext in '' $ac_executable_extensions; do
4170  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4171    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4173    break 2
4174  fi
4175done
4176  done
4177IFS=$as_save_IFS
4178
4179  ;;
4180esac
4181fi
4182COMM=$ac_cv_path_COMM
4183if test -n "$COMM"; then
4184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4185$as_echo "$COMM" >&6; }
4186else
4187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4188$as_echo "no" >&6; }
4189fi
4190
4191
4192  test -n "$COMM" && break
4193done
4194
4195
4196    if test "x$COMM" = x; then
4197        if test "xcomm" = x; then
4198          PROG_NAME=comm
4199        else
4200          PROG_NAME=comm
4201        fi
4202        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4203$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4204        as_fn_error $? "Cannot continue" "$LINENO" 5
4205    fi
4206
4207
4208
4209    for ac_prog in cp
4210do
4211  # Extract the first word of "$ac_prog", so it can be a program name with args.
4212set dummy $ac_prog; ac_word=$2
4213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4214$as_echo_n "checking for $ac_word... " >&6; }
4215if ${ac_cv_path_CP+:} false; then :
4216  $as_echo_n "(cached) " >&6
4217else
4218  case $CP in
4219  [\\/]* | ?:[\\/]*)
4220  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4221  ;;
4222  *)
4223  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4224for as_dir in $PATH
4225do
4226  IFS=$as_save_IFS
4227  test -z "$as_dir" && as_dir=.
4228    for ac_exec_ext in '' $ac_executable_extensions; do
4229  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4230    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4231    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4232    break 2
4233  fi
4234done
4235  done
4236IFS=$as_save_IFS
4237
4238  ;;
4239esac
4240fi
4241CP=$ac_cv_path_CP
4242if test -n "$CP"; then
4243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4244$as_echo "$CP" >&6; }
4245else
4246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4247$as_echo "no" >&6; }
4248fi
4249
4250
4251  test -n "$CP" && break
4252done
4253
4254
4255    if test "x$CP" = x; then
4256        if test "xcp" = x; then
4257          PROG_NAME=cp
4258        else
4259          PROG_NAME=cp
4260        fi
4261        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4262$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4263        as_fn_error $? "Cannot continue" "$LINENO" 5
4264    fi
4265
4266
4267
4268    for ac_prog in cpio
4269do
4270  # Extract the first word of "$ac_prog", so it can be a program name with args.
4271set dummy $ac_prog; ac_word=$2
4272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4273$as_echo_n "checking for $ac_word... " >&6; }
4274if ${ac_cv_path_CPIO+:} false; then :
4275  $as_echo_n "(cached) " >&6
4276else
4277  case $CPIO in
4278  [\\/]* | ?:[\\/]*)
4279  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4280  ;;
4281  *)
4282  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4283for as_dir in $PATH
4284do
4285  IFS=$as_save_IFS
4286  test -z "$as_dir" && as_dir=.
4287    for ac_exec_ext in '' $ac_executable_extensions; do
4288  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4289    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4290    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4291    break 2
4292  fi
4293done
4294  done
4295IFS=$as_save_IFS
4296
4297  ;;
4298esac
4299fi
4300CPIO=$ac_cv_path_CPIO
4301if test -n "$CPIO"; then
4302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4303$as_echo "$CPIO" >&6; }
4304else
4305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4306$as_echo "no" >&6; }
4307fi
4308
4309
4310  test -n "$CPIO" && break
4311done
4312
4313
4314    if test "x$CPIO" = x; then
4315        if test "xcpio" = x; then
4316          PROG_NAME=cpio
4317        else
4318          PROG_NAME=cpio
4319        fi
4320        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4321$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4322        as_fn_error $? "Cannot continue" "$LINENO" 5
4323    fi
4324
4325
4326
4327    for ac_prog in cut
4328do
4329  # Extract the first word of "$ac_prog", so it can be a program name with args.
4330set dummy $ac_prog; ac_word=$2
4331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4332$as_echo_n "checking for $ac_word... " >&6; }
4333if ${ac_cv_path_CUT+:} false; then :
4334  $as_echo_n "(cached) " >&6
4335else
4336  case $CUT in
4337  [\\/]* | ?:[\\/]*)
4338  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4339  ;;
4340  *)
4341  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4342for as_dir in $PATH
4343do
4344  IFS=$as_save_IFS
4345  test -z "$as_dir" && as_dir=.
4346    for ac_exec_ext in '' $ac_executable_extensions; do
4347  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4348    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4349    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4350    break 2
4351  fi
4352done
4353  done
4354IFS=$as_save_IFS
4355
4356  ;;
4357esac
4358fi
4359CUT=$ac_cv_path_CUT
4360if test -n "$CUT"; then
4361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4362$as_echo "$CUT" >&6; }
4363else
4364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4365$as_echo "no" >&6; }
4366fi
4367
4368
4369  test -n "$CUT" && break
4370done
4371
4372
4373    if test "x$CUT" = x; then
4374        if test "xcut" = x; then
4375          PROG_NAME=cut
4376        else
4377          PROG_NAME=cut
4378        fi
4379        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4380$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4381        as_fn_error $? "Cannot continue" "$LINENO" 5
4382    fi
4383
4384
4385
4386    for ac_prog in date
4387do
4388  # Extract the first word of "$ac_prog", so it can be a program name with args.
4389set dummy $ac_prog; ac_word=$2
4390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4391$as_echo_n "checking for $ac_word... " >&6; }
4392if ${ac_cv_path_DATE+:} false; then :
4393  $as_echo_n "(cached) " >&6
4394else
4395  case $DATE in
4396  [\\/]* | ?:[\\/]*)
4397  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4398  ;;
4399  *)
4400  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4401for as_dir in $PATH
4402do
4403  IFS=$as_save_IFS
4404  test -z "$as_dir" && as_dir=.
4405    for ac_exec_ext in '' $ac_executable_extensions; do
4406  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4407    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4408    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4409    break 2
4410  fi
4411done
4412  done
4413IFS=$as_save_IFS
4414
4415  ;;
4416esac
4417fi
4418DATE=$ac_cv_path_DATE
4419if test -n "$DATE"; then
4420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4421$as_echo "$DATE" >&6; }
4422else
4423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4424$as_echo "no" >&6; }
4425fi
4426
4427
4428  test -n "$DATE" && break
4429done
4430
4431
4432    if test "x$DATE" = x; then
4433        if test "xdate" = x; then
4434          PROG_NAME=date
4435        else
4436          PROG_NAME=date
4437        fi
4438        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4439$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4440        as_fn_error $? "Cannot continue" "$LINENO" 5
4441    fi
4442
4443
4444
4445    for ac_prog in gdiff diff
4446do
4447  # Extract the first word of "$ac_prog", so it can be a program name with args.
4448set dummy $ac_prog; ac_word=$2
4449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4450$as_echo_n "checking for $ac_word... " >&6; }
4451if ${ac_cv_path_DIFF+:} false; then :
4452  $as_echo_n "(cached) " >&6
4453else
4454  case $DIFF in
4455  [\\/]* | ?:[\\/]*)
4456  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4457  ;;
4458  *)
4459  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4460for as_dir in $PATH
4461do
4462  IFS=$as_save_IFS
4463  test -z "$as_dir" && as_dir=.
4464    for ac_exec_ext in '' $ac_executable_extensions; do
4465  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4466    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4467    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4468    break 2
4469  fi
4470done
4471  done
4472IFS=$as_save_IFS
4473
4474  ;;
4475esac
4476fi
4477DIFF=$ac_cv_path_DIFF
4478if test -n "$DIFF"; then
4479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4480$as_echo "$DIFF" >&6; }
4481else
4482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4483$as_echo "no" >&6; }
4484fi
4485
4486
4487  test -n "$DIFF" && break
4488done
4489
4490
4491    if test "x$DIFF" = x; then
4492        if test "xgdiff diff" = x; then
4493          PROG_NAME=diff
4494        else
4495          PROG_NAME=gdiff diff
4496        fi
4497        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4498$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4499        as_fn_error $? "Cannot continue" "$LINENO" 5
4500    fi
4501
4502
4503
4504    for ac_prog in dirname
4505do
4506  # Extract the first word of "$ac_prog", so it can be a program name with args.
4507set dummy $ac_prog; ac_word=$2
4508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4509$as_echo_n "checking for $ac_word... " >&6; }
4510if ${ac_cv_path_DIRNAME+:} false; then :
4511  $as_echo_n "(cached) " >&6
4512else
4513  case $DIRNAME in
4514  [\\/]* | ?:[\\/]*)
4515  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4516  ;;
4517  *)
4518  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4519for as_dir in $PATH
4520do
4521  IFS=$as_save_IFS
4522  test -z "$as_dir" && as_dir=.
4523    for ac_exec_ext in '' $ac_executable_extensions; do
4524  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4525    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4527    break 2
4528  fi
4529done
4530  done
4531IFS=$as_save_IFS
4532
4533  ;;
4534esac
4535fi
4536DIRNAME=$ac_cv_path_DIRNAME
4537if test -n "$DIRNAME"; then
4538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4539$as_echo "$DIRNAME" >&6; }
4540else
4541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4542$as_echo "no" >&6; }
4543fi
4544
4545
4546  test -n "$DIRNAME" && break
4547done
4548
4549
4550    if test "x$DIRNAME" = x; then
4551        if test "xdirname" = x; then
4552          PROG_NAME=dirname
4553        else
4554          PROG_NAME=dirname
4555        fi
4556        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4557$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4558        as_fn_error $? "Cannot continue" "$LINENO" 5
4559    fi
4560
4561
4562
4563    for ac_prog in echo
4564do
4565  # Extract the first word of "$ac_prog", so it can be a program name with args.
4566set dummy $ac_prog; ac_word=$2
4567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4568$as_echo_n "checking for $ac_word... " >&6; }
4569if ${ac_cv_path_ECHO+:} false; then :
4570  $as_echo_n "(cached) " >&6
4571else
4572  case $ECHO in
4573  [\\/]* | ?:[\\/]*)
4574  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4575  ;;
4576  *)
4577  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4578for as_dir in $PATH
4579do
4580  IFS=$as_save_IFS
4581  test -z "$as_dir" && as_dir=.
4582    for ac_exec_ext in '' $ac_executable_extensions; do
4583  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4584    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4585    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4586    break 2
4587  fi
4588done
4589  done
4590IFS=$as_save_IFS
4591
4592  ;;
4593esac
4594fi
4595ECHO=$ac_cv_path_ECHO
4596if test -n "$ECHO"; then
4597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4598$as_echo "$ECHO" >&6; }
4599else
4600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4601$as_echo "no" >&6; }
4602fi
4603
4604
4605  test -n "$ECHO" && break
4606done
4607
4608
4609    if test "x$ECHO" = x; then
4610        if test "xecho" = x; then
4611          PROG_NAME=echo
4612        else
4613          PROG_NAME=echo
4614        fi
4615        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4616$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4617        as_fn_error $? "Cannot continue" "$LINENO" 5
4618    fi
4619
4620
4621
4622    for ac_prog in expr
4623do
4624  # Extract the first word of "$ac_prog", so it can be a program name with args.
4625set dummy $ac_prog; ac_word=$2
4626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4627$as_echo_n "checking for $ac_word... " >&6; }
4628if ${ac_cv_path_EXPR+:} false; then :
4629  $as_echo_n "(cached) " >&6
4630else
4631  case $EXPR in
4632  [\\/]* | ?:[\\/]*)
4633  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4634  ;;
4635  *)
4636  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4637for as_dir in $PATH
4638do
4639  IFS=$as_save_IFS
4640  test -z "$as_dir" && as_dir=.
4641    for ac_exec_ext in '' $ac_executable_extensions; do
4642  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4643    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4644    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4645    break 2
4646  fi
4647done
4648  done
4649IFS=$as_save_IFS
4650
4651  ;;
4652esac
4653fi
4654EXPR=$ac_cv_path_EXPR
4655if test -n "$EXPR"; then
4656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4657$as_echo "$EXPR" >&6; }
4658else
4659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4660$as_echo "no" >&6; }
4661fi
4662
4663
4664  test -n "$EXPR" && break
4665done
4666
4667
4668    if test "x$EXPR" = x; then
4669        if test "xexpr" = x; then
4670          PROG_NAME=expr
4671        else
4672          PROG_NAME=expr
4673        fi
4674        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4675$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4676        as_fn_error $? "Cannot continue" "$LINENO" 5
4677    fi
4678
4679
4680
4681    for ac_prog in file
4682do
4683  # Extract the first word of "$ac_prog", so it can be a program name with args.
4684set dummy $ac_prog; ac_word=$2
4685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4686$as_echo_n "checking for $ac_word... " >&6; }
4687if ${ac_cv_path_FILE+:} false; then :
4688  $as_echo_n "(cached) " >&6
4689else
4690  case $FILE in
4691  [\\/]* | ?:[\\/]*)
4692  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4693  ;;
4694  *)
4695  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4696for as_dir in $PATH
4697do
4698  IFS=$as_save_IFS
4699  test -z "$as_dir" && as_dir=.
4700    for ac_exec_ext in '' $ac_executable_extensions; do
4701  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4702    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4703    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4704    break 2
4705  fi
4706done
4707  done
4708IFS=$as_save_IFS
4709
4710  ;;
4711esac
4712fi
4713FILE=$ac_cv_path_FILE
4714if test -n "$FILE"; then
4715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4716$as_echo "$FILE" >&6; }
4717else
4718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4719$as_echo "no" >&6; }
4720fi
4721
4722
4723  test -n "$FILE" && break
4724done
4725
4726
4727    if test "x$FILE" = x; then
4728        if test "xfile" = x; then
4729          PROG_NAME=file
4730        else
4731          PROG_NAME=file
4732        fi
4733        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4734$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4735        as_fn_error $? "Cannot continue" "$LINENO" 5
4736    fi
4737
4738
4739
4740    for ac_prog in find
4741do
4742  # Extract the first word of "$ac_prog", so it can be a program name with args.
4743set dummy $ac_prog; ac_word=$2
4744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4745$as_echo_n "checking for $ac_word... " >&6; }
4746if ${ac_cv_path_FIND+:} false; then :
4747  $as_echo_n "(cached) " >&6
4748else
4749  case $FIND in
4750  [\\/]* | ?:[\\/]*)
4751  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4752  ;;
4753  *)
4754  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4755for as_dir in $PATH
4756do
4757  IFS=$as_save_IFS
4758  test -z "$as_dir" && as_dir=.
4759    for ac_exec_ext in '' $ac_executable_extensions; do
4760  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4761    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4762    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4763    break 2
4764  fi
4765done
4766  done
4767IFS=$as_save_IFS
4768
4769  ;;
4770esac
4771fi
4772FIND=$ac_cv_path_FIND
4773if test -n "$FIND"; then
4774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4775$as_echo "$FIND" >&6; }
4776else
4777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4778$as_echo "no" >&6; }
4779fi
4780
4781
4782  test -n "$FIND" && break
4783done
4784
4785
4786    if test "x$FIND" = x; then
4787        if test "xfind" = x; then
4788          PROG_NAME=find
4789        else
4790          PROG_NAME=find
4791        fi
4792        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4793$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4794        as_fn_error $? "Cannot continue" "$LINENO" 5
4795    fi
4796
4797
4798
4799    for ac_prog in head
4800do
4801  # Extract the first word of "$ac_prog", so it can be a program name with args.
4802set dummy $ac_prog; ac_word=$2
4803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4804$as_echo_n "checking for $ac_word... " >&6; }
4805if ${ac_cv_path_HEAD+:} false; then :
4806  $as_echo_n "(cached) " >&6
4807else
4808  case $HEAD in
4809  [\\/]* | ?:[\\/]*)
4810  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4811  ;;
4812  *)
4813  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4814for as_dir in $PATH
4815do
4816  IFS=$as_save_IFS
4817  test -z "$as_dir" && as_dir=.
4818    for ac_exec_ext in '' $ac_executable_extensions; do
4819  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4820    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4821    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4822    break 2
4823  fi
4824done
4825  done
4826IFS=$as_save_IFS
4827
4828  ;;
4829esac
4830fi
4831HEAD=$ac_cv_path_HEAD
4832if test -n "$HEAD"; then
4833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4834$as_echo "$HEAD" >&6; }
4835else
4836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4837$as_echo "no" >&6; }
4838fi
4839
4840
4841  test -n "$HEAD" && break
4842done
4843
4844
4845    if test "x$HEAD" = x; then
4846        if test "xhead" = x; then
4847          PROG_NAME=head
4848        else
4849          PROG_NAME=head
4850        fi
4851        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4852$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4853        as_fn_error $? "Cannot continue" "$LINENO" 5
4854    fi
4855
4856
4857
4858    for ac_prog in ln
4859do
4860  # Extract the first word of "$ac_prog", so it can be a program name with args.
4861set dummy $ac_prog; ac_word=$2
4862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4863$as_echo_n "checking for $ac_word... " >&6; }
4864if ${ac_cv_path_LN+:} false; then :
4865  $as_echo_n "(cached) " >&6
4866else
4867  case $LN in
4868  [\\/]* | ?:[\\/]*)
4869  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4870  ;;
4871  *)
4872  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4873for as_dir in $PATH
4874do
4875  IFS=$as_save_IFS
4876  test -z "$as_dir" && as_dir=.
4877    for ac_exec_ext in '' $ac_executable_extensions; do
4878  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4879    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4880    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4881    break 2
4882  fi
4883done
4884  done
4885IFS=$as_save_IFS
4886
4887  ;;
4888esac
4889fi
4890LN=$ac_cv_path_LN
4891if test -n "$LN"; then
4892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4893$as_echo "$LN" >&6; }
4894else
4895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4896$as_echo "no" >&6; }
4897fi
4898
4899
4900  test -n "$LN" && break
4901done
4902
4903
4904    if test "x$LN" = x; then
4905        if test "xln" = x; then
4906          PROG_NAME=ln
4907        else
4908          PROG_NAME=ln
4909        fi
4910        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4911$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4912        as_fn_error $? "Cannot continue" "$LINENO" 5
4913    fi
4914
4915
4916
4917    for ac_prog in ls
4918do
4919  # Extract the first word of "$ac_prog", so it can be a program name with args.
4920set dummy $ac_prog; ac_word=$2
4921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4922$as_echo_n "checking for $ac_word... " >&6; }
4923if ${ac_cv_path_LS+:} false; then :
4924  $as_echo_n "(cached) " >&6
4925else
4926  case $LS in
4927  [\\/]* | ?:[\\/]*)
4928  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4929  ;;
4930  *)
4931  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4932for as_dir in $PATH
4933do
4934  IFS=$as_save_IFS
4935  test -z "$as_dir" && as_dir=.
4936    for ac_exec_ext in '' $ac_executable_extensions; do
4937  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4938    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4939    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4940    break 2
4941  fi
4942done
4943  done
4944IFS=$as_save_IFS
4945
4946  ;;
4947esac
4948fi
4949LS=$ac_cv_path_LS
4950if test -n "$LS"; then
4951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4952$as_echo "$LS" >&6; }
4953else
4954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4955$as_echo "no" >&6; }
4956fi
4957
4958
4959  test -n "$LS" && break
4960done
4961
4962
4963    if test "x$LS" = x; then
4964        if test "xls" = x; then
4965          PROG_NAME=ls
4966        else
4967          PROG_NAME=ls
4968        fi
4969        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4970$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4971        as_fn_error $? "Cannot continue" "$LINENO" 5
4972    fi
4973
4974
4975
4976    for ac_prog in mkdir
4977do
4978  # Extract the first word of "$ac_prog", so it can be a program name with args.
4979set dummy $ac_prog; ac_word=$2
4980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4981$as_echo_n "checking for $ac_word... " >&6; }
4982if ${ac_cv_path_MKDIR+:} false; then :
4983  $as_echo_n "(cached) " >&6
4984else
4985  case $MKDIR in
4986  [\\/]* | ?:[\\/]*)
4987  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4988  ;;
4989  *)
4990  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4991for as_dir in $PATH
4992do
4993  IFS=$as_save_IFS
4994  test -z "$as_dir" && as_dir=.
4995    for ac_exec_ext in '' $ac_executable_extensions; do
4996  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4997    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4998    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4999    break 2
5000  fi
5001done
5002  done
5003IFS=$as_save_IFS
5004
5005  ;;
5006esac
5007fi
5008MKDIR=$ac_cv_path_MKDIR
5009if test -n "$MKDIR"; then
5010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
5011$as_echo "$MKDIR" >&6; }
5012else
5013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5014$as_echo "no" >&6; }
5015fi
5016
5017
5018  test -n "$MKDIR" && break
5019done
5020
5021
5022    if test "x$MKDIR" = x; then
5023        if test "xmkdir" = x; then
5024          PROG_NAME=mkdir
5025        else
5026          PROG_NAME=mkdir
5027        fi
5028        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5029$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5030        as_fn_error $? "Cannot continue" "$LINENO" 5
5031    fi
5032
5033
5034
5035    for ac_prog in mktemp
5036do
5037  # Extract the first word of "$ac_prog", so it can be a program name with args.
5038set dummy $ac_prog; ac_word=$2
5039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5040$as_echo_n "checking for $ac_word... " >&6; }
5041if ${ac_cv_path_MKTEMP+:} false; then :
5042  $as_echo_n "(cached) " >&6
5043else
5044  case $MKTEMP in
5045  [\\/]* | ?:[\\/]*)
5046  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
5047  ;;
5048  *)
5049  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5050for as_dir in $PATH
5051do
5052  IFS=$as_save_IFS
5053  test -z "$as_dir" && as_dir=.
5054    for ac_exec_ext in '' $ac_executable_extensions; do
5055  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5056    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
5057    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5058    break 2
5059  fi
5060done
5061  done
5062IFS=$as_save_IFS
5063
5064  ;;
5065esac
5066fi
5067MKTEMP=$ac_cv_path_MKTEMP
5068if test -n "$MKTEMP"; then
5069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
5070$as_echo "$MKTEMP" >&6; }
5071else
5072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5073$as_echo "no" >&6; }
5074fi
5075
5076
5077  test -n "$MKTEMP" && break
5078done
5079
5080
5081    if test "x$MKTEMP" = x; then
5082        if test "xmktemp" = x; then
5083          PROG_NAME=mktemp
5084        else
5085          PROG_NAME=mktemp
5086        fi
5087        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5088$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5089        as_fn_error $? "Cannot continue" "$LINENO" 5
5090    fi
5091
5092
5093
5094    for ac_prog in mv
5095do
5096  # Extract the first word of "$ac_prog", so it can be a program name with args.
5097set dummy $ac_prog; ac_word=$2
5098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5099$as_echo_n "checking for $ac_word... " >&6; }
5100if ${ac_cv_path_MV+:} false; then :
5101  $as_echo_n "(cached) " >&6
5102else
5103  case $MV in
5104  [\\/]* | ?:[\\/]*)
5105  ac_cv_path_MV="$MV" # Let the user override the test with a path.
5106  ;;
5107  *)
5108  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5109for as_dir in $PATH
5110do
5111  IFS=$as_save_IFS
5112  test -z "$as_dir" && as_dir=.
5113    for ac_exec_ext in '' $ac_executable_extensions; do
5114  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5115    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5116    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5117    break 2
5118  fi
5119done
5120  done
5121IFS=$as_save_IFS
5122
5123  ;;
5124esac
5125fi
5126MV=$ac_cv_path_MV
5127if test -n "$MV"; then
5128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5129$as_echo "$MV" >&6; }
5130else
5131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5132$as_echo "no" >&6; }
5133fi
5134
5135
5136  test -n "$MV" && break
5137done
5138
5139
5140    if test "x$MV" = x; then
5141        if test "xmv" = x; then
5142          PROG_NAME=mv
5143        else
5144          PROG_NAME=mv
5145        fi
5146        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5147$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5148        as_fn_error $? "Cannot continue" "$LINENO" 5
5149    fi
5150
5151
5152
5153    for ac_prog in printf
5154do
5155  # Extract the first word of "$ac_prog", so it can be a program name with args.
5156set dummy $ac_prog; ac_word=$2
5157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5158$as_echo_n "checking for $ac_word... " >&6; }
5159if ${ac_cv_path_PRINTF+:} false; then :
5160  $as_echo_n "(cached) " >&6
5161else
5162  case $PRINTF in
5163  [\\/]* | ?:[\\/]*)
5164  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5165  ;;
5166  *)
5167  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5168for as_dir in $PATH
5169do
5170  IFS=$as_save_IFS
5171  test -z "$as_dir" && as_dir=.
5172    for ac_exec_ext in '' $ac_executable_extensions; do
5173  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5174    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5175    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5176    break 2
5177  fi
5178done
5179  done
5180IFS=$as_save_IFS
5181
5182  ;;
5183esac
5184fi
5185PRINTF=$ac_cv_path_PRINTF
5186if test -n "$PRINTF"; then
5187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5188$as_echo "$PRINTF" >&6; }
5189else
5190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5191$as_echo "no" >&6; }
5192fi
5193
5194
5195  test -n "$PRINTF" && break
5196done
5197
5198
5199    if test "x$PRINTF" = x; then
5200        if test "xprintf" = x; then
5201          PROG_NAME=printf
5202        else
5203          PROG_NAME=printf
5204        fi
5205        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5206$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5207        as_fn_error $? "Cannot continue" "$LINENO" 5
5208    fi
5209
5210
5211
5212    for ac_prog in rm
5213do
5214  # Extract the first word of "$ac_prog", so it can be a program name with args.
5215set dummy $ac_prog; ac_word=$2
5216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5217$as_echo_n "checking for $ac_word... " >&6; }
5218if ${ac_cv_path_RM+:} false; then :
5219  $as_echo_n "(cached) " >&6
5220else
5221  case $RM in
5222  [\\/]* | ?:[\\/]*)
5223  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5224  ;;
5225  *)
5226  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5227for as_dir in $PATH
5228do
5229  IFS=$as_save_IFS
5230  test -z "$as_dir" && as_dir=.
5231    for ac_exec_ext in '' $ac_executable_extensions; do
5232  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5233    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5234    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5235    break 2
5236  fi
5237done
5238  done
5239IFS=$as_save_IFS
5240
5241  ;;
5242esac
5243fi
5244RM=$ac_cv_path_RM
5245if test -n "$RM"; then
5246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5247$as_echo "$RM" >&6; }
5248else
5249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5250$as_echo "no" >&6; }
5251fi
5252
5253
5254  test -n "$RM" && break
5255done
5256
5257
5258    if test "x$RM" = x; then
5259        if test "xrm" = x; then
5260          PROG_NAME=rm
5261        else
5262          PROG_NAME=rm
5263        fi
5264        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5265$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5266        as_fn_error $? "Cannot continue" "$LINENO" 5
5267    fi
5268
5269
5270
5271    for ac_prog in sh
5272do
5273  # Extract the first word of "$ac_prog", so it can be a program name with args.
5274set dummy $ac_prog; ac_word=$2
5275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5276$as_echo_n "checking for $ac_word... " >&6; }
5277if ${ac_cv_path_SH+:} false; then :
5278  $as_echo_n "(cached) " >&6
5279else
5280  case $SH in
5281  [\\/]* | ?:[\\/]*)
5282  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5283  ;;
5284  *)
5285  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5286for as_dir in $PATH
5287do
5288  IFS=$as_save_IFS
5289  test -z "$as_dir" && as_dir=.
5290    for ac_exec_ext in '' $ac_executable_extensions; do
5291  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5292    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5293    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5294    break 2
5295  fi
5296done
5297  done
5298IFS=$as_save_IFS
5299
5300  ;;
5301esac
5302fi
5303SH=$ac_cv_path_SH
5304if test -n "$SH"; then
5305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5306$as_echo "$SH" >&6; }
5307else
5308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5309$as_echo "no" >&6; }
5310fi
5311
5312
5313  test -n "$SH" && break
5314done
5315
5316
5317    if test "x$SH" = x; then
5318        if test "xsh" = x; then
5319          PROG_NAME=sh
5320        else
5321          PROG_NAME=sh
5322        fi
5323        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5324$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5325        as_fn_error $? "Cannot continue" "$LINENO" 5
5326    fi
5327
5328
5329
5330    for ac_prog in sort
5331do
5332  # Extract the first word of "$ac_prog", so it can be a program name with args.
5333set dummy $ac_prog; ac_word=$2
5334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5335$as_echo_n "checking for $ac_word... " >&6; }
5336if ${ac_cv_path_SORT+:} false; then :
5337  $as_echo_n "(cached) " >&6
5338else
5339  case $SORT in
5340  [\\/]* | ?:[\\/]*)
5341  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5342  ;;
5343  *)
5344  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5345for as_dir in $PATH
5346do
5347  IFS=$as_save_IFS
5348  test -z "$as_dir" && as_dir=.
5349    for ac_exec_ext in '' $ac_executable_extensions; do
5350  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5351    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5352    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5353    break 2
5354  fi
5355done
5356  done
5357IFS=$as_save_IFS
5358
5359  ;;
5360esac
5361fi
5362SORT=$ac_cv_path_SORT
5363if test -n "$SORT"; then
5364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5365$as_echo "$SORT" >&6; }
5366else
5367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5368$as_echo "no" >&6; }
5369fi
5370
5371
5372  test -n "$SORT" && break
5373done
5374
5375
5376    if test "x$SORT" = x; then
5377        if test "xsort" = x; then
5378          PROG_NAME=sort
5379        else
5380          PROG_NAME=sort
5381        fi
5382        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5383$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5384        as_fn_error $? "Cannot continue" "$LINENO" 5
5385    fi
5386
5387
5388
5389    for ac_prog in tail
5390do
5391  # Extract the first word of "$ac_prog", so it can be a program name with args.
5392set dummy $ac_prog; ac_word=$2
5393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5394$as_echo_n "checking for $ac_word... " >&6; }
5395if ${ac_cv_path_TAIL+:} false; then :
5396  $as_echo_n "(cached) " >&6
5397else
5398  case $TAIL in
5399  [\\/]* | ?:[\\/]*)
5400  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5401  ;;
5402  *)
5403  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5404for as_dir in $PATH
5405do
5406  IFS=$as_save_IFS
5407  test -z "$as_dir" && as_dir=.
5408    for ac_exec_ext in '' $ac_executable_extensions; do
5409  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5410    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5411    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5412    break 2
5413  fi
5414done
5415  done
5416IFS=$as_save_IFS
5417
5418  ;;
5419esac
5420fi
5421TAIL=$ac_cv_path_TAIL
5422if test -n "$TAIL"; then
5423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5424$as_echo "$TAIL" >&6; }
5425else
5426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5427$as_echo "no" >&6; }
5428fi
5429
5430
5431  test -n "$TAIL" && break
5432done
5433
5434
5435    if test "x$TAIL" = x; then
5436        if test "xtail" = x; then
5437          PROG_NAME=tail
5438        else
5439          PROG_NAME=tail
5440        fi
5441        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5442$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5443        as_fn_error $? "Cannot continue" "$LINENO" 5
5444    fi
5445
5446
5447
5448    for ac_prog in tar
5449do
5450  # Extract the first word of "$ac_prog", so it can be a program name with args.
5451set dummy $ac_prog; ac_word=$2
5452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5453$as_echo_n "checking for $ac_word... " >&6; }
5454if ${ac_cv_path_TAR+:} false; then :
5455  $as_echo_n "(cached) " >&6
5456else
5457  case $TAR in
5458  [\\/]* | ?:[\\/]*)
5459  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5460  ;;
5461  *)
5462  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5463for as_dir in $PATH
5464do
5465  IFS=$as_save_IFS
5466  test -z "$as_dir" && as_dir=.
5467    for ac_exec_ext in '' $ac_executable_extensions; do
5468  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5469    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5470    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5471    break 2
5472  fi
5473done
5474  done
5475IFS=$as_save_IFS
5476
5477  ;;
5478esac
5479fi
5480TAR=$ac_cv_path_TAR
5481if test -n "$TAR"; then
5482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5483$as_echo "$TAR" >&6; }
5484else
5485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5486$as_echo "no" >&6; }
5487fi
5488
5489
5490  test -n "$TAR" && break
5491done
5492
5493
5494    if test "x$TAR" = x; then
5495        if test "xtar" = x; then
5496          PROG_NAME=tar
5497        else
5498          PROG_NAME=tar
5499        fi
5500        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5501$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5502        as_fn_error $? "Cannot continue" "$LINENO" 5
5503    fi
5504
5505
5506
5507    for ac_prog in tee
5508do
5509  # Extract the first word of "$ac_prog", so it can be a program name with args.
5510set dummy $ac_prog; ac_word=$2
5511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5512$as_echo_n "checking for $ac_word... " >&6; }
5513if ${ac_cv_path_TEE+:} false; then :
5514  $as_echo_n "(cached) " >&6
5515else
5516  case $TEE in
5517  [\\/]* | ?:[\\/]*)
5518  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5519  ;;
5520  *)
5521  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5522for as_dir in $PATH
5523do
5524  IFS=$as_save_IFS
5525  test -z "$as_dir" && as_dir=.
5526    for ac_exec_ext in '' $ac_executable_extensions; do
5527  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5528    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5529    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5530    break 2
5531  fi
5532done
5533  done
5534IFS=$as_save_IFS
5535
5536  ;;
5537esac
5538fi
5539TEE=$ac_cv_path_TEE
5540if test -n "$TEE"; then
5541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5542$as_echo "$TEE" >&6; }
5543else
5544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5545$as_echo "no" >&6; }
5546fi
5547
5548
5549  test -n "$TEE" && break
5550done
5551
5552
5553    if test "x$TEE" = x; then
5554        if test "xtee" = x; then
5555          PROG_NAME=tee
5556        else
5557          PROG_NAME=tee
5558        fi
5559        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5560$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5561        as_fn_error $? "Cannot continue" "$LINENO" 5
5562    fi
5563
5564
5565
5566    for ac_prog in touch
5567do
5568  # Extract the first word of "$ac_prog", so it can be a program name with args.
5569set dummy $ac_prog; ac_word=$2
5570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5571$as_echo_n "checking for $ac_word... " >&6; }
5572if ${ac_cv_path_TOUCH+:} false; then :
5573  $as_echo_n "(cached) " >&6
5574else
5575  case $TOUCH in
5576  [\\/]* | ?:[\\/]*)
5577  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5578  ;;
5579  *)
5580  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5581for as_dir in $PATH
5582do
5583  IFS=$as_save_IFS
5584  test -z "$as_dir" && as_dir=.
5585    for ac_exec_ext in '' $ac_executable_extensions; do
5586  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5587    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5588    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5589    break 2
5590  fi
5591done
5592  done
5593IFS=$as_save_IFS
5594
5595  ;;
5596esac
5597fi
5598TOUCH=$ac_cv_path_TOUCH
5599if test -n "$TOUCH"; then
5600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5601$as_echo "$TOUCH" >&6; }
5602else
5603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5604$as_echo "no" >&6; }
5605fi
5606
5607
5608  test -n "$TOUCH" && break
5609done
5610
5611
5612    if test "x$TOUCH" = x; then
5613        if test "xtouch" = x; then
5614          PROG_NAME=touch
5615        else
5616          PROG_NAME=touch
5617        fi
5618        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5619$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5620        as_fn_error $? "Cannot continue" "$LINENO" 5
5621    fi
5622
5623
5624
5625    for ac_prog in tr
5626do
5627  # Extract the first word of "$ac_prog", so it can be a program name with args.
5628set dummy $ac_prog; ac_word=$2
5629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5630$as_echo_n "checking for $ac_word... " >&6; }
5631if ${ac_cv_path_TR+:} false; then :
5632  $as_echo_n "(cached) " >&6
5633else
5634  case $TR in
5635  [\\/]* | ?:[\\/]*)
5636  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5637  ;;
5638  *)
5639  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5640for as_dir in $PATH
5641do
5642  IFS=$as_save_IFS
5643  test -z "$as_dir" && as_dir=.
5644    for ac_exec_ext in '' $ac_executable_extensions; do
5645  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5646    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5647    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5648    break 2
5649  fi
5650done
5651  done
5652IFS=$as_save_IFS
5653
5654  ;;
5655esac
5656fi
5657TR=$ac_cv_path_TR
5658if test -n "$TR"; then
5659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5660$as_echo "$TR" >&6; }
5661else
5662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5663$as_echo "no" >&6; }
5664fi
5665
5666
5667  test -n "$TR" && break
5668done
5669
5670
5671    if test "x$TR" = x; then
5672        if test "xtr" = x; then
5673          PROG_NAME=tr
5674        else
5675          PROG_NAME=tr
5676        fi
5677        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5678$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5679        as_fn_error $? "Cannot continue" "$LINENO" 5
5680    fi
5681
5682
5683
5684    for ac_prog in uname
5685do
5686  # Extract the first word of "$ac_prog", so it can be a program name with args.
5687set dummy $ac_prog; ac_word=$2
5688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5689$as_echo_n "checking for $ac_word... " >&6; }
5690if ${ac_cv_path_UNAME+:} false; then :
5691  $as_echo_n "(cached) " >&6
5692else
5693  case $UNAME in
5694  [\\/]* | ?:[\\/]*)
5695  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5696  ;;
5697  *)
5698  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5699for as_dir in $PATH
5700do
5701  IFS=$as_save_IFS
5702  test -z "$as_dir" && as_dir=.
5703    for ac_exec_ext in '' $ac_executable_extensions; do
5704  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5705    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5706    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5707    break 2
5708  fi
5709done
5710  done
5711IFS=$as_save_IFS
5712
5713  ;;
5714esac
5715fi
5716UNAME=$ac_cv_path_UNAME
5717if test -n "$UNAME"; then
5718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5719$as_echo "$UNAME" >&6; }
5720else
5721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5722$as_echo "no" >&6; }
5723fi
5724
5725
5726  test -n "$UNAME" && break
5727done
5728
5729
5730    if test "x$UNAME" = x; then
5731        if test "xuname" = x; then
5732          PROG_NAME=uname
5733        else
5734          PROG_NAME=uname
5735        fi
5736        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5737$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5738        as_fn_error $? "Cannot continue" "$LINENO" 5
5739    fi
5740
5741
5742
5743    for ac_prog in uniq
5744do
5745  # Extract the first word of "$ac_prog", so it can be a program name with args.
5746set dummy $ac_prog; ac_word=$2
5747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5748$as_echo_n "checking for $ac_word... " >&6; }
5749if ${ac_cv_path_UNIQ+:} false; then :
5750  $as_echo_n "(cached) " >&6
5751else
5752  case $UNIQ in
5753  [\\/]* | ?:[\\/]*)
5754  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5755  ;;
5756  *)
5757  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5758for as_dir in $PATH
5759do
5760  IFS=$as_save_IFS
5761  test -z "$as_dir" && as_dir=.
5762    for ac_exec_ext in '' $ac_executable_extensions; do
5763  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5764    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5765    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5766    break 2
5767  fi
5768done
5769  done
5770IFS=$as_save_IFS
5771
5772  ;;
5773esac
5774fi
5775UNIQ=$ac_cv_path_UNIQ
5776if test -n "$UNIQ"; then
5777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5778$as_echo "$UNIQ" >&6; }
5779else
5780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5781$as_echo "no" >&6; }
5782fi
5783
5784
5785  test -n "$UNIQ" && break
5786done
5787
5788
5789    if test "x$UNIQ" = x; then
5790        if test "xuniq" = x; then
5791          PROG_NAME=uniq
5792        else
5793          PROG_NAME=uniq
5794        fi
5795        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5796$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5797        as_fn_error $? "Cannot continue" "$LINENO" 5
5798    fi
5799
5800
5801
5802    for ac_prog in wc
5803do
5804  # Extract the first word of "$ac_prog", so it can be a program name with args.
5805set dummy $ac_prog; ac_word=$2
5806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5807$as_echo_n "checking for $ac_word... " >&6; }
5808if ${ac_cv_path_WC+:} false; then :
5809  $as_echo_n "(cached) " >&6
5810else
5811  case $WC in
5812  [\\/]* | ?:[\\/]*)
5813  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5814  ;;
5815  *)
5816  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5817for as_dir in $PATH
5818do
5819  IFS=$as_save_IFS
5820  test -z "$as_dir" && as_dir=.
5821    for ac_exec_ext in '' $ac_executable_extensions; do
5822  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5823    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5824    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5825    break 2
5826  fi
5827done
5828  done
5829IFS=$as_save_IFS
5830
5831  ;;
5832esac
5833fi
5834WC=$ac_cv_path_WC
5835if test -n "$WC"; then
5836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5837$as_echo "$WC" >&6; }
5838else
5839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5840$as_echo "no" >&6; }
5841fi
5842
5843
5844  test -n "$WC" && break
5845done
5846
5847
5848    if test "x$WC" = x; then
5849        if test "xwc" = x; then
5850          PROG_NAME=wc
5851        else
5852          PROG_NAME=wc
5853        fi
5854        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5855$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5856        as_fn_error $? "Cannot continue" "$LINENO" 5
5857    fi
5858
5859
5860
5861    for ac_prog in which
5862do
5863  # Extract the first word of "$ac_prog", so it can be a program name with args.
5864set dummy $ac_prog; ac_word=$2
5865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5866$as_echo_n "checking for $ac_word... " >&6; }
5867if ${ac_cv_path_WHICH+:} false; then :
5868  $as_echo_n "(cached) " >&6
5869else
5870  case $WHICH in
5871  [\\/]* | ?:[\\/]*)
5872  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5873  ;;
5874  *)
5875  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5876for as_dir in $PATH
5877do
5878  IFS=$as_save_IFS
5879  test -z "$as_dir" && as_dir=.
5880    for ac_exec_ext in '' $ac_executable_extensions; do
5881  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5882    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5883    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5884    break 2
5885  fi
5886done
5887  done
5888IFS=$as_save_IFS
5889
5890  ;;
5891esac
5892fi
5893WHICH=$ac_cv_path_WHICH
5894if test -n "$WHICH"; then
5895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5896$as_echo "$WHICH" >&6; }
5897else
5898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5899$as_echo "no" >&6; }
5900fi
5901
5902
5903  test -n "$WHICH" && break
5904done
5905
5906
5907    if test "x$WHICH" = x; then
5908        if test "xwhich" = x; then
5909          PROG_NAME=which
5910        else
5911          PROG_NAME=which
5912        fi
5913        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5914$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5915        as_fn_error $? "Cannot continue" "$LINENO" 5
5916    fi
5917
5918
5919
5920    for ac_prog in xargs
5921do
5922  # Extract the first word of "$ac_prog", so it can be a program name with args.
5923set dummy $ac_prog; ac_word=$2
5924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5925$as_echo_n "checking for $ac_word... " >&6; }
5926if ${ac_cv_path_XARGS+:} false; then :
5927  $as_echo_n "(cached) " >&6
5928else
5929  case $XARGS in
5930  [\\/]* | ?:[\\/]*)
5931  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5932  ;;
5933  *)
5934  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5935for as_dir in $PATH
5936do
5937  IFS=$as_save_IFS
5938  test -z "$as_dir" && as_dir=.
5939    for ac_exec_ext in '' $ac_executable_extensions; do
5940  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5941    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5942    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5943    break 2
5944  fi
5945done
5946  done
5947IFS=$as_save_IFS
5948
5949  ;;
5950esac
5951fi
5952XARGS=$ac_cv_path_XARGS
5953if test -n "$XARGS"; then
5954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5955$as_echo "$XARGS" >&6; }
5956else
5957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5958$as_echo "no" >&6; }
5959fi
5960
5961
5962  test -n "$XARGS" && break
5963done
5964
5965
5966    if test "x$XARGS" = x; then
5967        if test "xxargs" = x; then
5968          PROG_NAME=xargs
5969        else
5970          PROG_NAME=xargs
5971        fi
5972        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5973$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5974        as_fn_error $? "Cannot continue" "$LINENO" 5
5975    fi
5976
5977
5978
5979# Then required tools that require some special treatment.
5980for ac_prog in gawk mawk nawk awk
5981do
5982  # Extract the first word of "$ac_prog", so it can be a program name with args.
5983set dummy $ac_prog; ac_word=$2
5984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5985$as_echo_n "checking for $ac_word... " >&6; }
5986if ${ac_cv_prog_AWK+:} false; then :
5987  $as_echo_n "(cached) " >&6
5988else
5989  if test -n "$AWK"; then
5990  ac_cv_prog_AWK="$AWK" # Let the user override the test.
5991else
5992as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5993for as_dir in $PATH
5994do
5995  IFS=$as_save_IFS
5996  test -z "$as_dir" && as_dir=.
5997    for ac_exec_ext in '' $ac_executable_extensions; do
5998  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5999    ac_cv_prog_AWK="$ac_prog"
6000    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6001    break 2
6002  fi
6003done
6004  done
6005IFS=$as_save_IFS
6006
6007fi
6008fi
6009AWK=$ac_cv_prog_AWK
6010if test -n "$AWK"; then
6011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6012$as_echo "$AWK" >&6; }
6013else
6014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6015$as_echo "no" >&6; }
6016fi
6017
6018
6019  test -n "$AWK" && break
6020done
6021
6022
6023    if test "x$AWK" = x; then
6024        if test "x" = x; then
6025          PROG_NAME=awk
6026        else
6027          PROG_NAME=
6028        fi
6029        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6030$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6031        as_fn_error $? "Cannot continue" "$LINENO" 5
6032    fi
6033
6034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6035$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6036if ${ac_cv_path_GREP+:} false; then :
6037  $as_echo_n "(cached) " >&6
6038else
6039  if test -z "$GREP"; then
6040  ac_path_GREP_found=false
6041  # Loop through the user's path and test for each of PROGNAME-LIST
6042  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6043for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6044do
6045  IFS=$as_save_IFS
6046  test -z "$as_dir" && as_dir=.
6047    for ac_prog in grep ggrep; do
6048    for ac_exec_ext in '' $ac_executable_extensions; do
6049      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6050      as_fn_executable_p "$ac_path_GREP" || continue
6051# Check for GNU ac_path_GREP and select it if it is found.
6052  # Check for GNU $ac_path_GREP
6053case `"$ac_path_GREP" --version 2>&1` in
6054*GNU*)
6055  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6056*)
6057  ac_count=0
6058  $as_echo_n 0123456789 >"conftest.in"
6059  while :
6060  do
6061    cat "conftest.in" "conftest.in" >"conftest.tmp"
6062    mv "conftest.tmp" "conftest.in"
6063    cp "conftest.in" "conftest.nl"
6064    $as_echo 'GREP' >> "conftest.nl"
6065    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6066    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6067    as_fn_arith $ac_count + 1 && ac_count=$as_val
6068    if test $ac_count -gt ${ac_path_GREP_max-0}; then
6069      # Best one so far, save it but keep looking for a better one
6070      ac_cv_path_GREP="$ac_path_GREP"
6071      ac_path_GREP_max=$ac_count
6072    fi
6073    # 10*(2^10) chars as input seems more than enough
6074    test $ac_count -gt 10 && break
6075  done
6076  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6077esac
6078
6079      $ac_path_GREP_found && break 3
6080    done
6081  done
6082  done
6083IFS=$as_save_IFS
6084  if test -z "$ac_cv_path_GREP"; then
6085    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6086  fi
6087else
6088  ac_cv_path_GREP=$GREP
6089fi
6090
6091fi
6092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6093$as_echo "$ac_cv_path_GREP" >&6; }
6094 GREP="$ac_cv_path_GREP"
6095
6096
6097
6098    if test "x$GREP" = x; then
6099        if test "x" = x; then
6100          PROG_NAME=grep
6101        else
6102          PROG_NAME=
6103        fi
6104        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6105$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6106        as_fn_error $? "Cannot continue" "$LINENO" 5
6107    fi
6108
6109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6110$as_echo_n "checking for egrep... " >&6; }
6111if ${ac_cv_path_EGREP+:} false; then :
6112  $as_echo_n "(cached) " >&6
6113else
6114  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6115   then ac_cv_path_EGREP="$GREP -E"
6116   else
6117     if test -z "$EGREP"; then
6118  ac_path_EGREP_found=false
6119  # Loop through the user's path and test for each of PROGNAME-LIST
6120  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6121for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6122do
6123  IFS=$as_save_IFS
6124  test -z "$as_dir" && as_dir=.
6125    for ac_prog in egrep; do
6126    for ac_exec_ext in '' $ac_executable_extensions; do
6127      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6128      as_fn_executable_p "$ac_path_EGREP" || continue
6129# Check for GNU ac_path_EGREP and select it if it is found.
6130  # Check for GNU $ac_path_EGREP
6131case `"$ac_path_EGREP" --version 2>&1` in
6132*GNU*)
6133  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6134*)
6135  ac_count=0
6136  $as_echo_n 0123456789 >"conftest.in"
6137  while :
6138  do
6139    cat "conftest.in" "conftest.in" >"conftest.tmp"
6140    mv "conftest.tmp" "conftest.in"
6141    cp "conftest.in" "conftest.nl"
6142    $as_echo 'EGREP' >> "conftest.nl"
6143    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6144    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6145    as_fn_arith $ac_count + 1 && ac_count=$as_val
6146    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6147      # Best one so far, save it but keep looking for a better one
6148      ac_cv_path_EGREP="$ac_path_EGREP"
6149      ac_path_EGREP_max=$ac_count
6150    fi
6151    # 10*(2^10) chars as input seems more than enough
6152    test $ac_count -gt 10 && break
6153  done
6154  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6155esac
6156
6157      $ac_path_EGREP_found && break 3
6158    done
6159  done
6160  done
6161IFS=$as_save_IFS
6162  if test -z "$ac_cv_path_EGREP"; then
6163    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6164  fi
6165else
6166  ac_cv_path_EGREP=$EGREP
6167fi
6168
6169   fi
6170fi
6171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6172$as_echo "$ac_cv_path_EGREP" >&6; }
6173 EGREP="$ac_cv_path_EGREP"
6174
6175
6176
6177    if test "x$EGREP" = x; then
6178        if test "x" = x; then
6179          PROG_NAME=egrep
6180        else
6181          PROG_NAME=
6182        fi
6183        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6184$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6185        as_fn_error $? "Cannot continue" "$LINENO" 5
6186    fi
6187
6188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6189$as_echo_n "checking for fgrep... " >&6; }
6190if ${ac_cv_path_FGREP+:} false; then :
6191  $as_echo_n "(cached) " >&6
6192else
6193  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6194   then ac_cv_path_FGREP="$GREP -F"
6195   else
6196     if test -z "$FGREP"; then
6197  ac_path_FGREP_found=false
6198  # Loop through the user's path and test for each of PROGNAME-LIST
6199  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6200for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6201do
6202  IFS=$as_save_IFS
6203  test -z "$as_dir" && as_dir=.
6204    for ac_prog in fgrep; do
6205    for ac_exec_ext in '' $ac_executable_extensions; do
6206      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6207      as_fn_executable_p "$ac_path_FGREP" || continue
6208# Check for GNU ac_path_FGREP and select it if it is found.
6209  # Check for GNU $ac_path_FGREP
6210case `"$ac_path_FGREP" --version 2>&1` in
6211*GNU*)
6212  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6213*)
6214  ac_count=0
6215  $as_echo_n 0123456789 >"conftest.in"
6216  while :
6217  do
6218    cat "conftest.in" "conftest.in" >"conftest.tmp"
6219    mv "conftest.tmp" "conftest.in"
6220    cp "conftest.in" "conftest.nl"
6221    $as_echo 'FGREP' >> "conftest.nl"
6222    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6223    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6224    as_fn_arith $ac_count + 1 && ac_count=$as_val
6225    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6226      # Best one so far, save it but keep looking for a better one
6227      ac_cv_path_FGREP="$ac_path_FGREP"
6228      ac_path_FGREP_max=$ac_count
6229    fi
6230    # 10*(2^10) chars as input seems more than enough
6231    test $ac_count -gt 10 && break
6232  done
6233  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6234esac
6235
6236      $ac_path_FGREP_found && break 3
6237    done
6238  done
6239  done
6240IFS=$as_save_IFS
6241  if test -z "$ac_cv_path_FGREP"; then
6242    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6243  fi
6244else
6245  ac_cv_path_FGREP=$FGREP
6246fi
6247
6248   fi
6249fi
6250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6251$as_echo "$ac_cv_path_FGREP" >&6; }
6252 FGREP="$ac_cv_path_FGREP"
6253
6254
6255
6256    if test "x$FGREP" = x; then
6257        if test "x" = x; then
6258          PROG_NAME=fgrep
6259        else
6260          PROG_NAME=
6261        fi
6262        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6263$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6264        as_fn_error $? "Cannot continue" "$LINENO" 5
6265    fi
6266
6267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6268$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6269if ${ac_cv_path_SED+:} false; then :
6270  $as_echo_n "(cached) " >&6
6271else
6272            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6273     for ac_i in 1 2 3 4 5 6 7; do
6274       ac_script="$ac_script$as_nl$ac_script"
6275     done
6276     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6277     { ac_script=; unset ac_script;}
6278     if test -z "$SED"; then
6279  ac_path_SED_found=false
6280  # Loop through the user's path and test for each of PROGNAME-LIST
6281  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6282for as_dir in $PATH
6283do
6284  IFS=$as_save_IFS
6285  test -z "$as_dir" && as_dir=.
6286    for ac_prog in sed gsed; do
6287    for ac_exec_ext in '' $ac_executable_extensions; do
6288      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6289      as_fn_executable_p "$ac_path_SED" || continue
6290# Check for GNU ac_path_SED and select it if it is found.
6291  # Check for GNU $ac_path_SED
6292case `"$ac_path_SED" --version 2>&1` in
6293*GNU*)
6294  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6295*)
6296  ac_count=0
6297  $as_echo_n 0123456789 >"conftest.in"
6298  while :
6299  do
6300    cat "conftest.in" "conftest.in" >"conftest.tmp"
6301    mv "conftest.tmp" "conftest.in"
6302    cp "conftest.in" "conftest.nl"
6303    $as_echo '' >> "conftest.nl"
6304    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6305    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6306    as_fn_arith $ac_count + 1 && ac_count=$as_val
6307    if test $ac_count -gt ${ac_path_SED_max-0}; then
6308      # Best one so far, save it but keep looking for a better one
6309      ac_cv_path_SED="$ac_path_SED"
6310      ac_path_SED_max=$ac_count
6311    fi
6312    # 10*(2^10) chars as input seems more than enough
6313    test $ac_count -gt 10 && break
6314  done
6315  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6316esac
6317
6318      $ac_path_SED_found && break 3
6319    done
6320  done
6321  done
6322IFS=$as_save_IFS
6323  if test -z "$ac_cv_path_SED"; then
6324    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6325  fi
6326else
6327  ac_cv_path_SED=$SED
6328fi
6329
6330fi
6331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6332$as_echo "$ac_cv_path_SED" >&6; }
6333 SED="$ac_cv_path_SED"
6334  rm -f conftest.sed
6335
6336
6337    if test "x$SED" = x; then
6338        if test "x" = x; then
6339          PROG_NAME=sed
6340        else
6341          PROG_NAME=
6342        fi
6343        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6344$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6345        as_fn_error $? "Cannot continue" "$LINENO" 5
6346    fi
6347
6348
6349for ac_prog in nawk gawk awk
6350do
6351  # Extract the first word of "$ac_prog", so it can be a program name with args.
6352set dummy $ac_prog; ac_word=$2
6353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6354$as_echo_n "checking for $ac_word... " >&6; }
6355if ${ac_cv_path_NAWK+:} false; then :
6356  $as_echo_n "(cached) " >&6
6357else
6358  case $NAWK in
6359  [\\/]* | ?:[\\/]*)
6360  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6361  ;;
6362  *)
6363  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6364for as_dir in $PATH
6365do
6366  IFS=$as_save_IFS
6367  test -z "$as_dir" && as_dir=.
6368    for ac_exec_ext in '' $ac_executable_extensions; do
6369  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6370    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6371    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6372    break 2
6373  fi
6374done
6375  done
6376IFS=$as_save_IFS
6377
6378  ;;
6379esac
6380fi
6381NAWK=$ac_cv_path_NAWK
6382if test -n "$NAWK"; then
6383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6384$as_echo "$NAWK" >&6; }
6385else
6386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6387$as_echo "no" >&6; }
6388fi
6389
6390
6391  test -n "$NAWK" && break
6392done
6393
6394
6395    if test "x$NAWK" = x; then
6396        if test "x" = x; then
6397          PROG_NAME=nawk
6398        else
6399          PROG_NAME=
6400        fi
6401        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6402$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6403        as_fn_error $? "Cannot continue" "$LINENO" 5
6404    fi
6405
6406
6407# Always force rm.
6408RM="$RM -f"
6409
6410# pwd behaves differently on various platforms and some don't support the -L flag.
6411# Always use the bash builtin pwd to get uniform behavior.
6412THEPWDCMD=pwd
6413
6414# These are not required on all platforms
6415# Extract the first word of "cygpath", so it can be a program name with args.
6416set dummy cygpath; ac_word=$2
6417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6418$as_echo_n "checking for $ac_word... " >&6; }
6419if ${ac_cv_path_CYGPATH+:} false; then :
6420  $as_echo_n "(cached) " >&6
6421else
6422  case $CYGPATH in
6423  [\\/]* | ?:[\\/]*)
6424  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6425  ;;
6426  *)
6427  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6428for as_dir in $PATH
6429do
6430  IFS=$as_save_IFS
6431  test -z "$as_dir" && as_dir=.
6432    for ac_exec_ext in '' $ac_executable_extensions; do
6433  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6434    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6436    break 2
6437  fi
6438done
6439  done
6440IFS=$as_save_IFS
6441
6442  ;;
6443esac
6444fi
6445CYGPATH=$ac_cv_path_CYGPATH
6446if test -n "$CYGPATH"; then
6447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6448$as_echo "$CYGPATH" >&6; }
6449else
6450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6451$as_echo "no" >&6; }
6452fi
6453
6454
6455# Extract the first word of "readlink", so it can be a program name with args.
6456set dummy readlink; ac_word=$2
6457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6458$as_echo_n "checking for $ac_word... " >&6; }
6459if ${ac_cv_path_READLINK+:} false; then :
6460  $as_echo_n "(cached) " >&6
6461else
6462  case $READLINK in
6463  [\\/]* | ?:[\\/]*)
6464  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6465  ;;
6466  *)
6467  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6468for as_dir in $PATH
6469do
6470  IFS=$as_save_IFS
6471  test -z "$as_dir" && as_dir=.
6472    for ac_exec_ext in '' $ac_executable_extensions; do
6473  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6474    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6475    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6476    break 2
6477  fi
6478done
6479  done
6480IFS=$as_save_IFS
6481
6482  ;;
6483esac
6484fi
6485READLINK=$ac_cv_path_READLINK
6486if test -n "$READLINK"; then
6487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6488$as_echo "$READLINK" >&6; }
6489else
6490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6491$as_echo "no" >&6; }
6492fi
6493
6494
6495# Extract the first word of "df", so it can be a program name with args.
6496set dummy df; ac_word=$2
6497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6498$as_echo_n "checking for $ac_word... " >&6; }
6499if ${ac_cv_path_DF+:} false; then :
6500  $as_echo_n "(cached) " >&6
6501else
6502  case $DF in
6503  [\\/]* | ?:[\\/]*)
6504  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6505  ;;
6506  *)
6507  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6508for as_dir in $PATH
6509do
6510  IFS=$as_save_IFS
6511  test -z "$as_dir" && as_dir=.
6512    for ac_exec_ext in '' $ac_executable_extensions; do
6513  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6514    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6515    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6516    break 2
6517  fi
6518done
6519  done
6520IFS=$as_save_IFS
6521
6522  ;;
6523esac
6524fi
6525DF=$ac_cv_path_DF
6526if test -n "$DF"; then
6527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6528$as_echo "$DF" >&6; }
6529else
6530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6531$as_echo "no" >&6; }
6532fi
6533
6534
6535# Extract the first word of "SetFile", so it can be a program name with args.
6536set dummy SetFile; ac_word=$2
6537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6538$as_echo_n "checking for $ac_word... " >&6; }
6539if ${ac_cv_path_SETFILE+:} false; then :
6540  $as_echo_n "(cached) " >&6
6541else
6542  case $SETFILE in
6543  [\\/]* | ?:[\\/]*)
6544  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6545  ;;
6546  *)
6547  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6548for as_dir in $PATH
6549do
6550  IFS=$as_save_IFS
6551  test -z "$as_dir" && as_dir=.
6552    for ac_exec_ext in '' $ac_executable_extensions; do
6553  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6554    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6555    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6556    break 2
6557  fi
6558done
6559  done
6560IFS=$as_save_IFS
6561
6562  ;;
6563esac
6564fi
6565SETFILE=$ac_cv_path_SETFILE
6566if test -n "$SETFILE"; then
6567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6568$as_echo "$SETFILE" >&6; }
6569else
6570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6571$as_echo "no" >&6; }
6572fi
6573
6574
6575
6576
6577# Now we can determine OpenJDK build and target platforms. This is required to
6578# have early on.
6579# Make sure we can run config.sub.
6580$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6581  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6582
6583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6584$as_echo_n "checking build system type... " >&6; }
6585if ${ac_cv_build+:} false; then :
6586  $as_echo_n "(cached) " >&6
6587else
6588  ac_build_alias=$build_alias
6589test "x$ac_build_alias" = x &&
6590  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6591test "x$ac_build_alias" = x &&
6592  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6593ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6594  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6595
6596fi
6597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6598$as_echo "$ac_cv_build" >&6; }
6599case $ac_cv_build in
6600*-*-*) ;;
6601*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6602esac
6603build=$ac_cv_build
6604ac_save_IFS=$IFS; IFS='-'
6605set x $ac_cv_build
6606shift
6607build_cpu=$1
6608build_vendor=$2
6609shift; shift
6610# Remember, the first character of IFS is used to create $*,
6611# except with old shells:
6612build_os=$*
6613IFS=$ac_save_IFS
6614case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6615
6616
6617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6618$as_echo_n "checking host system type... " >&6; }
6619if ${ac_cv_host+:} false; then :
6620  $as_echo_n "(cached) " >&6
6621else
6622  if test "x$host_alias" = x; then
6623  ac_cv_host=$ac_cv_build
6624else
6625  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6626    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6627fi
6628
6629fi
6630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6631$as_echo "$ac_cv_host" >&6; }
6632case $ac_cv_host in
6633*-*-*) ;;
6634*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6635esac
6636host=$ac_cv_host
6637ac_save_IFS=$IFS; IFS='-'
6638set x $ac_cv_host
6639shift
6640host_cpu=$1
6641host_vendor=$2
6642shift; shift
6643# Remember, the first character of IFS is used to create $*,
6644# except with old shells:
6645host_os=$*
6646IFS=$ac_save_IFS
6647case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6648
6649
6650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6651$as_echo_n "checking target system type... " >&6; }
6652if ${ac_cv_target+:} false; then :
6653  $as_echo_n "(cached) " >&6
6654else
6655  if test "x$target_alias" = x; then
6656  ac_cv_target=$ac_cv_host
6657else
6658  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6659    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6660fi
6661
6662fi
6663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6664$as_echo "$ac_cv_target" >&6; }
6665case $ac_cv_target in
6666*-*-*) ;;
6667*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6668esac
6669target=$ac_cv_target
6670ac_save_IFS=$IFS; IFS='-'
6671set x $ac_cv_target
6672shift
6673target_cpu=$1
6674target_vendor=$2
6675shift; shift
6676# Remember, the first character of IFS is used to create $*,
6677# except with old shells:
6678target_os=$*
6679IFS=$ac_save_IFS
6680case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6681
6682
6683# The aliases save the names the user supplied, while $host etc.
6684# will get canonicalized.
6685test -n "$target_alias" &&
6686  test "$program_prefix$program_suffix$program_transform_name" = \
6687    NONENONEs,x,x, &&
6688  program_prefix=${target_alias}-
6689
6690# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6691# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6692# product you're building. The target of this build is called "host". Since this is confusing to most people, we
6693# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6694# to use the configure naming style.
6695
6696
6697
6698
6699
6700    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6701    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6702    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6703    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6704    OPENJDK_TARGET_AUTOCONF_NAME="$host"
6705    OPENJDK_BUILD_AUTOCONF_NAME="$build"
6706
6707
6708
6709    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6710
6711  case "$build_os" in
6712    *linux*)
6713      VAR_OS=linux
6714      VAR_OS_API=posix
6715      VAR_OS_ENV=linux
6716      ;;
6717    *solaris*)
6718      VAR_OS=solaris
6719      VAR_OS_API=posix
6720      VAR_OS_ENV=solaris
6721      ;;
6722    *darwin*)
6723      VAR_OS=macosx
6724      VAR_OS_API=posix
6725      VAR_OS_ENV=macosx
6726      ;;
6727    *bsd*)
6728      VAR_OS=bsd
6729      VAR_OS_API=posix
6730      VAR_OS_ENV=bsd
6731      ;;
6732    *cygwin*)
6733      VAR_OS=windows
6734      VAR_OS_API=winapi
6735      VAR_OS_ENV=windows.cygwin
6736      ;;
6737    *mingw*)
6738      VAR_OS=windows
6739      VAR_OS_API=winapi
6740      VAR_OS_ENV=windows.msys
6741      ;;
6742    *aix*)
6743      VAR_OS=aix
6744      VAR_OS_API=posix
6745      VAR_OS_ENV=aix
6746      ;;
6747    *)
6748      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6749      ;;
6750  esac
6751
6752
6753  # First argument is the cpu name from the trip/quad
6754  case "$build_cpu" in
6755    x86_64)
6756      VAR_CPU=x86_64
6757      VAR_CPU_ARCH=x86
6758      VAR_CPU_BITS=64
6759      VAR_CPU_ENDIAN=little
6760      ;;
6761    i?86)
6762      VAR_CPU=x86
6763      VAR_CPU_ARCH=x86
6764      VAR_CPU_BITS=32
6765      VAR_CPU_ENDIAN=little
6766      ;;
6767    arm*)
6768      VAR_CPU=arm
6769      VAR_CPU_ARCH=arm
6770      VAR_CPU_BITS=32
6771      VAR_CPU_ENDIAN=little
6772      ;;
6773    powerpc)
6774      VAR_CPU=ppc
6775      VAR_CPU_ARCH=ppc
6776      VAR_CPU_BITS=32
6777      VAR_CPU_ENDIAN=big
6778       ;;
6779    powerpc64)
6780      VAR_CPU=ppc64
6781      VAR_CPU_ARCH=ppc
6782      VAR_CPU_BITS=64
6783      VAR_CPU_ENDIAN=big
6784       ;;
6785    sparc)
6786      VAR_CPU=sparc
6787      VAR_CPU_ARCH=sparc
6788      VAR_CPU_BITS=32
6789      VAR_CPU_ENDIAN=big
6790       ;;
6791    sparcv9)
6792      VAR_CPU=sparcv9
6793      VAR_CPU_ARCH=sparc
6794      VAR_CPU_BITS=64
6795      VAR_CPU_ENDIAN=big
6796       ;;
6797    *)
6798      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6799      ;;
6800  esac
6801
6802    # ..and setup our own variables. (Do this explicitely to facilitate searching)
6803    OPENJDK_BUILD_OS="$VAR_OS"
6804    OPENJDK_BUILD_OS_API="$VAR_OS_API"
6805    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6806    OPENJDK_BUILD_CPU="$VAR_CPU"
6807    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6808    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6809    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6810
6811
6812
6813
6814
6815
6816
6817    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6818$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6819    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6820$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6821
6822    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6823
6824  case "$host_os" in
6825    *linux*)
6826      VAR_OS=linux
6827      VAR_OS_API=posix
6828      VAR_OS_ENV=linux
6829      ;;
6830    *solaris*)
6831      VAR_OS=solaris
6832      VAR_OS_API=posix
6833      VAR_OS_ENV=solaris
6834      ;;
6835    *darwin*)
6836      VAR_OS=macosx
6837      VAR_OS_API=posix
6838      VAR_OS_ENV=macosx
6839      ;;
6840    *bsd*)
6841      VAR_OS=bsd
6842      VAR_OS_API=posix
6843      VAR_OS_ENV=bsd
6844      ;;
6845    *cygwin*)
6846      VAR_OS=windows
6847      VAR_OS_API=winapi
6848      VAR_OS_ENV=windows.cygwin
6849      ;;
6850    *mingw*)
6851      VAR_OS=windows
6852      VAR_OS_API=winapi
6853      VAR_OS_ENV=windows.msys
6854      ;;
6855    *aix*)
6856      VAR_OS=aix
6857      VAR_OS_API=posix
6858      VAR_OS_ENV=aix
6859      ;;
6860    *)
6861      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6862      ;;
6863  esac
6864
6865
6866  # First argument is the cpu name from the trip/quad
6867  case "$host_cpu" in
6868    x86_64)
6869      VAR_CPU=x86_64
6870      VAR_CPU_ARCH=x86
6871      VAR_CPU_BITS=64
6872      VAR_CPU_ENDIAN=little
6873      ;;
6874    i?86)
6875      VAR_CPU=x86
6876      VAR_CPU_ARCH=x86
6877      VAR_CPU_BITS=32
6878      VAR_CPU_ENDIAN=little
6879      ;;
6880    arm*)
6881      VAR_CPU=arm
6882      VAR_CPU_ARCH=arm
6883      VAR_CPU_BITS=32
6884      VAR_CPU_ENDIAN=little
6885      ;;
6886    powerpc)
6887      VAR_CPU=ppc
6888      VAR_CPU_ARCH=ppc
6889      VAR_CPU_BITS=32
6890      VAR_CPU_ENDIAN=big
6891       ;;
6892    powerpc64)
6893      VAR_CPU=ppc64
6894      VAR_CPU_ARCH=ppc
6895      VAR_CPU_BITS=64
6896      VAR_CPU_ENDIAN=big
6897       ;;
6898    sparc)
6899      VAR_CPU=sparc
6900      VAR_CPU_ARCH=sparc
6901      VAR_CPU_BITS=32
6902      VAR_CPU_ENDIAN=big
6903       ;;
6904    sparcv9)
6905      VAR_CPU=sparcv9
6906      VAR_CPU_ARCH=sparc
6907      VAR_CPU_BITS=64
6908      VAR_CPU_ENDIAN=big
6909       ;;
6910    *)
6911      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6912      ;;
6913  esac
6914
6915    # ... and setup our own variables. (Do this explicitely to facilitate searching)
6916    OPENJDK_TARGET_OS="$VAR_OS"
6917    OPENJDK_TARGET_OS_API="$VAR_OS_API"
6918    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6919    OPENJDK_TARGET_CPU="$VAR_CPU"
6920    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6921    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6922    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6923
6924
6925
6926
6927
6928
6929
6930    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6931$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6932    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6933$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6934
6935
6936
6937# Check whether --with-target-bits was given.
6938if test "${with_target_bits+set}" = set; then :
6939  withval=$with_target_bits;
6940fi
6941
6942
6943  # We have three types of compiles:
6944  # native  == normal compilation, target system == build system
6945  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6946  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6947  #
6948  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6949    # We're doing a proper cross-compilation
6950    COMPILE_TYPE="cross"
6951  else
6952    COMPILE_TYPE="native"
6953  fi
6954
6955  if test "x$with_target_bits" != x; then
6956    if test "x$COMPILE_TYPE" = "xcross"; then
6957      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6958    fi
6959
6960    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6961      # A reduced build is requested
6962      COMPILE_TYPE="reduced"
6963      OPENJDK_TARGET_CPU_BITS=32
6964      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6965        OPENJDK_TARGET_CPU=x86
6966      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6967        OPENJDK_TARGET_CPU=sparc
6968      else
6969        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6970      fi
6971    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6972      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
6973    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6974      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6975$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6976    else
6977      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6978    fi
6979  fi
6980
6981
6982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6983$as_echo_n "checking compilation type... " >&6; }
6984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6985$as_echo "$COMPILE_TYPE" >&6; }
6986
6987
6988    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6989       REQUIRED_OS_NAME=SunOS
6990       REQUIRED_OS_VERSION=5.10
6991    fi
6992    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6993       REQUIRED_OS_NAME=Linux
6994       REQUIRED_OS_VERSION=2.6
6995    fi
6996    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6997        REQUIRED_OS_NAME=Windows
6998        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6999            REQUIRED_OS_VERSION=5.2
7000        else
7001            REQUIRED_OS_VERSION=5.1
7002        fi
7003    fi
7004    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7005        REQUIRED_OS_NAME=Darwin
7006        REQUIRED_OS_VERSION=11.2
7007    fi
7008
7009
7010
7011
7012
7013    # Also store the legacy naming of the cpu.
7014    # Ie i586 and amd64 instead of x86 and x86_64
7015    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
7016    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7017      OPENJDK_TARGET_CPU_LEGACY="i586"
7018    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7019      # On all platforms except MacOSX replace x86_64 with amd64.
7020      OPENJDK_TARGET_CPU_LEGACY="amd64"
7021    fi
7022
7023
7024    # And the second legacy naming of the cpu.
7025    # Ie i386 and amd64 instead of x86 and x86_64.
7026    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
7027    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7028      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
7029    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7030      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
7031    fi
7032
7033
7034    # This is the name of the cpu (but using i386 and amd64 instead of
7035    # x86 and x86_64, respectively), preceeded by a /, to be used when
7036    # locating libraries. On macosx, it's empty, though.
7037    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
7038    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
7039        OPENJDK_TARGET_CPU_LIBDIR=""
7040    fi
7041
7042
7043    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
7044    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
7045    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
7046    OPENJDK_TARGET_CPU_ISADIR=""
7047    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7048      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7049          OPENJDK_TARGET_CPU_ISADIR="/amd64"
7050      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7051          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7052      fi
7053    fi
7054
7055
7056    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7057    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7058    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7059      # On linux only, we replace x86 with i386.
7060      OPENJDK_TARGET_CPU_OSARCH="i386"
7061    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7062      # On all platforms except macosx, we replace x86_64 with amd64.
7063      OPENJDK_TARGET_CPU_OSARCH="amd64"
7064    fi
7065
7066
7067    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7068    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7069      OPENJDK_TARGET_CPU_JLI="i386"
7070    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7071      # On all platforms except macosx, we replace x86_64 with amd64.
7072      OPENJDK_TARGET_CPU_JLI="amd64"
7073    fi
7074    # Now setup the -D flags for building libjli.
7075    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7076    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7077      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7078        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7079      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7080        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7081      fi
7082    fi
7083
7084
7085    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7086    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7087        OPENJDK_TARGET_OS_API_DIR="solaris"
7088    fi
7089    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7090        OPENJDK_TARGET_OS_API_DIR="windows"
7091    fi
7092
7093
7094    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7095        A_LP64="LP64:="
7096        # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7097        # unpack200.exe
7098        if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7099            ADD_LP64="-D_LP64=1"
7100        fi
7101    fi
7102    LP64=$A_LP64
7103
7104
7105    if test "x$COMPILE_TYPE" = "xcross"; then
7106      # FIXME: ... or should this include reduced builds..?
7107      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7108    else
7109      DEFINE_CROSS_COMPILE_ARCH=""
7110    fi
7111
7112
7113    # ZERO_ARCHDEF is used to enable architecture-specific code
7114    case "${OPENJDK_TARGET_CPU}" in
7115      ppc*)    ZERO_ARCHDEF=PPC   ;;
7116      s390*)   ZERO_ARCHDEF=S390  ;;
7117      sparc*)  ZERO_ARCHDEF=SPARC ;;
7118      x86_64*) ZERO_ARCHDEF=AMD64 ;;
7119      x86)     ZERO_ARCHDEF=IA32  ;;
7120      *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
7121    esac
7122
7123
7124
7125
7126
7127# Continue setting up basic stuff. Most remaining code require fundamental tools.
7128
7129# Locate the directory of this script.
7130SCRIPT="$0"
7131AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
7132
7133# Where is the source? It is located two levels above the configure script.
7134CURDIR="$PWD"
7135cd "$AUTOCONF_DIR/../.."
7136SRC_ROOT="`$THEPWDCMD -L`"
7137
7138if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7139  PATH_SEP=";"
7140
7141  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
7142  if test $SRC_ROOT_LENGTH -gt 100; then
7143      as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7144  fi
7145
7146  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7147    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7148$as_echo_n "checking cygwin release... " >&6; }
7149    CYGWIN_VERSION=`$UNAME -r`
7150    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7151$as_echo "$CYGWIN_VERSION" >&6; }
7152    WINDOWS_ENV_VENDOR='cygwin'
7153    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7154
7155    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7156    if test "x$CYGWIN_VERSION_OK" = x; then
7157      { $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
7158$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;}
7159      as_fn_error $? "Cannot continue" "$LINENO" 5
7160    fi
7161    if test "x$CYGPATH" = x; then
7162        as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7163    fi
7164    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7165$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7166    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7167    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7168    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7169    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7170    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7171$as_echo "$CYGWIN_ROOT_PATH" >&6; }
7172    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7173    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7174    if test "x$test_cygdrive_prefix" = x; then
7175        as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7176    fi
7177  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7178    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7179$as_echo_n "checking msys release... " >&6; }
7180    MSYS_VERSION=`$UNAME -r`
7181    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7182$as_echo "$MSYS_VERSION" >&6; }
7183
7184    WINDOWS_ENV_VENDOR='msys'
7185    WINDOWS_ENV_VERSION="$MSYS_VERSION"
7186
7187    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7188$as_echo_n "checking msys root directory as unix-style path... " >&6; }
7189    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7190    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7191
7192  windows_path="$MSYS_ROOT_PATH"
7193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7194    unix_path=`$CYGPATH -u "$windows_path"`
7195    MSYS_ROOT_PATH="$unix_path"
7196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7197    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7198    MSYS_ROOT_PATH="$unix_path"
7199  fi
7200
7201    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7202$as_echo "$MSYS_ROOT_PATH" >&6; }
7203    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7204  else
7205    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7206  fi
7207
7208  # Test if windows or unix (cygwin/msys) find is first in path.
7209  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7210$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7211  FIND_BINARY_OUTPUT=`find --version 2>&1`
7212  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7213    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7214$as_echo "unix style" >&6; }
7215  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7216    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7217$as_echo "Windows" >&6; }
7218    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7219$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7220    { $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
7221$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7222    as_fn_error $? "Cannot continue" "$LINENO" 5
7223  else
7224    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7225$as_echo "unknown" >&6; }
7226    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7227$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7228  fi
7229
7230else
7231  PATH_SEP=":"
7232fi
7233
7234
7235
7236cd "$CURDIR"
7237
7238
7239  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7240
7241  # Input might be given as Windows format, start by converting to
7242  # unix format.
7243  path="$SRC_ROOT"
7244  new_path=`$CYGPATH -u "$path"`
7245
7246  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7247  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7248  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7249  # "foo.exe" is OK but "foo" is an error.
7250  #
7251  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7252  # It is also a way to make sure we got the proper file name for the real test later on.
7253  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7254  if test "x$test_shortpath" = x; then
7255    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7256$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7257    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7258  fi
7259
7260  # Call helper function which possibly converts this using DOS-style short mode.
7261  # If so, the updated path is stored in $new_path.
7262
7263  input_path="$new_path"
7264  # Check if we need to convert this using DOS-style short mode. If the path
7265  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7266  # take no chances and rewrite it.
7267  # Note: m4 eats our [], so we need to use [ and ] instead.
7268  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7269  if test "x$has_forbidden_chars" != x; then
7270    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7271    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7272    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7273    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7274      # Going to short mode and back again did indeed matter. Since short mode is
7275      # case insensitive, let's make it lowercase to improve readability.
7276      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7277      # Now convert it back to Unix-stile (cygpath)
7278      input_path=`$CYGPATH -u "$shortmode_path"`
7279      new_path="$input_path"
7280    fi
7281  fi
7282
7283  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7284  if test "x$test_cygdrive_prefix" = x; then
7285    # As a simple fix, exclude /usr/bin since it's not a real path.
7286    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7287      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7288      # a path prefixed by /cygdrive for fixpath to work.
7289      new_path="$CYGWIN_ROOT_PATH$input_path"
7290    fi
7291  fi
7292
7293
7294  if test "x$path" != "x$new_path"; then
7295    SRC_ROOT="$new_path"
7296    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7297$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7298  fi
7299
7300  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7301
7302  path="$SRC_ROOT"
7303  has_colon=`$ECHO $path | $GREP ^.:`
7304  new_path="$path"
7305  if test "x$has_colon" = x; then
7306    # Not in mixed or Windows style, start by that.
7307    new_path=`cmd //c echo $path`
7308  fi
7309
7310
7311  input_path="$new_path"
7312  # Check if we need to convert this using DOS-style short mode. If the path
7313  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7314  # take no chances and rewrite it.
7315  # Note: m4 eats our [], so we need to use [ and ] instead.
7316  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7317  if test "x$has_forbidden_chars" != x; then
7318    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7319    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7320  fi
7321
7322
7323  windows_path="$new_path"
7324  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7325    unix_path=`$CYGPATH -u "$windows_path"`
7326    new_path="$unix_path"
7327  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7328    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7329    new_path="$unix_path"
7330  fi
7331
7332  if test "x$path" != "x$new_path"; then
7333    SRC_ROOT="$new_path"
7334    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7335$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7336  fi
7337
7338  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7339  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7340
7341  else
7342    # We're on a posix platform. Hooray! :)
7343    path="$SRC_ROOT"
7344    has_space=`$ECHO "$path" | $GREP " "`
7345    if test "x$has_space" != x; then
7346      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7347$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7348      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7349    fi
7350
7351    # Use eval to expand a potential ~
7352    eval path="$path"
7353    if test ! -f "$path" && test ! -d "$path"; then
7354      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7355    fi
7356
7357    SRC_ROOT="`cd "$path"; $THEPWDCMD -L`"
7358  fi
7359
7360
7361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7362
7363  # Input might be given as Windows format, start by converting to
7364  # unix format.
7365  path="$CURDIR"
7366  new_path=`$CYGPATH -u "$path"`
7367
7368  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7369  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7370  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7371  # "foo.exe" is OK but "foo" is an error.
7372  #
7373  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7374  # It is also a way to make sure we got the proper file name for the real test later on.
7375  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7376  if test "x$test_shortpath" = x; then
7377    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7378$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7379    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7380  fi
7381
7382  # Call helper function which possibly converts this using DOS-style short mode.
7383  # If so, the updated path is stored in $new_path.
7384
7385  input_path="$new_path"
7386  # Check if we need to convert this using DOS-style short mode. If the path
7387  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7388  # take no chances and rewrite it.
7389  # Note: m4 eats our [], so we need to use [ and ] instead.
7390  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7391  if test "x$has_forbidden_chars" != x; then
7392    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7393    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7394    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7395    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7396      # Going to short mode and back again did indeed matter. Since short mode is
7397      # case insensitive, let's make it lowercase to improve readability.
7398      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7399      # Now convert it back to Unix-stile (cygpath)
7400      input_path=`$CYGPATH -u "$shortmode_path"`
7401      new_path="$input_path"
7402    fi
7403  fi
7404
7405  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7406  if test "x$test_cygdrive_prefix" = x; then
7407    # As a simple fix, exclude /usr/bin since it's not a real path.
7408    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7409      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7410      # a path prefixed by /cygdrive for fixpath to work.
7411      new_path="$CYGWIN_ROOT_PATH$input_path"
7412    fi
7413  fi
7414
7415
7416  if test "x$path" != "x$new_path"; then
7417    CURDIR="$new_path"
7418    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7419$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7420  fi
7421
7422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7423
7424  path="$CURDIR"
7425  has_colon=`$ECHO $path | $GREP ^.:`
7426  new_path="$path"
7427  if test "x$has_colon" = x; then
7428    # Not in mixed or Windows style, start by that.
7429    new_path=`cmd //c echo $path`
7430  fi
7431
7432
7433  input_path="$new_path"
7434  # Check if we need to convert this using DOS-style short mode. If the path
7435  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7436  # take no chances and rewrite it.
7437  # Note: m4 eats our [], so we need to use [ and ] instead.
7438  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7439  if test "x$has_forbidden_chars" != x; then
7440    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7441    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7442  fi
7443
7444
7445  windows_path="$new_path"
7446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7447    unix_path=`$CYGPATH -u "$windows_path"`
7448    new_path="$unix_path"
7449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7450    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7451    new_path="$unix_path"
7452  fi
7453
7454  if test "x$path" != "x$new_path"; then
7455    CURDIR="$new_path"
7456    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7457$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7458  fi
7459
7460  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7461  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7462
7463  else
7464    # We're on a posix platform. Hooray! :)
7465    path="$CURDIR"
7466    has_space=`$ECHO "$path" | $GREP " "`
7467    if test "x$has_space" != x; then
7468      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7469$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7470      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7471    fi
7472
7473    # Use eval to expand a potential ~
7474    eval path="$path"
7475    if test ! -f "$path" && test ! -d "$path"; then
7476      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7477    fi
7478
7479    CURDIR="`cd "$path"; $THEPWDCMD -L`"
7480  fi
7481
7482
7483if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7484    # Add extra search paths on solaris for utilities like ar and as etc...
7485    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7486fi
7487
7488# You can force the sys-root if the sys-root encoded into the cross compiler tools
7489# is not correct.
7490
7491# Check whether --with-sys-root was given.
7492if test "${with_sys_root+set}" = set; then :
7493  withval=$with_sys_root;
7494fi
7495
7496
7497if test "x$with_sys_root" != x; then
7498  SYS_ROOT=$with_sys_root
7499else
7500  SYS_ROOT=/
7501fi
7502
7503
7504
7505# Check whether --with-tools-dir was given.
7506if test "${with_tools_dir+set}" = set; then :
7507  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7508
7509fi
7510
7511
7512
7513# Check whether --with-devkit was given.
7514if test "${with_devkit+set}" = set; then :
7515  withval=$with_devkit;
7516    if test "x$with_sys_root" != x; then
7517      as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7518    fi
7519
7520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7521
7522  # Input might be given as Windows format, start by converting to
7523  # unix format.
7524  path="$with_devkit"
7525  new_path=`$CYGPATH -u "$path"`
7526
7527  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7528  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7529  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7530  # "foo.exe" is OK but "foo" is an error.
7531  #
7532  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7533  # It is also a way to make sure we got the proper file name for the real test later on.
7534  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7535  if test "x$test_shortpath" = x; then
7536    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7537$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7538    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
7539  fi
7540
7541  # Call helper function which possibly converts this using DOS-style short mode.
7542  # If so, the updated path is stored in $new_path.
7543
7544  input_path="$new_path"
7545  # Check if we need to convert this using DOS-style short mode. If the path
7546  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7547  # take no chances and rewrite it.
7548  # Note: m4 eats our [], so we need to use [ and ] instead.
7549  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7550  if test "x$has_forbidden_chars" != x; then
7551    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7552    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7553    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7554    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7555      # Going to short mode and back again did indeed matter. Since short mode is
7556      # case insensitive, let's make it lowercase to improve readability.
7557      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7558      # Now convert it back to Unix-stile (cygpath)
7559      input_path=`$CYGPATH -u "$shortmode_path"`
7560      new_path="$input_path"
7561    fi
7562  fi
7563
7564  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7565  if test "x$test_cygdrive_prefix" = x; then
7566    # As a simple fix, exclude /usr/bin since it's not a real path.
7567    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7568      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7569      # a path prefixed by /cygdrive for fixpath to work.
7570      new_path="$CYGWIN_ROOT_PATH$input_path"
7571    fi
7572  fi
7573
7574
7575  if test "x$path" != "x$new_path"; then
7576    with_devkit="$new_path"
7577    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7578$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7579  fi
7580
7581  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7582
7583  path="$with_devkit"
7584  has_colon=`$ECHO $path | $GREP ^.:`
7585  new_path="$path"
7586  if test "x$has_colon" = x; then
7587    # Not in mixed or Windows style, start by that.
7588    new_path=`cmd //c echo $path`
7589  fi
7590
7591
7592  input_path="$new_path"
7593  # Check if we need to convert this using DOS-style short mode. If the path
7594  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7595  # take no chances and rewrite it.
7596  # Note: m4 eats our [], so we need to use [ and ] instead.
7597  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7598  if test "x$has_forbidden_chars" != x; then
7599    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7600    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7601  fi
7602
7603
7604  windows_path="$new_path"
7605  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7606    unix_path=`$CYGPATH -u "$windows_path"`
7607    new_path="$unix_path"
7608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7609    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7610    new_path="$unix_path"
7611  fi
7612
7613  if test "x$path" != "x$new_path"; then
7614    with_devkit="$new_path"
7615    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7616$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7617  fi
7618
7619  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7620  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7621
7622  else
7623    # We're on a posix platform. Hooray! :)
7624    path="$with_devkit"
7625    has_space=`$ECHO "$path" | $GREP " "`
7626    if test "x$has_space" != x; then
7627      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7628$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7629      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7630    fi
7631
7632    # Use eval to expand a potential ~
7633    eval path="$path"
7634    if test ! -f "$path" && test ! -d "$path"; then
7635      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
7636    fi
7637
7638    with_devkit="`cd "$path"; $THEPWDCMD -L`"
7639  fi
7640
7641
7642  if test "x$TOOLS_DIR" = x; then
7643    TOOLS_DIR="$with_devkit/bin"
7644  else
7645    TOOLS_DIR="$TOOLS_DIR:$with_devkit/bin"
7646  fi
7647
7648    if test -d "$with_devkit/$host_alias/libc"; then
7649      SYS_ROOT=$with_devkit/$host_alias/libc
7650    elif test -d "$with_devkit/$host/sys-root"; then
7651      SYS_ROOT=$with_devkit/$host/sys-root
7652    fi
7653
7654fi
7655
7656
7657
7658# Setup default logging of stdout and stderr to build.log in the output root.
7659BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7660BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7661BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7662
7663
7664
7665
7666
7667# Check if it's a pure open build or if custom sources are to be used.
7668
7669  # Check whether --enable-openjdk-only was given.
7670if test "${enable_openjdk_only+set}" = set; then :
7671  enableval=$enable_openjdk_only;
7672else
7673  enable_openjdk_only="no"
7674fi
7675
7676
7677  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7678$as_echo_n "checking for presence of closed sources... " >&6; }
7679  if test -d "$SRC_ROOT/jdk/src/closed"; then
7680    CLOSED_SOURCE_PRESENT=yes
7681  else
7682    CLOSED_SOURCE_PRESENT=no
7683  fi
7684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7685$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7686
7687  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7688$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7689  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7691$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7692
7693  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7694    OPENJDK=true
7695    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7696      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7697$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7698    fi
7699  else
7700    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7701      OPENJDK=true
7702    else
7703      OPENJDK=false
7704    fi
7705  fi
7706
7707  if test "x$OPENJDK" = "xtrue"; then
7708    SET_OPENJDK="OPENJDK=true"
7709  fi
7710
7711
7712
7713
7714# These are needed to be able to create a configuration name (and thus the output directory)
7715
7716###############################################################################
7717#
7718# Check which variant of the JDK that we want to build.
7719# Currently we have:
7720#    normal:   standard edition
7721# but the custom make system may add other variants
7722#
7723# Effectively the JDK variant gives a name to a specific set of
7724# modules to compile into the JDK. In the future, these modules
7725# might even be Jigsaw modules.
7726#
7727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7728$as_echo_n "checking which variant of the JDK to build... " >&6; }
7729
7730# Check whether --with-jdk-variant was given.
7731if test "${with_jdk_variant+set}" = set; then :
7732  withval=$with_jdk_variant;
7733fi
7734
7735
7736if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7737    JDK_VARIANT="normal"
7738else
7739    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7740fi
7741
7742
7743
7744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7745$as_echo "$JDK_VARIANT" >&6; }
7746
7747
7748###############################################################################
7749#
7750# Check which interpreter of the JVM we want to build.
7751# Currently we have:
7752#    template: Template interpreter (the default)
7753#    cpp     : C++ interpreter
7754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
7755$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
7756
7757# Check whether --with-jvm-interpreter was given.
7758if test "${with_jvm_interpreter+set}" = set; then :
7759  withval=$with_jvm_interpreter;
7760fi
7761
7762
7763if test "x$with_jvm_interpreter" = x; then
7764     with_jvm_interpreter="template"
7765fi
7766
7767JVM_INTERPRETER="$with_jvm_interpreter"
7768
7769if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
7770   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
7771fi
7772
7773
7774
7775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
7776$as_echo "$with_jvm_interpreter" >&6; }
7777
7778
7779
7780###############################################################################
7781#
7782# Check which variants of the JVM that we want to build.
7783# Currently we have:
7784#    server: normal interpreter and a tiered C1/C2 compiler
7785#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7786#    minimal1: reduced form of client with optional VM services and features stripped out
7787#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7788#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7789#    zero: no machine code interpreter, no compiler
7790#    zeroshark: zero interpreter and shark/llvm compiler backend
7791#    core: interpreter only, no compiler (only works on some platforms)
7792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7793$as_echo_n "checking which variants of the JVM to build... " >&6; }
7794
7795# Check whether --with-jvm-variants was given.
7796if test "${with_jvm_variants+set}" = set; then :
7797  withval=$with_jvm_variants;
7798fi
7799
7800
7801if test "x$with_jvm_variants" = x; then
7802     with_jvm_variants="server"
7803fi
7804
7805JVM_VARIANTS=",$with_jvm_variants,"
7806TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//' -e 's/core,//'`
7807
7808if test "x$TEST_VARIANTS" != "x,"; then
7809   as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
7810fi
7811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7812$as_echo "$with_jvm_variants" >&6; }
7813
7814JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7815JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7816JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7817JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7818JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7819JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7820JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
7821
7822if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7823    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7824        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7825    fi
7826fi
7827if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7828    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7829        as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7830    fi
7831fi
7832if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7833    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7834        as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7835    fi
7836fi
7837
7838# Replace the commas with AND for use in the build directory name.
7839ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7840COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/' -e 's/core,/1/'`
7841if test "x$COUNT_VARIANTS" != "x,1"; then
7842    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7843else
7844    BUILDING_MULTIPLE_JVM_VARIANTS=no
7845fi
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856INCLUDE_SA=true
7857if test "x$JVM_VARIANT_ZERO" = xtrue ; then
7858    INCLUDE_SA=false
7859fi
7860if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
7861    INCLUDE_SA=false
7862fi
7863if test "x$VAR_CPU" = xppc64 ; then
7864    INCLUDE_SA=false
7865fi
7866
7867
7868if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7869   MACOSX_UNIVERSAL="true"
7870fi
7871
7872
7873
7874
7875
7876###############################################################################
7877#
7878# Set the debug level
7879#    release: no debug information, all optimizations, no asserts.
7880#    fastdebug: debug information (-g), all optimizations, all asserts
7881#    slowdebug: debug information (-g), no optimizations, all asserts
7882#
7883DEBUG_LEVEL="release"
7884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7885$as_echo_n "checking which debug level to use... " >&6; }
7886# Check whether --enable-debug was given.
7887if test "${enable_debug+set}" = set; then :
7888  enableval=$enable_debug;
7889        ENABLE_DEBUG="${enableval}"
7890        DEBUG_LEVEL="fastdebug"
7891
7892else
7893  ENABLE_DEBUG="no"
7894fi
7895
7896
7897
7898# Check whether --with-debug-level was given.
7899if test "${with_debug_level+set}" = set; then :
7900  withval=$with_debug_level;
7901        DEBUG_LEVEL="${withval}"
7902        if test "x$ENABLE_DEBUG" = xyes; then
7903			as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7904        fi
7905
7906fi
7907
7908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7909$as_echo "$DEBUG_LEVEL" >&6; }
7910
7911if test "x$DEBUG_LEVEL" != xrelease && \
7912   test "x$DEBUG_LEVEL" != xfastdebug && \
7913   test "x$DEBUG_LEVEL" != xslowdebug; then
7914   as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7915fi
7916
7917
7918###############################################################################
7919#
7920# Setup legacy vars/targets and new vars to deal with different debug levels.
7921#
7922
7923case $DEBUG_LEVEL in
7924      release )
7925          VARIANT="OPT"
7926          FASTDEBUG="false"
7927          DEBUG_CLASSFILES="false"
7928          BUILD_VARIANT_RELEASE=""
7929          HOTSPOT_DEBUG_LEVEL="product"
7930          HOTSPOT_EXPORT="product"
7931           ;;
7932      fastdebug )
7933          VARIANT="DBG"
7934          FASTDEBUG="true"
7935          DEBUG_CLASSFILES="true"
7936          BUILD_VARIANT_RELEASE="-fastdebug"
7937          HOTSPOT_DEBUG_LEVEL="fastdebug"
7938          HOTSPOT_EXPORT="fastdebug"
7939           ;;
7940      slowdebug )
7941          VARIANT="DBG"
7942          FASTDEBUG="false"
7943          DEBUG_CLASSFILES="true"
7944          BUILD_VARIANT_RELEASE="-debug"
7945          HOTSPOT_DEBUG_LEVEL="jvmg"
7946          HOTSPOT_EXPORT="debug"
7947           ;;
7948esac
7949
7950#####
7951# Generate the legacy makefile targets for hotspot.
7952# The hotspot api for selecting the build artifacts, really, needs to be improved.
7953# JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7954# determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7955# But until then ...
7956HOTSPOT_TARGET=""
7957
7958if test "x$JVM_VARIANT_SERVER" = xtrue; then
7959    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7960fi
7961
7962if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7963    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7964fi
7965
7966if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7967    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7968fi
7969
7970if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7971    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7972fi
7973
7974if test "x$JVM_VARIANT_ZERO" = xtrue; then
7975    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7976fi
7977
7978if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7979    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7980fi
7981
7982if test "x$JVM_VARIANT_CORE" = xtrue; then
7983    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
7984fi
7985
7986HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7987
7988# On Macosx universal binaries are produced, but they only contain
7989# 64 bit intel. This invalidates control of which jvms are built
7990# from configure, but only server is valid anyway. Fix this
7991# when hotspot makefiles are rewritten.
7992if test "x$MACOSX_UNIVERSAL" = xtrue; then
7993    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7994fi
7995
7996#####
7997
7998
7999
8000
8001
8002
8003
8004
8005# With basic setup done, call the custom early hook.
8006
8007
8008# To properly create a configuration name, we need to have the OpenJDK target
8009# and options (variants and debug level) parsed.
8010
8011
8012
8013# Check whether --with-conf-name was given.
8014if test "${with_conf_name+set}" = set; then :
8015  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
8016fi
8017
8018
8019# Test from where we are running configure, in or outside of src root.
8020if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
8021        || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
8022        || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
8023    # We are running configure from the src root.
8024    # Create a default ./build/target-variant-debuglevel output root.
8025    if test "x${CONF_NAME}" = x; then
8026        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
8027    fi
8028    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
8029    $MKDIR -p "$OUTPUT_ROOT"
8030    if test ! -d "$OUTPUT_ROOT"; then
8031        as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
8032    fi
8033else
8034    # We are running configure from outside of the src dir.
8035    # Then use the current directory as output dir!
8036    # If configuration is situated in normal build directory, just use the build
8037    # directory name as configuration name, otherwise use the complete path.
8038    if test "x${CONF_NAME}" = x; then
8039        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
8040    fi
8041    OUTPUT_ROOT="$CURDIR"
8042
8043    # WARNING: This might be a bad thing to do. You need to be sure you want to
8044    # have a configuration in this directory. Do some sanity checks!
8045
8046    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
8047      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
8048      # other files
8049      files_present=`$LS $OUTPUT_ROOT`
8050      # Configure has already touched config.log and confdefs.h in the current dir when this check
8051      # is performed.
8052      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
8053                                             | $TR -d '\n'`
8054      if test "x$filtered_files" != x; then
8055        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
8056$as_echo "$as_me: Current directory is $CURDIR." >&6;}
8057        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
8058$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
8059        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
8060$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
8061        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
8062$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
8063        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
8064$as_echo "$as_me: seriously mess up just about everything." >&6;}
8065        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
8066$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
8067        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
8068$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
8069        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
8070      fi
8071    fi
8072fi
8073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
8074$as_echo_n "checking what configuration name to use... " >&6; }
8075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
8076$as_echo "$CONF_NAME" >&6; }
8077
8078
8079  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8080
8081  # Input might be given as Windows format, start by converting to
8082  # unix format.
8083  path="$OUTPUT_ROOT"
8084  new_path=`$CYGPATH -u "$path"`
8085
8086  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8087  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8088  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8089  # "foo.exe" is OK but "foo" is an error.
8090  #
8091  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8092  # It is also a way to make sure we got the proper file name for the real test later on.
8093  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8094  if test "x$test_shortpath" = x; then
8095    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8096$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8097    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
8098  fi
8099
8100  # Call helper function which possibly converts this using DOS-style short mode.
8101  # If so, the updated path is stored in $new_path.
8102
8103  input_path="$new_path"
8104  # Check if we need to convert this using DOS-style short mode. If the path
8105  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8106  # take no chances and rewrite it.
8107  # Note: m4 eats our [], so we need to use [ and ] instead.
8108  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8109  if test "x$has_forbidden_chars" != x; then
8110    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8111    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8112    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8113    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8114      # Going to short mode and back again did indeed matter. Since short mode is
8115      # case insensitive, let's make it lowercase to improve readability.
8116      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8117      # Now convert it back to Unix-stile (cygpath)
8118      input_path=`$CYGPATH -u "$shortmode_path"`
8119      new_path="$input_path"
8120    fi
8121  fi
8122
8123  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8124  if test "x$test_cygdrive_prefix" = x; then
8125    # As a simple fix, exclude /usr/bin since it's not a real path.
8126    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
8127      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8128      # a path prefixed by /cygdrive for fixpath to work.
8129      new_path="$CYGWIN_ROOT_PATH$input_path"
8130    fi
8131  fi
8132
8133
8134  if test "x$path" != "x$new_path"; then
8135    OUTPUT_ROOT="$new_path"
8136    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8137$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8138  fi
8139
8140  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8141
8142  path="$OUTPUT_ROOT"
8143  has_colon=`$ECHO $path | $GREP ^.:`
8144  new_path="$path"
8145  if test "x$has_colon" = x; then
8146    # Not in mixed or Windows style, start by that.
8147    new_path=`cmd //c echo $path`
8148  fi
8149
8150
8151  input_path="$new_path"
8152  # Check if we need to convert this using DOS-style short mode. If the path
8153  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8154  # take no chances and rewrite it.
8155  # Note: m4 eats our [], so we need to use [ and ] instead.
8156  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8157  if test "x$has_forbidden_chars" != x; then
8158    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8159    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8160  fi
8161
8162
8163  windows_path="$new_path"
8164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8165    unix_path=`$CYGPATH -u "$windows_path"`
8166    new_path="$unix_path"
8167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8168    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8169    new_path="$unix_path"
8170  fi
8171
8172  if test "x$path" != "x$new_path"; then
8173    OUTPUT_ROOT="$new_path"
8174    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8175$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8176  fi
8177
8178  # Save the first 10 bytes of this path to the storage, so fixpath can work.
8179  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8180
8181  else
8182    # We're on a posix platform. Hooray! :)
8183    path="$OUTPUT_ROOT"
8184    has_space=`$ECHO "$path" | $GREP " "`
8185    if test "x$has_space" != x; then
8186      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8187$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8188      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8189    fi
8190
8191    # Use eval to expand a potential ~
8192    eval path="$path"
8193    if test ! -f "$path" && test ! -d "$path"; then
8194      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8195    fi
8196
8197    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
8198  fi
8199
8200
8201SPEC=$OUTPUT_ROOT/spec.gmk
8202
8203CONF_NAME=$CONF_NAME
8204
8205OUTPUT_ROOT=$OUTPUT_ROOT
8206
8207
8208# Most of the probed defines are put into config.h
8209ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8210
8211# The spec.gmk file contains all variables for the make system.
8212ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8213
8214# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8215ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8216
8217# The bootcycle-spec.gmk file contains support for boot cycle builds.
8218ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8219
8220# The compare.sh is used to compare the build output to other builds.
8221ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8222
8223# Spec.sh is currently used by compare-objects.sh
8224ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8225
8226# The generated Makefile knows where the spec.gmk is and where the source is.
8227# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8228# which will look for generated configurations
8229ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8230
8231
8232# Save the arguments given to us
8233echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8234
8235
8236# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8237
8238    for ac_prog in apt-get yum port pkgutil pkgadd
8239do
8240  # Extract the first word of "$ac_prog", so it can be a program name with args.
8241set dummy $ac_prog; ac_word=$2
8242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8243$as_echo_n "checking for $ac_word... " >&6; }
8244if ${ac_cv_prog_PKGHANDLER+:} false; then :
8245  $as_echo_n "(cached) " >&6
8246else
8247  if test -n "$PKGHANDLER"; then
8248  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8249else
8250as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8251for as_dir in $PATH
8252do
8253  IFS=$as_save_IFS
8254  test -z "$as_dir" && as_dir=.
8255    for ac_exec_ext in '' $ac_executable_extensions; do
8256  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8257    ac_cv_prog_PKGHANDLER="$ac_prog"
8258    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8259    break 2
8260  fi
8261done
8262  done
8263IFS=$as_save_IFS
8264
8265fi
8266fi
8267PKGHANDLER=$ac_cv_prog_PKGHANDLER
8268if test -n "$PKGHANDLER"; then
8269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8270$as_echo "$PKGHANDLER" >&6; }
8271else
8272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8273$as_echo "no" >&6; }
8274fi
8275
8276
8277  test -n "$PKGHANDLER" && break
8278done
8279
8280
8281
8282# Setup tools that requires more complex handling, or that is not needed by the configure script.
8283
8284
8285  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8286  if test "x$MAKE" != x; then
8287    # User has supplied a make, test it.
8288    if test ! -f "$MAKE"; then
8289      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8290    fi
8291
8292  MAKE_CANDIDATE=""$MAKE""
8293  DESCRIPTION="user supplied MAKE=$MAKE"
8294  if test "x$MAKE_CANDIDATE" != x; then
8295    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8296$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8297    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8298    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8299    if test "x$IS_GNU_MAKE" = x; then
8300      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8301$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8302    else
8303      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8304      if test "x$IS_MODERN_MAKE" = x; then
8305        { $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
8306$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;}
8307      else
8308        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8309          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8310            MAKE_EXPECTED_ENV='cygwin'
8311          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8312            MAKE_EXPECTED_ENV='msys'
8313          else
8314            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8315          fi
8316          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8317          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8318        else
8319          # Not relevant for non-Windows
8320          IS_MAKE_CORRECT_ENV=true
8321        fi
8322        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8323          { $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
8324$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;}
8325        else
8326          FOUND_MAKE=$MAKE_CANDIDATE
8327
8328  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8329
8330  # First separate the path from the arguments. This will split at the first
8331  # space.
8332  complete="$FOUND_MAKE"
8333  path="${complete%% *}"
8334  tmp="$complete EOL"
8335  arguments="${tmp#* }"
8336
8337  # Input might be given as Windows format, start by converting to
8338  # unix format.
8339  new_path=`$CYGPATH -u "$path"`
8340
8341  # Now try to locate executable using which
8342  new_path=`$WHICH "$new_path" 2> /dev/null`
8343  # bat and cmd files are not always considered executable in cygwin causing which
8344  # to not find them
8345  if test "x$new_path" = x \
8346           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8347           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8348    new_path=`$CYGPATH -u "$path"`
8349  fi
8350  if test "x$new_path" = x; then
8351    # Oops. Which didn't find the executable.
8352    # The splitting of arguments from the executable at a space might have been incorrect,
8353    # since paths with space are more likely in Windows. Give it another try with the whole
8354    # argument.
8355    path="$complete"
8356    arguments="EOL"
8357    new_path=`$CYGPATH -u "$path"`
8358    new_path=`$WHICH "$new_path" 2> /dev/null`
8359    # bat and cmd files are not always considered executable in cygwin causing which
8360    # to not find them
8361    if test "x$new_path" = x \
8362             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8363             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8364      new_path=`$CYGPATH -u "$path"`
8365    fi
8366    if test "x$new_path" = x; then
8367      # It's still not found. Now this is an unrecoverable error.
8368      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8369$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8370      has_space=`$ECHO "$complete" | $GREP " "`
8371      if test "x$has_space" != x; then
8372        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8373$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8374      fi
8375      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8376    fi
8377  fi
8378
8379  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8380  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8381  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8382  # "foo.exe" is OK but "foo" is an error.
8383  #
8384  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8385  # It is also a way to make sure we got the proper file name for the real test later on.
8386  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8387  if test "x$test_shortpath" = x; then
8388    # Short path failed, file does not exist as specified.
8389    # Try adding .exe or .cmd
8390    if test -f "${new_path}.exe"; then
8391       input_to_shortpath="${new_path}.exe"
8392    elif test -f "${new_path}.cmd"; then
8393       input_to_shortpath="${new_path}.cmd"
8394    else
8395      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8396$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8397      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8398$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8399      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8400    fi
8401  else
8402    input_to_shortpath="$new_path"
8403  fi
8404
8405  # Call helper function which possibly converts this using DOS-style short mode.
8406  # If so, the updated path is stored in $new_path.
8407  new_path="$input_to_shortpath"
8408
8409  input_path="$input_to_shortpath"
8410  # Check if we need to convert this using DOS-style short mode. If the path
8411  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8412  # take no chances and rewrite it.
8413  # Note: m4 eats our [], so we need to use [ and ] instead.
8414  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8415  if test "x$has_forbidden_chars" != x; then
8416    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8417    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8418    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8419    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8420      # Going to short mode and back again did indeed matter. Since short mode is
8421      # case insensitive, let's make it lowercase to improve readability.
8422      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8423      # Now convert it back to Unix-stile (cygpath)
8424      input_path=`$CYGPATH -u "$shortmode_path"`
8425      new_path="$input_path"
8426    fi
8427  fi
8428
8429  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8430  if test "x$test_cygdrive_prefix" = x; then
8431    # As a simple fix, exclude /usr/bin since it's not a real path.
8432    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8433      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8434      # a path prefixed by /cygdrive for fixpath to work.
8435      new_path="$CYGWIN_ROOT_PATH$input_path"
8436    fi
8437  fi
8438
8439  # remove trailing .exe if any
8440  new_path="${new_path/%.exe/}"
8441
8442  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8443
8444  # First separate the path from the arguments. This will split at the first
8445  # space.
8446  complete="$FOUND_MAKE"
8447  path="${complete%% *}"
8448  tmp="$complete EOL"
8449  arguments="${tmp#* }"
8450
8451  # Input might be given as Windows format, start by converting to
8452  # unix format.
8453  new_path="$path"
8454
8455  windows_path="$new_path"
8456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8457    unix_path=`$CYGPATH -u "$windows_path"`
8458    new_path="$unix_path"
8459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8460    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8461    new_path="$unix_path"
8462  fi
8463
8464
8465  # Now try to locate executable using which
8466  new_path=`$WHICH "$new_path" 2> /dev/null`
8467
8468  if test "x$new_path" = x; then
8469    # Oops. Which didn't find the executable.
8470    # The splitting of arguments from the executable at a space might have been incorrect,
8471    # since paths with space are more likely in Windows. Give it another try with the whole
8472    # argument.
8473    path="$complete"
8474    arguments="EOL"
8475    new_path="$path"
8476
8477  windows_path="$new_path"
8478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8479    unix_path=`$CYGPATH -u "$windows_path"`
8480    new_path="$unix_path"
8481  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8482    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8483    new_path="$unix_path"
8484  fi
8485
8486
8487    new_path=`$WHICH "$new_path" 2> /dev/null`
8488
8489    if test "x$new_path" = x; then
8490      # It's still not found. Now this is an unrecoverable error.
8491      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8492$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8493      has_space=`$ECHO "$complete" | $GREP " "`
8494      if test "x$has_space" != x; then
8495        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8496$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8497      fi
8498      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8499    fi
8500  fi
8501
8502  # Now new_path has a complete unix path to the binary
8503  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8504    # Keep paths in /bin as-is, but remove trailing .exe if any
8505    new_path="${new_path/%.exe/}"
8506    # Do not save /bin paths to all_fixpath_prefixes!
8507  else
8508    # Not in mixed or Windows style, start by that.
8509    new_path=`cmd //c echo $new_path`
8510
8511  input_path="$new_path"
8512  # Check if we need to convert this using DOS-style short mode. If the path
8513  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8514  # take no chances and rewrite it.
8515  # Note: m4 eats our [], so we need to use [ and ] instead.
8516  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8517  if test "x$has_forbidden_chars" != x; then
8518    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8519    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8520  fi
8521
8522    # Output is in $new_path
8523
8524  windows_path="$new_path"
8525  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8526    unix_path=`$CYGPATH -u "$windows_path"`
8527    new_path="$unix_path"
8528  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8529    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8530    new_path="$unix_path"
8531  fi
8532
8533    # remove trailing .exe if any
8534    new_path="${new_path/%.exe/}"
8535
8536    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8537    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8538  fi
8539
8540  else
8541    # We're on a posix platform. Hooray! :)
8542    # First separate the path from the arguments. This will split at the first
8543    # space.
8544    complete="$FOUND_MAKE"
8545    path="${complete%% *}"
8546    tmp="$complete EOL"
8547    arguments="${tmp#* }"
8548
8549    # Cannot rely on the command "which" here since it doesn't always work.
8550    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8551    if test -z "$is_absolute_path"; then
8552      # Path to executable is not absolute. Find it.
8553      IFS_save="$IFS"
8554      IFS=:
8555      for p in $PATH; do
8556        if test -f "$p/$path" && test -x "$p/$path"; then
8557          new_path="$p/$path"
8558          break
8559        fi
8560      done
8561      IFS="$IFS_save"
8562    else
8563      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8564$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8565      new_path="$path"
8566    fi
8567
8568    if test "x$new_path" = x; then
8569        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8570$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8571        has_space=`$ECHO "$complete" | $GREP " "`
8572        if test "x$has_space" != x; then
8573          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8574$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8575        fi
8576        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8577      fi
8578  fi
8579
8580      # Now join together the path and the arguments once again
8581      if test "x$arguments" != xEOL; then
8582        new_complete="$new_path ${arguments% *}"
8583      else
8584        new_complete="$new_path"
8585      fi
8586
8587  if test "x$complete" != "x$new_complete"; then
8588      FOUND_MAKE="$new_complete"
8589      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8590$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8591    fi
8592
8593        fi
8594      fi
8595    fi
8596  fi
8597
8598    if test "x$FOUND_MAKE" = x; then
8599      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8600    fi
8601  else
8602    # Try our hardest to locate a correct version of GNU make
8603    for ac_prog in gmake
8604do
8605  # Extract the first word of "$ac_prog", so it can be a program name with args.
8606set dummy $ac_prog; ac_word=$2
8607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8608$as_echo_n "checking for $ac_word... " >&6; }
8609if ${ac_cv_path_CHECK_GMAKE+:} false; then :
8610  $as_echo_n "(cached) " >&6
8611else
8612  case $CHECK_GMAKE in
8613  [\\/]* | ?:[\\/]*)
8614  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8615  ;;
8616  *)
8617  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8618for as_dir in $PATH
8619do
8620  IFS=$as_save_IFS
8621  test -z "$as_dir" && as_dir=.
8622    for ac_exec_ext in '' $ac_executable_extensions; do
8623  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8624    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8625    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8626    break 2
8627  fi
8628done
8629  done
8630IFS=$as_save_IFS
8631
8632  ;;
8633esac
8634fi
8635CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8636if test -n "$CHECK_GMAKE"; then
8637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8638$as_echo "$CHECK_GMAKE" >&6; }
8639else
8640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8641$as_echo "no" >&6; }
8642fi
8643
8644
8645  test -n "$CHECK_GMAKE" && break
8646done
8647
8648
8649  MAKE_CANDIDATE=""$CHECK_GMAKE""
8650  DESCRIPTION="gmake in PATH"
8651  if test "x$MAKE_CANDIDATE" != x; then
8652    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8653$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8654    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8655    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8656    if test "x$IS_GNU_MAKE" = x; then
8657      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8658$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8659    else
8660      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8661      if test "x$IS_MODERN_MAKE" = x; then
8662        { $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
8663$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;}
8664      else
8665        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8666          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8667            MAKE_EXPECTED_ENV='cygwin'
8668          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8669            MAKE_EXPECTED_ENV='msys'
8670          else
8671            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8672          fi
8673          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8674          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8675        else
8676          # Not relevant for non-Windows
8677          IS_MAKE_CORRECT_ENV=true
8678        fi
8679        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8680          { $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
8681$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;}
8682        else
8683          FOUND_MAKE=$MAKE_CANDIDATE
8684
8685  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8686
8687  # First separate the path from the arguments. This will split at the first
8688  # space.
8689  complete="$FOUND_MAKE"
8690  path="${complete%% *}"
8691  tmp="$complete EOL"
8692  arguments="${tmp#* }"
8693
8694  # Input might be given as Windows format, start by converting to
8695  # unix format.
8696  new_path=`$CYGPATH -u "$path"`
8697
8698  # Now try to locate executable using which
8699  new_path=`$WHICH "$new_path" 2> /dev/null`
8700  # bat and cmd files are not always considered executable in cygwin causing which
8701  # to not find them
8702  if test "x$new_path" = x \
8703           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8704           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8705    new_path=`$CYGPATH -u "$path"`
8706  fi
8707  if test "x$new_path" = x; then
8708    # Oops. Which didn't find the executable.
8709    # The splitting of arguments from the executable at a space might have been incorrect,
8710    # since paths with space are more likely in Windows. Give it another try with the whole
8711    # argument.
8712    path="$complete"
8713    arguments="EOL"
8714    new_path=`$CYGPATH -u "$path"`
8715    new_path=`$WHICH "$new_path" 2> /dev/null`
8716    # bat and cmd files are not always considered executable in cygwin causing which
8717    # to not find them
8718    if test "x$new_path" = x \
8719             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8720             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8721      new_path=`$CYGPATH -u "$path"`
8722    fi
8723    if test "x$new_path" = x; then
8724      # It's still not found. Now this is an unrecoverable error.
8725      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8726$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8727      has_space=`$ECHO "$complete" | $GREP " "`
8728      if test "x$has_space" != x; then
8729        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8730$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8731      fi
8732      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8733    fi
8734  fi
8735
8736  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8737  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8738  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8739  # "foo.exe" is OK but "foo" is an error.
8740  #
8741  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8742  # It is also a way to make sure we got the proper file name for the real test later on.
8743  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8744  if test "x$test_shortpath" = x; then
8745    # Short path failed, file does not exist as specified.
8746    # Try adding .exe or .cmd
8747    if test -f "${new_path}.exe"; then
8748       input_to_shortpath="${new_path}.exe"
8749    elif test -f "${new_path}.cmd"; then
8750       input_to_shortpath="${new_path}.cmd"
8751    else
8752      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8753$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8754      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8755$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8756      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8757    fi
8758  else
8759    input_to_shortpath="$new_path"
8760  fi
8761
8762  # Call helper function which possibly converts this using DOS-style short mode.
8763  # If so, the updated path is stored in $new_path.
8764  new_path="$input_to_shortpath"
8765
8766  input_path="$input_to_shortpath"
8767  # Check if we need to convert this using DOS-style short mode. If the path
8768  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8769  # take no chances and rewrite it.
8770  # Note: m4 eats our [], so we need to use [ and ] instead.
8771  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8772  if test "x$has_forbidden_chars" != x; then
8773    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8774    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8775    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8776    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8777      # Going to short mode and back again did indeed matter. Since short mode is
8778      # case insensitive, let's make it lowercase to improve readability.
8779      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8780      # Now convert it back to Unix-stile (cygpath)
8781      input_path=`$CYGPATH -u "$shortmode_path"`
8782      new_path="$input_path"
8783    fi
8784  fi
8785
8786  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8787  if test "x$test_cygdrive_prefix" = x; then
8788    # As a simple fix, exclude /usr/bin since it's not a real path.
8789    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8790      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8791      # a path prefixed by /cygdrive for fixpath to work.
8792      new_path="$CYGWIN_ROOT_PATH$input_path"
8793    fi
8794  fi
8795
8796  # remove trailing .exe if any
8797  new_path="${new_path/%.exe/}"
8798
8799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8800
8801  # First separate the path from the arguments. This will split at the first
8802  # space.
8803  complete="$FOUND_MAKE"
8804  path="${complete%% *}"
8805  tmp="$complete EOL"
8806  arguments="${tmp#* }"
8807
8808  # Input might be given as Windows format, start by converting to
8809  # unix format.
8810  new_path="$path"
8811
8812  windows_path="$new_path"
8813  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8814    unix_path=`$CYGPATH -u "$windows_path"`
8815    new_path="$unix_path"
8816  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8817    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8818    new_path="$unix_path"
8819  fi
8820
8821
8822  # Now try to locate executable using which
8823  new_path=`$WHICH "$new_path" 2> /dev/null`
8824
8825  if test "x$new_path" = x; then
8826    # Oops. Which didn't find the executable.
8827    # The splitting of arguments from the executable at a space might have been incorrect,
8828    # since paths with space are more likely in Windows. Give it another try with the whole
8829    # argument.
8830    path="$complete"
8831    arguments="EOL"
8832    new_path="$path"
8833
8834  windows_path="$new_path"
8835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8836    unix_path=`$CYGPATH -u "$windows_path"`
8837    new_path="$unix_path"
8838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8839    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8840    new_path="$unix_path"
8841  fi
8842
8843
8844    new_path=`$WHICH "$new_path" 2> /dev/null`
8845
8846    if test "x$new_path" = x; then
8847      # It's still not found. Now this is an unrecoverable error.
8848      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8849$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8850      has_space=`$ECHO "$complete" | $GREP " "`
8851      if test "x$has_space" != x; then
8852        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8853$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8854      fi
8855      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8856    fi
8857  fi
8858
8859  # Now new_path has a complete unix path to the binary
8860  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8861    # Keep paths in /bin as-is, but remove trailing .exe if any
8862    new_path="${new_path/%.exe/}"
8863    # Do not save /bin paths to all_fixpath_prefixes!
8864  else
8865    # Not in mixed or Windows style, start by that.
8866    new_path=`cmd //c echo $new_path`
8867
8868  input_path="$new_path"
8869  # Check if we need to convert this using DOS-style short mode. If the path
8870  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8871  # take no chances and rewrite it.
8872  # Note: m4 eats our [], so we need to use [ and ] instead.
8873  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8874  if test "x$has_forbidden_chars" != x; then
8875    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8876    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8877  fi
8878
8879    # Output is in $new_path
8880
8881  windows_path="$new_path"
8882  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8883    unix_path=`$CYGPATH -u "$windows_path"`
8884    new_path="$unix_path"
8885  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8886    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8887    new_path="$unix_path"
8888  fi
8889
8890    # remove trailing .exe if any
8891    new_path="${new_path/%.exe/}"
8892
8893    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8894    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8895  fi
8896
8897  else
8898    # We're on a posix platform. Hooray! :)
8899    # First separate the path from the arguments. This will split at the first
8900    # space.
8901    complete="$FOUND_MAKE"
8902    path="${complete%% *}"
8903    tmp="$complete EOL"
8904    arguments="${tmp#* }"
8905
8906    # Cannot rely on the command "which" here since it doesn't always work.
8907    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8908    if test -z "$is_absolute_path"; then
8909      # Path to executable is not absolute. Find it.
8910      IFS_save="$IFS"
8911      IFS=:
8912      for p in $PATH; do
8913        if test -f "$p/$path" && test -x "$p/$path"; then
8914          new_path="$p/$path"
8915          break
8916        fi
8917      done
8918      IFS="$IFS_save"
8919    else
8920      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8921$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8922      new_path="$path"
8923    fi
8924
8925    if test "x$new_path" = x; then
8926        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8927$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8928        has_space=`$ECHO "$complete" | $GREP " "`
8929        if test "x$has_space" != x; then
8930          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8931$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8932        fi
8933        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8934      fi
8935  fi
8936
8937      # Now join together the path and the arguments once again
8938      if test "x$arguments" != xEOL; then
8939        new_complete="$new_path ${arguments% *}"
8940      else
8941        new_complete="$new_path"
8942      fi
8943
8944  if test "x$complete" != "x$new_complete"; then
8945      FOUND_MAKE="$new_complete"
8946      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8947$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8948    fi
8949
8950        fi
8951      fi
8952    fi
8953  fi
8954
8955
8956    if test "x$FOUND_MAKE" = x; then
8957      for ac_prog in make
8958do
8959  # Extract the first word of "$ac_prog", so it can be a program name with args.
8960set dummy $ac_prog; ac_word=$2
8961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8962$as_echo_n "checking for $ac_word... " >&6; }
8963if ${ac_cv_path_CHECK_MAKE+:} false; then :
8964  $as_echo_n "(cached) " >&6
8965else
8966  case $CHECK_MAKE in
8967  [\\/]* | ?:[\\/]*)
8968  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8969  ;;
8970  *)
8971  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8972for as_dir in $PATH
8973do
8974  IFS=$as_save_IFS
8975  test -z "$as_dir" && as_dir=.
8976    for ac_exec_ext in '' $ac_executable_extensions; do
8977  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8978    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8979    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8980    break 2
8981  fi
8982done
8983  done
8984IFS=$as_save_IFS
8985
8986  ;;
8987esac
8988fi
8989CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8990if test -n "$CHECK_MAKE"; then
8991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8992$as_echo "$CHECK_MAKE" >&6; }
8993else
8994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8995$as_echo "no" >&6; }
8996fi
8997
8998
8999  test -n "$CHECK_MAKE" && break
9000done
9001
9002
9003  MAKE_CANDIDATE=""$CHECK_MAKE""
9004  DESCRIPTION="make in PATH"
9005  if test "x$MAKE_CANDIDATE" != x; then
9006    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9007$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9008    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9009    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9010    if test "x$IS_GNU_MAKE" = x; then
9011      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9012$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9013    else
9014      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9015      if test "x$IS_MODERN_MAKE" = x; then
9016        { $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
9017$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;}
9018      else
9019        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9020          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9021            MAKE_EXPECTED_ENV='cygwin'
9022          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9023            MAKE_EXPECTED_ENV='msys'
9024          else
9025            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9026          fi
9027          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9028          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9029        else
9030          # Not relevant for non-Windows
9031          IS_MAKE_CORRECT_ENV=true
9032        fi
9033        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9034          { $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
9035$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;}
9036        else
9037          FOUND_MAKE=$MAKE_CANDIDATE
9038
9039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9040
9041  # First separate the path from the arguments. This will split at the first
9042  # space.
9043  complete="$FOUND_MAKE"
9044  path="${complete%% *}"
9045  tmp="$complete EOL"
9046  arguments="${tmp#* }"
9047
9048  # Input might be given as Windows format, start by converting to
9049  # unix format.
9050  new_path=`$CYGPATH -u "$path"`
9051
9052  # Now try to locate executable using which
9053  new_path=`$WHICH "$new_path" 2> /dev/null`
9054  # bat and cmd files are not always considered executable in cygwin causing which
9055  # to not find them
9056  if test "x$new_path" = x \
9057           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9058           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9059    new_path=`$CYGPATH -u "$path"`
9060  fi
9061  if test "x$new_path" = x; then
9062    # Oops. Which didn't find the executable.
9063    # The splitting of arguments from the executable at a space might have been incorrect,
9064    # since paths with space are more likely in Windows. Give it another try with the whole
9065    # argument.
9066    path="$complete"
9067    arguments="EOL"
9068    new_path=`$CYGPATH -u "$path"`
9069    new_path=`$WHICH "$new_path" 2> /dev/null`
9070    # bat and cmd files are not always considered executable in cygwin causing which
9071    # to not find them
9072    if test "x$new_path" = x \
9073             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9074             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9075      new_path=`$CYGPATH -u "$path"`
9076    fi
9077    if test "x$new_path" = x; then
9078      # It's still not found. Now this is an unrecoverable error.
9079      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9080$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9081      has_space=`$ECHO "$complete" | $GREP " "`
9082      if test "x$has_space" != x; then
9083        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9084$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9085      fi
9086      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9087    fi
9088  fi
9089
9090  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9091  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9092  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9093  # "foo.exe" is OK but "foo" is an error.
9094  #
9095  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9096  # It is also a way to make sure we got the proper file name for the real test later on.
9097  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9098  if test "x$test_shortpath" = x; then
9099    # Short path failed, file does not exist as specified.
9100    # Try adding .exe or .cmd
9101    if test -f "${new_path}.exe"; then
9102       input_to_shortpath="${new_path}.exe"
9103    elif test -f "${new_path}.cmd"; then
9104       input_to_shortpath="${new_path}.cmd"
9105    else
9106      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9107$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9108      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9109$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9110      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9111    fi
9112  else
9113    input_to_shortpath="$new_path"
9114  fi
9115
9116  # Call helper function which possibly converts this using DOS-style short mode.
9117  # If so, the updated path is stored in $new_path.
9118  new_path="$input_to_shortpath"
9119
9120  input_path="$input_to_shortpath"
9121  # Check if we need to convert this using DOS-style short mode. If the path
9122  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9123  # take no chances and rewrite it.
9124  # Note: m4 eats our [], so we need to use [ and ] instead.
9125  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9126  if test "x$has_forbidden_chars" != x; then
9127    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9128    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9129    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9130    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9131      # Going to short mode and back again did indeed matter. Since short mode is
9132      # case insensitive, let's make it lowercase to improve readability.
9133      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9134      # Now convert it back to Unix-stile (cygpath)
9135      input_path=`$CYGPATH -u "$shortmode_path"`
9136      new_path="$input_path"
9137    fi
9138  fi
9139
9140  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9141  if test "x$test_cygdrive_prefix" = x; then
9142    # As a simple fix, exclude /usr/bin since it's not a real path.
9143    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9144      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9145      # a path prefixed by /cygdrive for fixpath to work.
9146      new_path="$CYGWIN_ROOT_PATH$input_path"
9147    fi
9148  fi
9149
9150  # remove trailing .exe if any
9151  new_path="${new_path/%.exe/}"
9152
9153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9154
9155  # First separate the path from the arguments. This will split at the first
9156  # space.
9157  complete="$FOUND_MAKE"
9158  path="${complete%% *}"
9159  tmp="$complete EOL"
9160  arguments="${tmp#* }"
9161
9162  # Input might be given as Windows format, start by converting to
9163  # unix format.
9164  new_path="$path"
9165
9166  windows_path="$new_path"
9167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9168    unix_path=`$CYGPATH -u "$windows_path"`
9169    new_path="$unix_path"
9170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9171    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9172    new_path="$unix_path"
9173  fi
9174
9175
9176  # Now try to locate executable using which
9177  new_path=`$WHICH "$new_path" 2> /dev/null`
9178
9179  if test "x$new_path" = x; then
9180    # Oops. Which didn't find the executable.
9181    # The splitting of arguments from the executable at a space might have been incorrect,
9182    # since paths with space are more likely in Windows. Give it another try with the whole
9183    # argument.
9184    path="$complete"
9185    arguments="EOL"
9186    new_path="$path"
9187
9188  windows_path="$new_path"
9189  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9190    unix_path=`$CYGPATH -u "$windows_path"`
9191    new_path="$unix_path"
9192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9193    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9194    new_path="$unix_path"
9195  fi
9196
9197
9198    new_path=`$WHICH "$new_path" 2> /dev/null`
9199
9200    if test "x$new_path" = x; then
9201      # It's still not found. Now this is an unrecoverable error.
9202      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9203$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9204      has_space=`$ECHO "$complete" | $GREP " "`
9205      if test "x$has_space" != x; then
9206        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9207$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9208      fi
9209      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9210    fi
9211  fi
9212
9213  # Now new_path has a complete unix path to the binary
9214  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9215    # Keep paths in /bin as-is, but remove trailing .exe if any
9216    new_path="${new_path/%.exe/}"
9217    # Do not save /bin paths to all_fixpath_prefixes!
9218  else
9219    # Not in mixed or Windows style, start by that.
9220    new_path=`cmd //c echo $new_path`
9221
9222  input_path="$new_path"
9223  # Check if we need to convert this using DOS-style short mode. If the path
9224  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9225  # take no chances and rewrite it.
9226  # Note: m4 eats our [], so we need to use [ and ] instead.
9227  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9228  if test "x$has_forbidden_chars" != x; then
9229    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9230    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9231  fi
9232
9233    # Output is in $new_path
9234
9235  windows_path="$new_path"
9236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9237    unix_path=`$CYGPATH -u "$windows_path"`
9238    new_path="$unix_path"
9239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9240    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9241    new_path="$unix_path"
9242  fi
9243
9244    # remove trailing .exe if any
9245    new_path="${new_path/%.exe/}"
9246
9247    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9248    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9249  fi
9250
9251  else
9252    # We're on a posix platform. Hooray! :)
9253    # First separate the path from the arguments. This will split at the first
9254    # space.
9255    complete="$FOUND_MAKE"
9256    path="${complete%% *}"
9257    tmp="$complete EOL"
9258    arguments="${tmp#* }"
9259
9260    # Cannot rely on the command "which" here since it doesn't always work.
9261    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9262    if test -z "$is_absolute_path"; then
9263      # Path to executable is not absolute. Find it.
9264      IFS_save="$IFS"
9265      IFS=:
9266      for p in $PATH; do
9267        if test -f "$p/$path" && test -x "$p/$path"; then
9268          new_path="$p/$path"
9269          break
9270        fi
9271      done
9272      IFS="$IFS_save"
9273    else
9274      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9275$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9276      new_path="$path"
9277    fi
9278
9279    if test "x$new_path" = x; then
9280        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9281$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9282        has_space=`$ECHO "$complete" | $GREP " "`
9283        if test "x$has_space" != x; then
9284          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9285$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9286        fi
9287        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9288      fi
9289  fi
9290
9291      # Now join together the path and the arguments once again
9292      if test "x$arguments" != xEOL; then
9293        new_complete="$new_path ${arguments% *}"
9294      else
9295        new_complete="$new_path"
9296      fi
9297
9298  if test "x$complete" != "x$new_complete"; then
9299      FOUND_MAKE="$new_complete"
9300      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9301$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9302    fi
9303
9304        fi
9305      fi
9306    fi
9307  fi
9308
9309    fi
9310
9311    if test "x$FOUND_MAKE" = x; then
9312      if test "x$TOOLS_DIR" != x; then
9313        # We have a tools-dir, check that as well before giving up.
9314        OLD_PATH=$PATH
9315        PATH=$TOOLS_DIR:$PATH
9316        for ac_prog in gmake
9317do
9318  # Extract the first word of "$ac_prog", so it can be a program name with args.
9319set dummy $ac_prog; ac_word=$2
9320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9321$as_echo_n "checking for $ac_word... " >&6; }
9322if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
9323  $as_echo_n "(cached) " >&6
9324else
9325  case $CHECK_TOOLSDIR_GMAKE in
9326  [\\/]* | ?:[\\/]*)
9327  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9328  ;;
9329  *)
9330  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9331for as_dir in $PATH
9332do
9333  IFS=$as_save_IFS
9334  test -z "$as_dir" && as_dir=.
9335    for ac_exec_ext in '' $ac_executable_extensions; do
9336  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9337    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9339    break 2
9340  fi
9341done
9342  done
9343IFS=$as_save_IFS
9344
9345  ;;
9346esac
9347fi
9348CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9349if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9351$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9352else
9353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9354$as_echo "no" >&6; }
9355fi
9356
9357
9358  test -n "$CHECK_TOOLSDIR_GMAKE" && break
9359done
9360
9361
9362  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9363  DESCRIPTION="gmake in tools-dir"
9364  if test "x$MAKE_CANDIDATE" != x; then
9365    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9366$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9367    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9368    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9369    if test "x$IS_GNU_MAKE" = x; then
9370      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9371$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9372    else
9373      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9374      if test "x$IS_MODERN_MAKE" = x; then
9375        { $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
9376$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;}
9377      else
9378        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9379          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9380            MAKE_EXPECTED_ENV='cygwin'
9381          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9382            MAKE_EXPECTED_ENV='msys'
9383          else
9384            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9385          fi
9386          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9387          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9388        else
9389          # Not relevant for non-Windows
9390          IS_MAKE_CORRECT_ENV=true
9391        fi
9392        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9393          { $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
9394$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;}
9395        else
9396          FOUND_MAKE=$MAKE_CANDIDATE
9397
9398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9399
9400  # First separate the path from the arguments. This will split at the first
9401  # space.
9402  complete="$FOUND_MAKE"
9403  path="${complete%% *}"
9404  tmp="$complete EOL"
9405  arguments="${tmp#* }"
9406
9407  # Input might be given as Windows format, start by converting to
9408  # unix format.
9409  new_path=`$CYGPATH -u "$path"`
9410
9411  # Now try to locate executable using which
9412  new_path=`$WHICH "$new_path" 2> /dev/null`
9413  # bat and cmd files are not always considered executable in cygwin causing which
9414  # to not find them
9415  if test "x$new_path" = x \
9416           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9417           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9418    new_path=`$CYGPATH -u "$path"`
9419  fi
9420  if test "x$new_path" = x; then
9421    # Oops. Which didn't find the executable.
9422    # The splitting of arguments from the executable at a space might have been incorrect,
9423    # since paths with space are more likely in Windows. Give it another try with the whole
9424    # argument.
9425    path="$complete"
9426    arguments="EOL"
9427    new_path=`$CYGPATH -u "$path"`
9428    new_path=`$WHICH "$new_path" 2> /dev/null`
9429    # bat and cmd files are not always considered executable in cygwin causing which
9430    # to not find them
9431    if test "x$new_path" = x \
9432             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9433             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9434      new_path=`$CYGPATH -u "$path"`
9435    fi
9436    if test "x$new_path" = x; then
9437      # It's still not found. Now this is an unrecoverable error.
9438      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9439$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9440      has_space=`$ECHO "$complete" | $GREP " "`
9441      if test "x$has_space" != x; then
9442        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9443$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9444      fi
9445      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9446    fi
9447  fi
9448
9449  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9450  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9451  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9452  # "foo.exe" is OK but "foo" is an error.
9453  #
9454  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9455  # It is also a way to make sure we got the proper file name for the real test later on.
9456  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9457  if test "x$test_shortpath" = x; then
9458    # Short path failed, file does not exist as specified.
9459    # Try adding .exe or .cmd
9460    if test -f "${new_path}.exe"; then
9461       input_to_shortpath="${new_path}.exe"
9462    elif test -f "${new_path}.cmd"; then
9463       input_to_shortpath="${new_path}.cmd"
9464    else
9465      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9466$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9467      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9468$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9469      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9470    fi
9471  else
9472    input_to_shortpath="$new_path"
9473  fi
9474
9475  # Call helper function which possibly converts this using DOS-style short mode.
9476  # If so, the updated path is stored in $new_path.
9477  new_path="$input_to_shortpath"
9478
9479  input_path="$input_to_shortpath"
9480  # Check if we need to convert this using DOS-style short mode. If the path
9481  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9482  # take no chances and rewrite it.
9483  # Note: m4 eats our [], so we need to use [ and ] instead.
9484  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9485  if test "x$has_forbidden_chars" != x; then
9486    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9487    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9488    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9489    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9490      # Going to short mode and back again did indeed matter. Since short mode is
9491      # case insensitive, let's make it lowercase to improve readability.
9492      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9493      # Now convert it back to Unix-stile (cygpath)
9494      input_path=`$CYGPATH -u "$shortmode_path"`
9495      new_path="$input_path"
9496    fi
9497  fi
9498
9499  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9500  if test "x$test_cygdrive_prefix" = x; then
9501    # As a simple fix, exclude /usr/bin since it's not a real path.
9502    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9503      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9504      # a path prefixed by /cygdrive for fixpath to work.
9505      new_path="$CYGWIN_ROOT_PATH$input_path"
9506    fi
9507  fi
9508
9509  # remove trailing .exe if any
9510  new_path="${new_path/%.exe/}"
9511
9512  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9513
9514  # First separate the path from the arguments. This will split at the first
9515  # space.
9516  complete="$FOUND_MAKE"
9517  path="${complete%% *}"
9518  tmp="$complete EOL"
9519  arguments="${tmp#* }"
9520
9521  # Input might be given as Windows format, start by converting to
9522  # unix format.
9523  new_path="$path"
9524
9525  windows_path="$new_path"
9526  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9527    unix_path=`$CYGPATH -u "$windows_path"`
9528    new_path="$unix_path"
9529  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9530    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9531    new_path="$unix_path"
9532  fi
9533
9534
9535  # Now try to locate executable using which
9536  new_path=`$WHICH "$new_path" 2> /dev/null`
9537
9538  if test "x$new_path" = x; then
9539    # Oops. Which didn't find the executable.
9540    # The splitting of arguments from the executable at a space might have been incorrect,
9541    # since paths with space are more likely in Windows. Give it another try with the whole
9542    # argument.
9543    path="$complete"
9544    arguments="EOL"
9545    new_path="$path"
9546
9547  windows_path="$new_path"
9548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9549    unix_path=`$CYGPATH -u "$windows_path"`
9550    new_path="$unix_path"
9551  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9552    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9553    new_path="$unix_path"
9554  fi
9555
9556
9557    new_path=`$WHICH "$new_path" 2> /dev/null`
9558
9559    if test "x$new_path" = x; then
9560      # It's still not found. Now this is an unrecoverable error.
9561      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9562$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9563      has_space=`$ECHO "$complete" | $GREP " "`
9564      if test "x$has_space" != x; then
9565        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9566$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9567      fi
9568      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9569    fi
9570  fi
9571
9572  # Now new_path has a complete unix path to the binary
9573  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9574    # Keep paths in /bin as-is, but remove trailing .exe if any
9575    new_path="${new_path/%.exe/}"
9576    # Do not save /bin paths to all_fixpath_prefixes!
9577  else
9578    # Not in mixed or Windows style, start by that.
9579    new_path=`cmd //c echo $new_path`
9580
9581  input_path="$new_path"
9582  # Check if we need to convert this using DOS-style short mode. If the path
9583  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9584  # take no chances and rewrite it.
9585  # Note: m4 eats our [], so we need to use [ and ] instead.
9586  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9587  if test "x$has_forbidden_chars" != x; then
9588    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9589    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9590  fi
9591
9592    # Output is in $new_path
9593
9594  windows_path="$new_path"
9595  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9596    unix_path=`$CYGPATH -u "$windows_path"`
9597    new_path="$unix_path"
9598  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9599    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9600    new_path="$unix_path"
9601  fi
9602
9603    # remove trailing .exe if any
9604    new_path="${new_path/%.exe/}"
9605
9606    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9607    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9608  fi
9609
9610  else
9611    # We're on a posix platform. Hooray! :)
9612    # First separate the path from the arguments. This will split at the first
9613    # space.
9614    complete="$FOUND_MAKE"
9615    path="${complete%% *}"
9616    tmp="$complete EOL"
9617    arguments="${tmp#* }"
9618
9619    # Cannot rely on the command "which" here since it doesn't always work.
9620    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9621    if test -z "$is_absolute_path"; then
9622      # Path to executable is not absolute. Find it.
9623      IFS_save="$IFS"
9624      IFS=:
9625      for p in $PATH; do
9626        if test -f "$p/$path" && test -x "$p/$path"; then
9627          new_path="$p/$path"
9628          break
9629        fi
9630      done
9631      IFS="$IFS_save"
9632    else
9633      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9634$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9635      new_path="$path"
9636    fi
9637
9638    if test "x$new_path" = x; then
9639        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9640$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9641        has_space=`$ECHO "$complete" | $GREP " "`
9642        if test "x$has_space" != x; then
9643          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9644$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9645        fi
9646        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9647      fi
9648  fi
9649
9650      # Now join together the path and the arguments once again
9651      if test "x$arguments" != xEOL; then
9652        new_complete="$new_path ${arguments% *}"
9653      else
9654        new_complete="$new_path"
9655      fi
9656
9657  if test "x$complete" != "x$new_complete"; then
9658      FOUND_MAKE="$new_complete"
9659      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9660$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9661    fi
9662
9663        fi
9664      fi
9665    fi
9666  fi
9667
9668        if test "x$FOUND_MAKE" = x; then
9669          for ac_prog in make
9670do
9671  # Extract the first word of "$ac_prog", so it can be a program name with args.
9672set dummy $ac_prog; ac_word=$2
9673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9674$as_echo_n "checking for $ac_word... " >&6; }
9675if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
9676  $as_echo_n "(cached) " >&6
9677else
9678  case $CHECK_TOOLSDIR_MAKE in
9679  [\\/]* | ?:[\\/]*)
9680  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9681  ;;
9682  *)
9683  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9684for as_dir in $PATH
9685do
9686  IFS=$as_save_IFS
9687  test -z "$as_dir" && as_dir=.
9688    for ac_exec_ext in '' $ac_executable_extensions; do
9689  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9690    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9691    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9692    break 2
9693  fi
9694done
9695  done
9696IFS=$as_save_IFS
9697
9698  ;;
9699esac
9700fi
9701CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9702if test -n "$CHECK_TOOLSDIR_MAKE"; then
9703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9704$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9705else
9706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9707$as_echo "no" >&6; }
9708fi
9709
9710
9711  test -n "$CHECK_TOOLSDIR_MAKE" && break
9712done
9713
9714
9715  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9716  DESCRIPTION="make in tools-dir"
9717  if test "x$MAKE_CANDIDATE" != x; then
9718    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9719$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9720    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9721    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9722    if test "x$IS_GNU_MAKE" = x; then
9723      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9724$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9725    else
9726      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9727      if test "x$IS_MODERN_MAKE" = x; then
9728        { $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
9729$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;}
9730      else
9731        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9732          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9733            MAKE_EXPECTED_ENV='cygwin'
9734          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9735            MAKE_EXPECTED_ENV='msys'
9736          else
9737            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9738          fi
9739          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9740          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9741        else
9742          # Not relevant for non-Windows
9743          IS_MAKE_CORRECT_ENV=true
9744        fi
9745        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9746          { $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
9747$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;}
9748        else
9749          FOUND_MAKE=$MAKE_CANDIDATE
9750
9751  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9752
9753  # First separate the path from the arguments. This will split at the first
9754  # space.
9755  complete="$FOUND_MAKE"
9756  path="${complete%% *}"
9757  tmp="$complete EOL"
9758  arguments="${tmp#* }"
9759
9760  # Input might be given as Windows format, start by converting to
9761  # unix format.
9762  new_path=`$CYGPATH -u "$path"`
9763
9764  # Now try to locate executable using which
9765  new_path=`$WHICH "$new_path" 2> /dev/null`
9766  # bat and cmd files are not always considered executable in cygwin causing which
9767  # to not find them
9768  if test "x$new_path" = x \
9769           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9770           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9771    new_path=`$CYGPATH -u "$path"`
9772  fi
9773  if test "x$new_path" = x; then
9774    # Oops. Which didn't find the executable.
9775    # The splitting of arguments from the executable at a space might have been incorrect,
9776    # since paths with space are more likely in Windows. Give it another try with the whole
9777    # argument.
9778    path="$complete"
9779    arguments="EOL"
9780    new_path=`$CYGPATH -u "$path"`
9781    new_path=`$WHICH "$new_path" 2> /dev/null`
9782    # bat and cmd files are not always considered executable in cygwin causing which
9783    # to not find them
9784    if test "x$new_path" = x \
9785             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9786             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9787      new_path=`$CYGPATH -u "$path"`
9788    fi
9789    if test "x$new_path" = x; then
9790      # It's still not found. Now this is an unrecoverable error.
9791      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9792$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9793      has_space=`$ECHO "$complete" | $GREP " "`
9794      if test "x$has_space" != x; then
9795        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9796$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9797      fi
9798      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9799    fi
9800  fi
9801
9802  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9803  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9804  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9805  # "foo.exe" is OK but "foo" is an error.
9806  #
9807  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9808  # It is also a way to make sure we got the proper file name for the real test later on.
9809  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9810  if test "x$test_shortpath" = x; then
9811    # Short path failed, file does not exist as specified.
9812    # Try adding .exe or .cmd
9813    if test -f "${new_path}.exe"; then
9814       input_to_shortpath="${new_path}.exe"
9815    elif test -f "${new_path}.cmd"; then
9816       input_to_shortpath="${new_path}.cmd"
9817    else
9818      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9819$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9820      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9821$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9822      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9823    fi
9824  else
9825    input_to_shortpath="$new_path"
9826  fi
9827
9828  # Call helper function which possibly converts this using DOS-style short mode.
9829  # If so, the updated path is stored in $new_path.
9830  new_path="$input_to_shortpath"
9831
9832  input_path="$input_to_shortpath"
9833  # Check if we need to convert this using DOS-style short mode. If the path
9834  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9835  # take no chances and rewrite it.
9836  # Note: m4 eats our [], so we need to use [ and ] instead.
9837  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9838  if test "x$has_forbidden_chars" != x; then
9839    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9840    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9841    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9842    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9843      # Going to short mode and back again did indeed matter. Since short mode is
9844      # case insensitive, let's make it lowercase to improve readability.
9845      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9846      # Now convert it back to Unix-stile (cygpath)
9847      input_path=`$CYGPATH -u "$shortmode_path"`
9848      new_path="$input_path"
9849    fi
9850  fi
9851
9852  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9853  if test "x$test_cygdrive_prefix" = x; then
9854    # As a simple fix, exclude /usr/bin since it's not a real path.
9855    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9856      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9857      # a path prefixed by /cygdrive for fixpath to work.
9858      new_path="$CYGWIN_ROOT_PATH$input_path"
9859    fi
9860  fi
9861
9862  # remove trailing .exe if any
9863  new_path="${new_path/%.exe/}"
9864
9865  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9866
9867  # First separate the path from the arguments. This will split at the first
9868  # space.
9869  complete="$FOUND_MAKE"
9870  path="${complete%% *}"
9871  tmp="$complete EOL"
9872  arguments="${tmp#* }"
9873
9874  # Input might be given as Windows format, start by converting to
9875  # unix format.
9876  new_path="$path"
9877
9878  windows_path="$new_path"
9879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9880    unix_path=`$CYGPATH -u "$windows_path"`
9881    new_path="$unix_path"
9882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9883    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9884    new_path="$unix_path"
9885  fi
9886
9887
9888  # Now try to locate executable using which
9889  new_path=`$WHICH "$new_path" 2> /dev/null`
9890
9891  if test "x$new_path" = x; then
9892    # Oops. Which didn't find the executable.
9893    # The splitting of arguments from the executable at a space might have been incorrect,
9894    # since paths with space are more likely in Windows. Give it another try with the whole
9895    # argument.
9896    path="$complete"
9897    arguments="EOL"
9898    new_path="$path"
9899
9900  windows_path="$new_path"
9901  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9902    unix_path=`$CYGPATH -u "$windows_path"`
9903    new_path="$unix_path"
9904  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9905    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9906    new_path="$unix_path"
9907  fi
9908
9909
9910    new_path=`$WHICH "$new_path" 2> /dev/null`
9911
9912    if test "x$new_path" = x; then
9913      # It's still not found. Now this is an unrecoverable error.
9914      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9915$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9916      has_space=`$ECHO "$complete" | $GREP " "`
9917      if test "x$has_space" != x; then
9918        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9919$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9920      fi
9921      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9922    fi
9923  fi
9924
9925  # Now new_path has a complete unix path to the binary
9926  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9927    # Keep paths in /bin as-is, but remove trailing .exe if any
9928    new_path="${new_path/%.exe/}"
9929    # Do not save /bin paths to all_fixpath_prefixes!
9930  else
9931    # Not in mixed or Windows style, start by that.
9932    new_path=`cmd //c echo $new_path`
9933
9934  input_path="$new_path"
9935  # Check if we need to convert this using DOS-style short mode. If the path
9936  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9937  # take no chances and rewrite it.
9938  # Note: m4 eats our [], so we need to use [ and ] instead.
9939  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9940  if test "x$has_forbidden_chars" != x; then
9941    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9942    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9943  fi
9944
9945    # Output is in $new_path
9946
9947  windows_path="$new_path"
9948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9949    unix_path=`$CYGPATH -u "$windows_path"`
9950    new_path="$unix_path"
9951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9952    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9953    new_path="$unix_path"
9954  fi
9955
9956    # remove trailing .exe if any
9957    new_path="${new_path/%.exe/}"
9958
9959    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9960    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9961  fi
9962
9963  else
9964    # We're on a posix platform. Hooray! :)
9965    # First separate the path from the arguments. This will split at the first
9966    # space.
9967    complete="$FOUND_MAKE"
9968    path="${complete%% *}"
9969    tmp="$complete EOL"
9970    arguments="${tmp#* }"
9971
9972    # Cannot rely on the command "which" here since it doesn't always work.
9973    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9974    if test -z "$is_absolute_path"; then
9975      # Path to executable is not absolute. Find it.
9976      IFS_save="$IFS"
9977      IFS=:
9978      for p in $PATH; do
9979        if test -f "$p/$path" && test -x "$p/$path"; then
9980          new_path="$p/$path"
9981          break
9982        fi
9983      done
9984      IFS="$IFS_save"
9985    else
9986      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9987$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9988      new_path="$path"
9989    fi
9990
9991    if test "x$new_path" = x; then
9992        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9993$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9994        has_space=`$ECHO "$complete" | $GREP " "`
9995        if test "x$has_space" != x; then
9996          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9997$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9998        fi
9999        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
10000      fi
10001  fi
10002
10003      # Now join together the path and the arguments once again
10004      if test "x$arguments" != xEOL; then
10005        new_complete="$new_path ${arguments% *}"
10006      else
10007        new_complete="$new_path"
10008      fi
10009
10010  if test "x$complete" != "x$new_complete"; then
10011      FOUND_MAKE="$new_complete"
10012      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
10013$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
10014    fi
10015
10016        fi
10017      fi
10018    fi
10019  fi
10020
10021        fi
10022        PATH=$OLD_PATH
10023      fi
10024    fi
10025
10026    if test "x$FOUND_MAKE" = x; then
10027      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
10028    fi
10029  fi
10030
10031  MAKE=$FOUND_MAKE
10032
10033  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
10034$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
10035
10036
10037
10038    # Test if find supports -delete
10039    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
10040$as_echo_n "checking if find supports -delete... " >&6; }
10041    FIND_DELETE="-delete"
10042
10043    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
10044
10045    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
10046
10047    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
10048    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
10049        # No, it does not.
10050        rm $DELETEDIR/TestIfFindSupportsDelete
10051        FIND_DELETE="-exec rm \{\} \+"
10052        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10053$as_echo "no" >&6; }
10054    else
10055        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10056$as_echo "yes" >&6; }
10057    fi
10058    rmdir $DELETEDIR
10059
10060
10061
10062# These tools might not be installed by default,
10063# need hint on how to install them.
10064
10065    for ac_prog in unzip
10066do
10067  # Extract the first word of "$ac_prog", so it can be a program name with args.
10068set dummy $ac_prog; ac_word=$2
10069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10070$as_echo_n "checking for $ac_word... " >&6; }
10071if ${ac_cv_path_UNZIP+:} false; then :
10072  $as_echo_n "(cached) " >&6
10073else
10074  case $UNZIP in
10075  [\\/]* | ?:[\\/]*)
10076  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
10077  ;;
10078  *)
10079  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10080for as_dir in $PATH
10081do
10082  IFS=$as_save_IFS
10083  test -z "$as_dir" && as_dir=.
10084    for ac_exec_ext in '' $ac_executable_extensions; do
10085  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10086    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
10087    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10088    break 2
10089  fi
10090done
10091  done
10092IFS=$as_save_IFS
10093
10094  ;;
10095esac
10096fi
10097UNZIP=$ac_cv_path_UNZIP
10098if test -n "$UNZIP"; then
10099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
10100$as_echo "$UNZIP" >&6; }
10101else
10102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10103$as_echo "no" >&6; }
10104fi
10105
10106
10107  test -n "$UNZIP" && break
10108done
10109
10110
10111    if test "x$UNZIP" = x; then
10112        if test "xunzip" = x; then
10113          PROG_NAME=unzip
10114        else
10115          PROG_NAME=unzip
10116        fi
10117        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10118$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10119        as_fn_error $? "Cannot continue" "$LINENO" 5
10120    fi
10121
10122
10123
10124    for ac_prog in zip
10125do
10126  # Extract the first word of "$ac_prog", so it can be a program name with args.
10127set dummy $ac_prog; ac_word=$2
10128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10129$as_echo_n "checking for $ac_word... " >&6; }
10130if ${ac_cv_path_ZIP+:} false; then :
10131  $as_echo_n "(cached) " >&6
10132else
10133  case $ZIP in
10134  [\\/]* | ?:[\\/]*)
10135  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
10136  ;;
10137  *)
10138  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10139for as_dir in $PATH
10140do
10141  IFS=$as_save_IFS
10142  test -z "$as_dir" && as_dir=.
10143    for ac_exec_ext in '' $ac_executable_extensions; do
10144  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10145    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
10146    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10147    break 2
10148  fi
10149done
10150  done
10151IFS=$as_save_IFS
10152
10153  ;;
10154esac
10155fi
10156ZIP=$ac_cv_path_ZIP
10157if test -n "$ZIP"; then
10158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
10159$as_echo "$ZIP" >&6; }
10160else
10161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10162$as_echo "no" >&6; }
10163fi
10164
10165
10166  test -n "$ZIP" && break
10167done
10168
10169
10170    if test "x$ZIP" = x; then
10171        if test "xzip" = x; then
10172          PROG_NAME=zip
10173        else
10174          PROG_NAME=zip
10175        fi
10176        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10177$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10178        as_fn_error $? "Cannot continue" "$LINENO" 5
10179    fi
10180
10181
10182
10183# Non-required basic tools
10184
10185# Extract the first word of "ldd", so it can be a program name with args.
10186set dummy ldd; ac_word=$2
10187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10188$as_echo_n "checking for $ac_word... " >&6; }
10189if ${ac_cv_path_LDD+:} false; then :
10190  $as_echo_n "(cached) " >&6
10191else
10192  case $LDD in
10193  [\\/]* | ?:[\\/]*)
10194  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10195  ;;
10196  *)
10197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10198for as_dir in $PATH
10199do
10200  IFS=$as_save_IFS
10201  test -z "$as_dir" && as_dir=.
10202    for ac_exec_ext in '' $ac_executable_extensions; do
10203  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10204    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10206    break 2
10207  fi
10208done
10209  done
10210IFS=$as_save_IFS
10211
10212  ;;
10213esac
10214fi
10215LDD=$ac_cv_path_LDD
10216if test -n "$LDD"; then
10217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10218$as_echo "$LDD" >&6; }
10219else
10220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10221$as_echo "no" >&6; }
10222fi
10223
10224
10225if test "x$LDD" = "x"; then
10226    # List shared lib dependencies is used for
10227    # debug output and checking for forbidden dependencies.
10228    # We can build without it.
10229    LDD="true"
10230fi
10231# Extract the first word of "otool", so it can be a program name with args.
10232set dummy otool; ac_word=$2
10233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10234$as_echo_n "checking for $ac_word... " >&6; }
10235if ${ac_cv_path_OTOOL+:} false; then :
10236  $as_echo_n "(cached) " >&6
10237else
10238  case $OTOOL in
10239  [\\/]* | ?:[\\/]*)
10240  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10241  ;;
10242  *)
10243  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10244for as_dir in $PATH
10245do
10246  IFS=$as_save_IFS
10247  test -z "$as_dir" && as_dir=.
10248    for ac_exec_ext in '' $ac_executable_extensions; do
10249  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10250    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10251    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10252    break 2
10253  fi
10254done
10255  done
10256IFS=$as_save_IFS
10257
10258  ;;
10259esac
10260fi
10261OTOOL=$ac_cv_path_OTOOL
10262if test -n "$OTOOL"; then
10263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10264$as_echo "$OTOOL" >&6; }
10265else
10266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10267$as_echo "no" >&6; }
10268fi
10269
10270
10271if test "x$OTOOL" = "x"; then
10272   OTOOL="true"
10273fi
10274for ac_prog in readelf greadelf
10275do
10276  # Extract the first word of "$ac_prog", so it can be a program name with args.
10277set dummy $ac_prog; ac_word=$2
10278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10279$as_echo_n "checking for $ac_word... " >&6; }
10280if ${ac_cv_path_READELF+:} false; then :
10281  $as_echo_n "(cached) " >&6
10282else
10283  case $READELF in
10284  [\\/]* | ?:[\\/]*)
10285  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10286  ;;
10287  *)
10288  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10289for as_dir in $PATH
10290do
10291  IFS=$as_save_IFS
10292  test -z "$as_dir" && as_dir=.
10293    for ac_exec_ext in '' $ac_executable_extensions; do
10294  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10295    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10296    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10297    break 2
10298  fi
10299done
10300  done
10301IFS=$as_save_IFS
10302
10303  ;;
10304esac
10305fi
10306READELF=$ac_cv_path_READELF
10307if test -n "$READELF"; then
10308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10309$as_echo "$READELF" >&6; }
10310else
10311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10312$as_echo "no" >&6; }
10313fi
10314
10315
10316  test -n "$READELF" && break
10317done
10318
10319# Extract the first word of "hg", so it can be a program name with args.
10320set dummy hg; ac_word=$2
10321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10322$as_echo_n "checking for $ac_word... " >&6; }
10323if ${ac_cv_path_HG+:} false; then :
10324  $as_echo_n "(cached) " >&6
10325else
10326  case $HG in
10327  [\\/]* | ?:[\\/]*)
10328  ac_cv_path_HG="$HG" # Let the user override the test with a path.
10329  ;;
10330  *)
10331  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10332for as_dir in $PATH
10333do
10334  IFS=$as_save_IFS
10335  test -z "$as_dir" && as_dir=.
10336    for ac_exec_ext in '' $ac_executable_extensions; do
10337  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10338    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10339    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10340    break 2
10341  fi
10342done
10343  done
10344IFS=$as_save_IFS
10345
10346  ;;
10347esac
10348fi
10349HG=$ac_cv_path_HG
10350if test -n "$HG"; then
10351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10352$as_echo "$HG" >&6; }
10353else
10354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10355$as_echo "no" >&6; }
10356fi
10357
10358
10359# Extract the first word of "stat", so it can be a program name with args.
10360set dummy stat; ac_word=$2
10361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10362$as_echo_n "checking for $ac_word... " >&6; }
10363if ${ac_cv_path_STAT+:} false; then :
10364  $as_echo_n "(cached) " >&6
10365else
10366  case $STAT in
10367  [\\/]* | ?:[\\/]*)
10368  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10369  ;;
10370  *)
10371  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10372for as_dir in $PATH
10373do
10374  IFS=$as_save_IFS
10375  test -z "$as_dir" && as_dir=.
10376    for ac_exec_ext in '' $ac_executable_extensions; do
10377  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10378    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10379    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10380    break 2
10381  fi
10382done
10383  done
10384IFS=$as_save_IFS
10385
10386  ;;
10387esac
10388fi
10389STAT=$ac_cv_path_STAT
10390if test -n "$STAT"; then
10391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10392$as_echo "$STAT" >&6; }
10393else
10394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10395$as_echo "no" >&6; }
10396fi
10397
10398
10399# Extract the first word of "time", so it can be a program name with args.
10400set dummy time; ac_word=$2
10401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10402$as_echo_n "checking for $ac_word... " >&6; }
10403if ${ac_cv_path_TIME+:} false; then :
10404  $as_echo_n "(cached) " >&6
10405else
10406  case $TIME in
10407  [\\/]* | ?:[\\/]*)
10408  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10409  ;;
10410  *)
10411  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10412for as_dir in $PATH
10413do
10414  IFS=$as_save_IFS
10415  test -z "$as_dir" && as_dir=.
10416    for ac_exec_ext in '' $ac_executable_extensions; do
10417  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10418    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10419    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10420    break 2
10421  fi
10422done
10423  done
10424IFS=$as_save_IFS
10425
10426  ;;
10427esac
10428fi
10429TIME=$ac_cv_path_TIME
10430if test -n "$TIME"; then
10431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10432$as_echo "$TIME" >&6; }
10433else
10434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10435$as_echo "no" >&6; }
10436fi
10437
10438
10439# Check if it's GNU time
10440IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
10441if test "x$IS_GNU_TIME" != x; then
10442  IS_GNU_TIME=yes
10443else
10444  IS_GNU_TIME=no
10445fi
10446
10447
10448if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10449
10450    for ac_prog in comm
10451do
10452  # Extract the first word of "$ac_prog", so it can be a program name with args.
10453set dummy $ac_prog; ac_word=$2
10454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10455$as_echo_n "checking for $ac_word... " >&6; }
10456if ${ac_cv_path_COMM+:} false; then :
10457  $as_echo_n "(cached) " >&6
10458else
10459  case $COMM in
10460  [\\/]* | ?:[\\/]*)
10461  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10462  ;;
10463  *)
10464  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10465for as_dir in $PATH
10466do
10467  IFS=$as_save_IFS
10468  test -z "$as_dir" && as_dir=.
10469    for ac_exec_ext in '' $ac_executable_extensions; do
10470  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10471    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10472    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10473    break 2
10474  fi
10475done
10476  done
10477IFS=$as_save_IFS
10478
10479  ;;
10480esac
10481fi
10482COMM=$ac_cv_path_COMM
10483if test -n "$COMM"; then
10484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10485$as_echo "$COMM" >&6; }
10486else
10487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10488$as_echo "no" >&6; }
10489fi
10490
10491
10492  test -n "$COMM" && break
10493done
10494
10495
10496    if test "x$COMM" = x; then
10497        if test "xcomm" = x; then
10498          PROG_NAME=comm
10499        else
10500          PROG_NAME=comm
10501        fi
10502        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10503$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10504        as_fn_error $? "Cannot continue" "$LINENO" 5
10505    fi
10506
10507
10508fi
10509
10510if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
10511
10512    for ac_prog in xattr
10513do
10514  # Extract the first word of "$ac_prog", so it can be a program name with args.
10515set dummy $ac_prog; ac_word=$2
10516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10517$as_echo_n "checking for $ac_word... " >&6; }
10518if ${ac_cv_path_XATTR+:} false; then :
10519  $as_echo_n "(cached) " >&6
10520else
10521  case $XATTR in
10522  [\\/]* | ?:[\\/]*)
10523  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
10524  ;;
10525  *)
10526  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10527for as_dir in $PATH
10528do
10529  IFS=$as_save_IFS
10530  test -z "$as_dir" && as_dir=.
10531    for ac_exec_ext in '' $ac_executable_extensions; do
10532  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10533    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
10534    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10535    break 2
10536  fi
10537done
10538  done
10539IFS=$as_save_IFS
10540
10541  ;;
10542esac
10543fi
10544XATTR=$ac_cv_path_XATTR
10545if test -n "$XATTR"; then
10546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
10547$as_echo "$XATTR" >&6; }
10548else
10549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10550$as_echo "no" >&6; }
10551fi
10552
10553
10554  test -n "$XATTR" && break
10555done
10556
10557
10558    if test "x$XATTR" = x; then
10559        if test "xxattr" = x; then
10560          PROG_NAME=xattr
10561        else
10562          PROG_NAME=xattr
10563        fi
10564        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10565$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10566        as_fn_error $? "Cannot continue" "$LINENO" 5
10567    fi
10568
10569
10570  # Extract the first word of "codesign", so it can be a program name with args.
10571set dummy codesign; ac_word=$2
10572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10573$as_echo_n "checking for $ac_word... " >&6; }
10574if ${ac_cv_path_CODESIGN+:} false; then :
10575  $as_echo_n "(cached) " >&6
10576else
10577  case $CODESIGN in
10578  [\\/]* | ?:[\\/]*)
10579  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
10580  ;;
10581  *)
10582  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10583for as_dir in $PATH
10584do
10585  IFS=$as_save_IFS
10586  test -z "$as_dir" && as_dir=.
10587    for ac_exec_ext in '' $ac_executable_extensions; do
10588  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10589    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
10590    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10591    break 2
10592  fi
10593done
10594  done
10595IFS=$as_save_IFS
10596
10597  ;;
10598esac
10599fi
10600CODESIGN=$ac_cv_path_CODESIGN
10601if test -n "$CODESIGN"; then
10602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
10603$as_echo "$CODESIGN" >&6; }
10604else
10605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10606$as_echo "no" >&6; }
10607fi
10608
10609
10610  if test "x$CODESIGN" != "x"; then
10611    # Verify that the openjdk_codesign certificate is present
10612    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
10613$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
10614    rm -f codesign-testfile
10615    touch codesign-testfile
10616    codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
10617    rm -f codesign-testfile
10618    if test "x$CODESIGN" = x; then
10619      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10620$as_echo "no" >&6; }
10621    else
10622      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10623$as_echo "yes" >&6; }
10624    fi
10625  fi
10626fi
10627
10628
10629# Check if pkg-config is available.
10630
10631
10632if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10633	if test -n "$ac_tool_prefix"; then
10634  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10635set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10637$as_echo_n "checking for $ac_word... " >&6; }
10638if ${ac_cv_path_PKG_CONFIG+:} false; then :
10639  $as_echo_n "(cached) " >&6
10640else
10641  case $PKG_CONFIG in
10642  [\\/]* | ?:[\\/]*)
10643  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10644  ;;
10645  *)
10646  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10647for as_dir in $PATH
10648do
10649  IFS=$as_save_IFS
10650  test -z "$as_dir" && as_dir=.
10651    for ac_exec_ext in '' $ac_executable_extensions; do
10652  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10653    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10654    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10655    break 2
10656  fi
10657done
10658  done
10659IFS=$as_save_IFS
10660
10661  ;;
10662esac
10663fi
10664PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10665if test -n "$PKG_CONFIG"; then
10666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10667$as_echo "$PKG_CONFIG" >&6; }
10668else
10669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10670$as_echo "no" >&6; }
10671fi
10672
10673
10674fi
10675if test -z "$ac_cv_path_PKG_CONFIG"; then
10676  ac_pt_PKG_CONFIG=$PKG_CONFIG
10677  # Extract the first word of "pkg-config", so it can be a program name with args.
10678set dummy pkg-config; ac_word=$2
10679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10680$as_echo_n "checking for $ac_word... " >&6; }
10681if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10682  $as_echo_n "(cached) " >&6
10683else
10684  case $ac_pt_PKG_CONFIG in
10685  [\\/]* | ?:[\\/]*)
10686  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10687  ;;
10688  *)
10689  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10690for as_dir in $PATH
10691do
10692  IFS=$as_save_IFS
10693  test -z "$as_dir" && as_dir=.
10694    for ac_exec_ext in '' $ac_executable_extensions; do
10695  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10696    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10697    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10698    break 2
10699  fi
10700done
10701  done
10702IFS=$as_save_IFS
10703
10704  ;;
10705esac
10706fi
10707ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10708if test -n "$ac_pt_PKG_CONFIG"; then
10709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10710$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10711else
10712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10713$as_echo "no" >&6; }
10714fi
10715
10716  if test "x$ac_pt_PKG_CONFIG" = x; then
10717    PKG_CONFIG=""
10718  else
10719    case $cross_compiling:$ac_tool_warned in
10720yes:)
10721{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10722$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10723ac_tool_warned=yes ;;
10724esac
10725    PKG_CONFIG=$ac_pt_PKG_CONFIG
10726  fi
10727else
10728  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10729fi
10730
10731fi
10732if test -n "$PKG_CONFIG"; then
10733	_pkg_min_version=0.9.0
10734	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10735$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10736	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10737		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10738$as_echo "yes" >&6; }
10739	else
10740		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10741$as_echo "no" >&6; }
10742		PKG_CONFIG=""
10743	fi
10744
10745fi
10746
10747# After basic tools have been setup, we can check build os specific details.
10748
10749###############################################################################
10750
10751# Note that this is the build platform OS version!
10752
10753OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10754OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10755OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10756OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10757
10758
10759
10760
10761
10762# Setup builddeps, for automatic downloading of tools we need.
10763# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10764# boot-jdk setup, but we need to have basic tools setup first.
10765
10766
10767# Check whether --with-builddeps-conf was given.
10768if test "${with_builddeps_conf+set}" = set; then :
10769  withval=$with_builddeps_conf;
10770fi
10771
10772
10773
10774# Check whether --with-builddeps-server was given.
10775if test "${with_builddeps_server+set}" = set; then :
10776  withval=$with_builddeps_server;
10777fi
10778
10779
10780
10781# Check whether --with-builddeps-dir was given.
10782if test "${with_builddeps_dir+set}" = set; then :
10783  withval=$with_builddeps_dir;
10784else
10785  with_builddeps_dir=/localhome/builddeps
10786fi
10787
10788
10789
10790# Check whether --with-builddeps-group was given.
10791if test "${with_builddeps_group+set}" = set; then :
10792  withval=$with_builddeps_group;
10793fi
10794
10795
10796
10797
10798    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10799        if test "x$with_builddeps_conf" != x; then
10800            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10801$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10802            builddepsfile=$with_builddeps_conf
10803            if test -s $builddepsfile; then
10804                . $builddepsfile
10805                { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10806$as_echo "loaded!" >&6; }
10807            else
10808               as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10809           fi
10810        else
10811            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10812$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10813            builddepsfile=`mktemp`
10814            touch $builddepsfile
10815            # Put all found confs into a single file.
10816            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10817            # Source the file to acquire the variables
10818            if test -s $builddepsfile; then
10819                . $builddepsfile
10820                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10821$as_echo "found at least one!" >&6; }
10822            else
10823               as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10824           fi
10825        fi
10826        # Create build and target names that use _ instead of "-" and ".".
10827        # This is necessary to use them in variable names.
10828        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10829        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10830        # Extract rewrite information for build and target
10831        eval rewritten_build=\${REWRITE_${build_var}}
10832        if test "x$rewritten_build" = x; then
10833            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10834            echo Build stays the same $rewritten_build
10835        else
10836            echo Rewriting build for builddeps into $rewritten_build
10837        fi
10838        eval rewritten_target=\${REWRITE_${target_var}}
10839        if test "x$rewritten_target" = x; then
10840            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10841            echo Target stays the same $rewritten_target
10842        else
10843            echo Rewriting target for builddeps into $rewritten_target
10844        fi
10845        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10846        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10847    fi
10848    for ac_prog in 7z unzip
10849do
10850  # Extract the first word of "$ac_prog", so it can be a program name with args.
10851set dummy $ac_prog; ac_word=$2
10852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10853$as_echo_n "checking for $ac_word... " >&6; }
10854if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
10855  $as_echo_n "(cached) " >&6
10856else
10857  if test -n "$BDEPS_UNZIP"; then
10858  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10859else
10860as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10861for as_dir in $PATH
10862do
10863  IFS=$as_save_IFS
10864  test -z "$as_dir" && as_dir=.
10865    for ac_exec_ext in '' $ac_executable_extensions; do
10866  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10867    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10868    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10869    break 2
10870  fi
10871done
10872  done
10873IFS=$as_save_IFS
10874
10875fi
10876fi
10877BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10878if test -n "$BDEPS_UNZIP"; then
10879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10880$as_echo "$BDEPS_UNZIP" >&6; }
10881else
10882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10883$as_echo "no" >&6; }
10884fi
10885
10886
10887  test -n "$BDEPS_UNZIP" && break
10888done
10889
10890    if test "x$BDEPS_UNZIP" = x7z; then
10891        BDEPS_UNZIP="7z x"
10892    fi
10893
10894    for ac_prog in wget lftp ftp
10895do
10896  # Extract the first word of "$ac_prog", so it can be a program name with args.
10897set dummy $ac_prog; ac_word=$2
10898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10899$as_echo_n "checking for $ac_word... " >&6; }
10900if ${ac_cv_prog_BDEPS_FTP+:} false; then :
10901  $as_echo_n "(cached) " >&6
10902else
10903  if test -n "$BDEPS_FTP"; then
10904  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10905else
10906as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10907for as_dir in $PATH
10908do
10909  IFS=$as_save_IFS
10910  test -z "$as_dir" && as_dir=.
10911    for ac_exec_ext in '' $ac_executable_extensions; do
10912  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10913    ac_cv_prog_BDEPS_FTP="$ac_prog"
10914    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10915    break 2
10916  fi
10917done
10918  done
10919IFS=$as_save_IFS
10920
10921fi
10922fi
10923BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10924if test -n "$BDEPS_FTP"; then
10925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10926$as_echo "$BDEPS_FTP" >&6; }
10927else
10928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10929$as_echo "no" >&6; }
10930fi
10931
10932
10933  test -n "$BDEPS_FTP" && break
10934done
10935
10936
10937
10938###############################################################################
10939#
10940# Determine OpenJDK variants, options and version numbers.
10941#
10942###############################################################################
10943
10944# We need build & target for this.
10945
10946
10947###############################################################################
10948#
10949# Should we build a JDK/JVM with headful support (ie a graphical ui)?
10950# We always build headless support.
10951#
10952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10953$as_echo_n "checking headful support... " >&6; }
10954# Check whether --enable-headful was given.
10955if test "${enable_headful+set}" = set; then :
10956  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10957else
10958  SUPPORT_HEADFUL=yes
10959fi
10960
10961
10962SUPPORT_HEADLESS=yes
10963BUILD_HEADLESS="BUILD_HEADLESS:=true"
10964
10965if test "x$SUPPORT_HEADFUL" = xyes; then
10966    # We are building both headful and headless.
10967    headful_msg="inlude support for both headful and headless"
10968fi
10969
10970if test "x$SUPPORT_HEADFUL" = xno; then
10971    # Thus we are building headless only.
10972    BUILD_HEADLESS="BUILD_HEADLESS:=true"
10973    headful_msg="headless only"
10974fi
10975
10976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10977$as_echo "$headful_msg" >&6; }
10978
10979
10980
10981
10982
10983# Control wether Hotspot runs Queens test after build.
10984# Check whether --enable-hotspot-test-in-build was given.
10985if test "${enable_hotspot_test_in_build+set}" = set; then :
10986  enableval=$enable_hotspot_test_in_build;
10987else
10988  enable_hotspot_test_in_build=no
10989fi
10990
10991if test "x$enable_hotspot_test_in_build" = "xyes"; then
10992    TEST_IN_BUILD=true
10993else
10994    TEST_IN_BUILD=false
10995fi
10996
10997
10998###############################################################################
10999#
11000# Choose cacerts source file
11001#
11002
11003# Check whether --with-cacerts-file was given.
11004if test "${with_cacerts_file+set}" = set; then :
11005  withval=$with_cacerts_file;
11006fi
11007
11008if test "x$with_cacerts_file" != x; then
11009    CACERTS_FILE=$with_cacerts_file
11010else
11011    CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
11012fi
11013
11014
11015###############################################################################
11016#
11017# Enable or disable unlimited crypto
11018#
11019# Check whether --enable-unlimited-crypto was given.
11020if test "${enable_unlimited_crypto+set}" = set; then :
11021  enableval=$enable_unlimited_crypto;
11022else
11023  enable_unlimited_crypto=no
11024fi
11025
11026if test "x$enable_unlimited_crypto" = "xyes"; then
11027    UNLIMITED_CRYPTO=true
11028else
11029    UNLIMITED_CRYPTO=false
11030fi
11031
11032
11033###############################################################################
11034#
11035# Enable or disable the elliptic curve crypto implementation
11036#
11037
11038
11039###############################################################################
11040#
11041# Compress jars
11042#
11043COMPRESS_JARS=false
11044
11045
11046
11047
11048# Source the version numbers
11049. $AUTOCONF_DIR/version-numbers
11050
11051# Get the settings from parameters
11052
11053# Check whether --with-milestone was given.
11054if test "${with_milestone+set}" = set; then :
11055  withval=$with_milestone;
11056fi
11057
11058if test "x$with_milestone" = xyes; then
11059  as_fn_error $? "Milestone must have a value" "$LINENO" 5
11060elif test "x$with_milestone" != x; then
11061    MILESTONE="$with_milestone"
11062fi
11063if test "x$MILESTONE" = x; then
11064  MILESTONE=internal
11065fi
11066
11067
11068# Check whether --with-update-version was given.
11069if test "${with_update_version+set}" = set; then :
11070  withval=$with_update_version;
11071fi
11072
11073if test "x$with_update_version" = xyes; then
11074  as_fn_error $? "Update version must have a value" "$LINENO" 5
11075elif test "x$with_update_version" != x; then
11076  JDK_UPDATE_VERSION="$with_update_version"
11077fi
11078
11079
11080# Check whether --with-build-number was given.
11081if test "${with_build_number+set}" = set; then :
11082  withval=$with_build_number;
11083fi
11084
11085if test "x$with_build_number" = xyes; then
11086  as_fn_error $? "Build number must have a value" "$LINENO" 5
11087elif test "x$with_build_number" != x; then
11088  JDK_BUILD_NUMBER="$with_build_number"
11089fi
11090if test "x$JDK_BUILD_NUMBER" = x; then
11091  JDK_BUILD_NUMBER=b00
11092fi
11093
11094
11095# Check whether --with-user-release-suffix was given.
11096if test "${with_user_release_suffix+set}" = set; then :
11097  withval=$with_user_release_suffix;
11098fi
11099
11100if test "x$with_user_release_suffix" = xyes; then
11101  as_fn_error $? "Release suffix must have a value" "$LINENO" 5
11102elif test "x$with_user_release_suffix" != x; then
11103  USER_RELEASE_SUFFIX="$with_user_release_suffix"
11104else
11105  BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
11106  # Avoid [:alnum:] since it depends on the locale.
11107  CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
11108  USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11109fi
11110
11111
11112# Now set the JDK version, milestone, build number etc.
11113
11114
11115
11116
11117
11118
11119
11120
11121
11122
11123
11124
11125
11126
11127COPYRIGHT_YEAR=`date +'%Y'`
11128
11129
11130if test "x$JDK_UPDATE_VERSION" != x; then
11131  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
11132else
11133  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
11134fi
11135
11136
11137COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
11138
11139
11140
11141###############################################################################
11142#
11143# Setup BootJDK, used to bootstrap the build.
11144#
11145###############################################################################
11146
11147
11148BOOT_JDK_FOUND=no
11149
11150# Check whether --with-boot-jdk was given.
11151if test "${with_boot_jdk+set}" = set; then :
11152  withval=$with_boot_jdk;
11153fi
11154
11155
11156# We look for the Boot JDK through various means, going from more certain to
11157# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
11158# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
11159# must check if this is indeed valid; otherwise we'll continue looking.
11160
11161# Test: Is bootjdk explicitely set by command line arguments?
11162
11163  if test "x$BOOT_JDK_FOUND" = xno; then
11164    # Now execute the test
11165
11166if test "x$with_boot_jdk" != x; then
11167    BOOT_JDK=$with_boot_jdk
11168    BOOT_JDK_FOUND=maybe
11169    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
11170$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
11171fi
11172
11173
11174    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11175    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11176      # Do we have a bin/java?
11177      if test ! -x "$BOOT_JDK/bin/java"; then
11178        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11179$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11180        BOOT_JDK_FOUND=no
11181      else
11182        # Do we have a bin/javac?
11183        if test ! -x "$BOOT_JDK/bin/javac"; then
11184          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11185$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11186          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11187$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11188          BOOT_JDK_FOUND=no
11189        else
11190          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11191          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11192            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11193$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11194            BOOT_JDK_FOUND=no
11195          else
11196            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11197            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11198
11199            # Extra M4 quote needed to protect [] in grep expression.
11200            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11201            if test "x$FOUND_VERSION_78" = x; then
11202              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11203$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11204              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11205$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11206              BOOT_JDK_FOUND=no
11207            else
11208              # We're done! :-)
11209              BOOT_JDK_FOUND=yes
11210
11211  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11212
11213  # Input might be given as Windows format, start by converting to
11214  # unix format.
11215  path="$BOOT_JDK"
11216  new_path=`$CYGPATH -u "$path"`
11217
11218  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11219  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11220  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11221  # "foo.exe" is OK but "foo" is an error.
11222  #
11223  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11224  # It is also a way to make sure we got the proper file name for the real test later on.
11225  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11226  if test "x$test_shortpath" = x; then
11227    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11228$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11229    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11230  fi
11231
11232  # Call helper function which possibly converts this using DOS-style short mode.
11233  # If so, the updated path is stored in $new_path.
11234
11235  input_path="$new_path"
11236  # Check if we need to convert this using DOS-style short mode. If the path
11237  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11238  # take no chances and rewrite it.
11239  # Note: m4 eats our [], so we need to use [ and ] instead.
11240  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11241  if test "x$has_forbidden_chars" != x; then
11242    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11243    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11244    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11245    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11246      # Going to short mode and back again did indeed matter. Since short mode is
11247      # case insensitive, let's make it lowercase to improve readability.
11248      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11249      # Now convert it back to Unix-stile (cygpath)
11250      input_path=`$CYGPATH -u "$shortmode_path"`
11251      new_path="$input_path"
11252    fi
11253  fi
11254
11255  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11256  if test "x$test_cygdrive_prefix" = x; then
11257    # As a simple fix, exclude /usr/bin since it's not a real path.
11258    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11259      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11260      # a path prefixed by /cygdrive for fixpath to work.
11261      new_path="$CYGWIN_ROOT_PATH$input_path"
11262    fi
11263  fi
11264
11265
11266  if test "x$path" != "x$new_path"; then
11267    BOOT_JDK="$new_path"
11268    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11269$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11270  fi
11271
11272  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11273
11274  path="$BOOT_JDK"
11275  has_colon=`$ECHO $path | $GREP ^.:`
11276  new_path="$path"
11277  if test "x$has_colon" = x; then
11278    # Not in mixed or Windows style, start by that.
11279    new_path=`cmd //c echo $path`
11280  fi
11281
11282
11283  input_path="$new_path"
11284  # Check if we need to convert this using DOS-style short mode. If the path
11285  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11286  # take no chances and rewrite it.
11287  # Note: m4 eats our [], so we need to use [ and ] instead.
11288  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11289  if test "x$has_forbidden_chars" != x; then
11290    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11291    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11292  fi
11293
11294
11295  windows_path="$new_path"
11296  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11297    unix_path=`$CYGPATH -u "$windows_path"`
11298    new_path="$unix_path"
11299  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11300    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11301    new_path="$unix_path"
11302  fi
11303
11304  if test "x$path" != "x$new_path"; then
11305    BOOT_JDK="$new_path"
11306    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11307$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11308  fi
11309
11310  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11311  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11312
11313  else
11314    # We're on a posix platform. Hooray! :)
11315    path="$BOOT_JDK"
11316    has_space=`$ECHO "$path" | $GREP " "`
11317    if test "x$has_space" != x; then
11318      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11319$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11320      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11321    fi
11322
11323    # Use eval to expand a potential ~
11324    eval path="$path"
11325    if test ! -f "$path" && test ! -d "$path"; then
11326      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11327    fi
11328
11329    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11330  fi
11331
11332              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11333$as_echo_n "checking for Boot JDK... " >&6; }
11334              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11335$as_echo "$BOOT_JDK" >&6; }
11336              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11337$as_echo_n "checking Boot JDK version... " >&6; }
11338              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11339              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11340$as_echo "$BOOT_JDK_VERSION" >&6; }
11341            fi # end check jdk version
11342          fi # end check rt.jar
11343        fi # end check javac
11344      fi # end check java
11345    fi # end check boot jdk found
11346  fi
11347
11348if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11349  # Having specified an argument which is incorrect will produce an instant failure;
11350  # we should not go on looking
11351  as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11352fi
11353
11354# Test: Is bootjdk available from builddeps?
11355
11356  if test "x$BOOT_JDK_FOUND" = xno; then
11357    # Now execute the test
11358
11359
11360
11361    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11362        # Source the builddeps file again, to make sure it uses the latest variables!
11363        . $builddepsfile
11364        # Look for a target and build machine specific resource!
11365        eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11366        if test "x$resource" = x; then
11367            # Ok, lets instead look for a target specific resource
11368            eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11369        fi
11370        if test "x$resource" = x; then
11371            # Ok, lets instead look for a build specific resource
11372            eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11373        fi
11374        if test "x$resource" = x; then
11375            # Ok, lets instead look for a generic resource
11376            # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11377            resource=${builddep_bootjdk}
11378        fi
11379        if test "x$resource" != x; then
11380            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11381$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11382	    # If the resource in the builddeps.conf file is an existing directory,
11383	    # for example /java/linux/cups
11384	    if test -d ${resource}; then
11385	       depdir=${resource}
11386	    else
11387
11388# bootjdk is for example mymodule
11389# $resource is for example libs/general/libmymod_1_2_3.zip
11390# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11391# $with_builddeps_dir is for example /localhome/builddeps
11392# depdir is the name of the variable into which we store the depdir, eg MYMOD
11393# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11394# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11395    filename=`basename $resource`
11396    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11397    filebase=${filename%%.*}
11398    extension=${filename#*.}
11399    installdir=$with_builddeps_dir/$filebase
11400    if test ! -f $installdir/$filename.unpacked; then
11401        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11402$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11403        if test ! -d $installdir; then
11404            mkdir -p $installdir
11405        fi
11406        if test ! -d $installdir; then
11407            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11408        fi
11409        tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11410        touch $tmpfile
11411        if test ! -f $tmpfile; then
11412            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11413        fi
11414
11415    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11416    # $tmpfile is the local file name for the downloaded file.
11417    VALID_TOOL=no
11418    if test "x$BDEPS_FTP" = xwget; then
11419       VALID_TOOL=yes
11420       wget -O $tmpfile $with_builddeps_server/$resource
11421    fi
11422    if test "x$BDEPS_FTP" = xlftp; then
11423       VALID_TOOL=yes
11424       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11425    fi
11426    if test "x$BDEPS_FTP" = xftp; then
11427        VALID_TOOL=yes
11428        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11429        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11430        FTPUSERPWD=${FTPSERVER%%@*}
11431        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11432            FTPUSER=${userpwd%%:*}
11433            FTPPWD=${userpwd#*@}
11434            FTPSERVER=${FTPSERVER#*@}
11435        else
11436            FTPUSER=ftp
11437            FTPPWD=ftp
11438        fi
11439        # the "pass" command does not work on some
11440        # ftp clients (read ftp.exe) but if it works,
11441        # passive mode is better!
11442        (\
11443            echo "user $FTPUSER $FTPPWD"        ;\
11444            echo "pass"                         ;\
11445            echo "bin"                          ;\
11446            echo "get $FTPPATH $tmpfile"              ;\
11447        ) | ftp -in $FTPSERVER
11448    fi
11449    if test "x$VALID_TOOL" != xyes; then
11450       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11451    fi
11452
11453        mv $tmpfile $installdir/$filename
11454        if test ! -s $installdir/$filename; then
11455            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11456        fi
11457        case "$extension" in
11458            zip)  echo "Unzipping $installdir/$filename..."
11459               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11460            ;;
11461            tar.gz) echo "Untaring $installdir/$filename..."
11462               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11463            ;;
11464            tgz) echo "Untaring $installdir/$filename..."
11465               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11466            ;;
11467            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11468            ;;
11469        esac
11470    fi
11471    if test -f $installdir/$filename.unpacked; then
11472        depdir=$installdir
11473    fi
11474
11475	    fi
11476            # Source the builddeps file again, because in the previous command, the depdir
11477            # was updated to point at the current build dependency install directory.
11478            . $builddepsfile
11479            # Now extract variables from the builddeps.conf files.
11480            theroot=${builddep_bootjdk_ROOT}
11481            thecflags=${builddep_bootjdk_CFLAGS}
11482            thelibs=${builddep_bootjdk_LIBS}
11483            if test "x$depdir" = x; then
11484                as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11485            fi
11486            BOOT_JDK=$depdir
11487            if test "x$theroot" != x; then
11488               BOOT_JDK="$theroot"
11489            fi
11490            if test "x$thecflags" != x; then
11491               BOOT_JDK_CFLAGS="$thecflags"
11492            fi
11493            if test "x$thelibs" != x; then
11494               BOOT_JDK_LIBS="$thelibs"
11495            fi
11496            BOOT_JDK_FOUND=maybe
11497            else BOOT_JDK_FOUND=no
11498
11499        fi
11500        else BOOT_JDK_FOUND=no
11501
11502    fi
11503
11504
11505
11506    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11507    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11508      # Do we have a bin/java?
11509      if test ! -x "$BOOT_JDK/bin/java"; then
11510        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11511$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11512        BOOT_JDK_FOUND=no
11513      else
11514        # Do we have a bin/javac?
11515        if test ! -x "$BOOT_JDK/bin/javac"; then
11516          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11517$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11518          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11519$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11520          BOOT_JDK_FOUND=no
11521        else
11522          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11523          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11524            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11525$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11526            BOOT_JDK_FOUND=no
11527          else
11528            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11529            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11530
11531            # Extra M4 quote needed to protect [] in grep expression.
11532            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11533            if test "x$FOUND_VERSION_78" = x; then
11534              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11535$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11536              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11537$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11538              BOOT_JDK_FOUND=no
11539            else
11540              # We're done! :-)
11541              BOOT_JDK_FOUND=yes
11542
11543  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11544
11545  # Input might be given as Windows format, start by converting to
11546  # unix format.
11547  path="$BOOT_JDK"
11548  new_path=`$CYGPATH -u "$path"`
11549
11550  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11551  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11552  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11553  # "foo.exe" is OK but "foo" is an error.
11554  #
11555  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11556  # It is also a way to make sure we got the proper file name for the real test later on.
11557  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11558  if test "x$test_shortpath" = x; then
11559    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11560$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11561    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11562  fi
11563
11564  # Call helper function which possibly converts this using DOS-style short mode.
11565  # If so, the updated path is stored in $new_path.
11566
11567  input_path="$new_path"
11568  # Check if we need to convert this using DOS-style short mode. If the path
11569  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11570  # take no chances and rewrite it.
11571  # Note: m4 eats our [], so we need to use [ and ] instead.
11572  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11573  if test "x$has_forbidden_chars" != x; then
11574    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11575    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11576    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11577    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11578      # Going to short mode and back again did indeed matter. Since short mode is
11579      # case insensitive, let's make it lowercase to improve readability.
11580      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11581      # Now convert it back to Unix-stile (cygpath)
11582      input_path=`$CYGPATH -u "$shortmode_path"`
11583      new_path="$input_path"
11584    fi
11585  fi
11586
11587  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11588  if test "x$test_cygdrive_prefix" = x; then
11589    # As a simple fix, exclude /usr/bin since it's not a real path.
11590    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11591      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11592      # a path prefixed by /cygdrive for fixpath to work.
11593      new_path="$CYGWIN_ROOT_PATH$input_path"
11594    fi
11595  fi
11596
11597
11598  if test "x$path" != "x$new_path"; then
11599    BOOT_JDK="$new_path"
11600    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11601$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11602  fi
11603
11604  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11605
11606  path="$BOOT_JDK"
11607  has_colon=`$ECHO $path | $GREP ^.:`
11608  new_path="$path"
11609  if test "x$has_colon" = x; then
11610    # Not in mixed or Windows style, start by that.
11611    new_path=`cmd //c echo $path`
11612  fi
11613
11614
11615  input_path="$new_path"
11616  # Check if we need to convert this using DOS-style short mode. If the path
11617  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11618  # take no chances and rewrite it.
11619  # Note: m4 eats our [], so we need to use [ and ] instead.
11620  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11621  if test "x$has_forbidden_chars" != x; then
11622    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11623    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11624  fi
11625
11626
11627  windows_path="$new_path"
11628  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11629    unix_path=`$CYGPATH -u "$windows_path"`
11630    new_path="$unix_path"
11631  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11632    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11633    new_path="$unix_path"
11634  fi
11635
11636  if test "x$path" != "x$new_path"; then
11637    BOOT_JDK="$new_path"
11638    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11639$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11640  fi
11641
11642  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11643  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11644
11645  else
11646    # We're on a posix platform. Hooray! :)
11647    path="$BOOT_JDK"
11648    has_space=`$ECHO "$path" | $GREP " "`
11649    if test "x$has_space" != x; then
11650      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11651$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11652      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11653    fi
11654
11655    # Use eval to expand a potential ~
11656    eval path="$path"
11657    if test ! -f "$path" && test ! -d "$path"; then
11658      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11659    fi
11660
11661    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11662  fi
11663
11664              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11665$as_echo_n "checking for Boot JDK... " >&6; }
11666              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11667$as_echo "$BOOT_JDK" >&6; }
11668              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11669$as_echo_n "checking Boot JDK version... " >&6; }
11670              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11671              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11672$as_echo "$BOOT_JDK_VERSION" >&6; }
11673            fi # end check jdk version
11674          fi # end check rt.jar
11675        fi # end check javac
11676      fi # end check java
11677    fi # end check boot jdk found
11678  fi
11679
11680
11681# Test: Is $JAVA_HOME set?
11682
11683  if test "x$BOOT_JDK_FOUND" = xno; then
11684    # Now execute the test
11685
11686    if test "x$JAVA_HOME" != x; then
11687        JAVA_HOME_PROCESSED="$JAVA_HOME"
11688
11689  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11690
11691  # Input might be given as Windows format, start by converting to
11692  # unix format.
11693  path="$JAVA_HOME_PROCESSED"
11694  new_path=`$CYGPATH -u "$path"`
11695
11696  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11697  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11698  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11699  # "foo.exe" is OK but "foo" is an error.
11700  #
11701  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11702  # It is also a way to make sure we got the proper file name for the real test later on.
11703  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11704  if test "x$test_shortpath" = x; then
11705    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11706$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11707    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11708  fi
11709
11710  # Call helper function which possibly converts this using DOS-style short mode.
11711  # If so, the updated path is stored in $new_path.
11712
11713  input_path="$new_path"
11714  # Check if we need to convert this using DOS-style short mode. If the path
11715  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11716  # take no chances and rewrite it.
11717  # Note: m4 eats our [], so we need to use [ and ] instead.
11718  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11719  if test "x$has_forbidden_chars" != x; then
11720    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11721    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11722    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11723    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11724      # Going to short mode and back again did indeed matter. Since short mode is
11725      # case insensitive, let's make it lowercase to improve readability.
11726      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11727      # Now convert it back to Unix-stile (cygpath)
11728      input_path=`$CYGPATH -u "$shortmode_path"`
11729      new_path="$input_path"
11730    fi
11731  fi
11732
11733  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11734  if test "x$test_cygdrive_prefix" = x; then
11735    # As a simple fix, exclude /usr/bin since it's not a real path.
11736    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11737      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11738      # a path prefixed by /cygdrive for fixpath to work.
11739      new_path="$CYGWIN_ROOT_PATH$input_path"
11740    fi
11741  fi
11742
11743
11744  if test "x$path" != "x$new_path"; then
11745    JAVA_HOME_PROCESSED="$new_path"
11746    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11747$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11748  fi
11749
11750  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11751
11752  path="$JAVA_HOME_PROCESSED"
11753  has_colon=`$ECHO $path | $GREP ^.:`
11754  new_path="$path"
11755  if test "x$has_colon" = x; then
11756    # Not in mixed or Windows style, start by that.
11757    new_path=`cmd //c echo $path`
11758  fi
11759
11760
11761  input_path="$new_path"
11762  # Check if we need to convert this using DOS-style short mode. If the path
11763  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11764  # take no chances and rewrite it.
11765  # Note: m4 eats our [], so we need to use [ and ] instead.
11766  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11767  if test "x$has_forbidden_chars" != x; then
11768    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11769    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11770  fi
11771
11772
11773  windows_path="$new_path"
11774  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11775    unix_path=`$CYGPATH -u "$windows_path"`
11776    new_path="$unix_path"
11777  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11778    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11779    new_path="$unix_path"
11780  fi
11781
11782  if test "x$path" != "x$new_path"; then
11783    JAVA_HOME_PROCESSED="$new_path"
11784    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11785$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11786  fi
11787
11788  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11789  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11790
11791  else
11792    # We're on a posix platform. Hooray! :)
11793    path="$JAVA_HOME_PROCESSED"
11794    has_space=`$ECHO "$path" | $GREP " "`
11795    if test "x$has_space" != x; then
11796      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11797$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11798      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11799    fi
11800
11801    # Use eval to expand a potential ~
11802    eval path="$path"
11803    if test ! -f "$path" && test ! -d "$path"; then
11804      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11805    fi
11806
11807    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
11808  fi
11809
11810        if test ! -d "$JAVA_HOME_PROCESSED"; then
11811            { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11812$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11813        else
11814          # Aha, the user has set a JAVA_HOME
11815          # let us use that as the Boot JDK.
11816          BOOT_JDK="$JAVA_HOME_PROCESSED"
11817          BOOT_JDK_FOUND=maybe
11818          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11819$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11820        fi
11821    fi
11822
11823
11824    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11825    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11826      # Do we have a bin/java?
11827      if test ! -x "$BOOT_JDK/bin/java"; then
11828        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11829$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11830        BOOT_JDK_FOUND=no
11831      else
11832        # Do we have a bin/javac?
11833        if test ! -x "$BOOT_JDK/bin/javac"; then
11834          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11835$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11836          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11837$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11838          BOOT_JDK_FOUND=no
11839        else
11840          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11841          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11842            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11843$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11844            BOOT_JDK_FOUND=no
11845          else
11846            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11847            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11848
11849            # Extra M4 quote needed to protect [] in grep expression.
11850            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11851            if test "x$FOUND_VERSION_78" = x; then
11852              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11853$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11854              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11855$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11856              BOOT_JDK_FOUND=no
11857            else
11858              # We're done! :-)
11859              BOOT_JDK_FOUND=yes
11860
11861  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11862
11863  # Input might be given as Windows format, start by converting to
11864  # unix format.
11865  path="$BOOT_JDK"
11866  new_path=`$CYGPATH -u "$path"`
11867
11868  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11869  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11870  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11871  # "foo.exe" is OK but "foo" is an error.
11872  #
11873  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11874  # It is also a way to make sure we got the proper file name for the real test later on.
11875  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11876  if test "x$test_shortpath" = x; then
11877    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11878$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11879    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11880  fi
11881
11882  # Call helper function which possibly converts this using DOS-style short mode.
11883  # If so, the updated path is stored in $new_path.
11884
11885  input_path="$new_path"
11886  # Check if we need to convert this using DOS-style short mode. If the path
11887  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11888  # take no chances and rewrite it.
11889  # Note: m4 eats our [], so we need to use [ and ] instead.
11890  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11891  if test "x$has_forbidden_chars" != x; then
11892    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11893    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11894    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11895    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11896      # Going to short mode and back again did indeed matter. Since short mode is
11897      # case insensitive, let's make it lowercase to improve readability.
11898      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11899      # Now convert it back to Unix-stile (cygpath)
11900      input_path=`$CYGPATH -u "$shortmode_path"`
11901      new_path="$input_path"
11902    fi
11903  fi
11904
11905  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11906  if test "x$test_cygdrive_prefix" = x; then
11907    # As a simple fix, exclude /usr/bin since it's not a real path.
11908    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11909      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11910      # a path prefixed by /cygdrive for fixpath to work.
11911      new_path="$CYGWIN_ROOT_PATH$input_path"
11912    fi
11913  fi
11914
11915
11916  if test "x$path" != "x$new_path"; then
11917    BOOT_JDK="$new_path"
11918    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11919$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11920  fi
11921
11922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11923
11924  path="$BOOT_JDK"
11925  has_colon=`$ECHO $path | $GREP ^.:`
11926  new_path="$path"
11927  if test "x$has_colon" = x; then
11928    # Not in mixed or Windows style, start by that.
11929    new_path=`cmd //c echo $path`
11930  fi
11931
11932
11933  input_path="$new_path"
11934  # Check if we need to convert this using DOS-style short mode. If the path
11935  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11936  # take no chances and rewrite it.
11937  # Note: m4 eats our [], so we need to use [ and ] instead.
11938  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11939  if test "x$has_forbidden_chars" != x; then
11940    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11941    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11942  fi
11943
11944
11945  windows_path="$new_path"
11946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11947    unix_path=`$CYGPATH -u "$windows_path"`
11948    new_path="$unix_path"
11949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11950    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11951    new_path="$unix_path"
11952  fi
11953
11954  if test "x$path" != "x$new_path"; then
11955    BOOT_JDK="$new_path"
11956    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11957$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11958  fi
11959
11960  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11961  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11962
11963  else
11964    # We're on a posix platform. Hooray! :)
11965    path="$BOOT_JDK"
11966    has_space=`$ECHO "$path" | $GREP " "`
11967    if test "x$has_space" != x; then
11968      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11969$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11970      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11971    fi
11972
11973    # Use eval to expand a potential ~
11974    eval path="$path"
11975    if test ! -f "$path" && test ! -d "$path"; then
11976      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11977    fi
11978
11979    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11980  fi
11981
11982              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11983$as_echo_n "checking for Boot JDK... " >&6; }
11984              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11985$as_echo "$BOOT_JDK" >&6; }
11986              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11987$as_echo_n "checking Boot JDK version... " >&6; }
11988              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11989              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11990$as_echo "$BOOT_JDK_VERSION" >&6; }
11991            fi # end check jdk version
11992          fi # end check rt.jar
11993        fi # end check javac
11994      fi # end check java
11995    fi # end check boot jdk found
11996  fi
11997
11998
11999# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
12000
12001  if test "x$BOOT_JDK_FOUND" = xno; then
12002    # Now execute the test
12003
12004    if test -x /usr/libexec/java_home; then
12005        BOOT_JDK=`/usr/libexec/java_home`
12006        BOOT_JDK_FOUND=maybe
12007        { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
12008$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
12009    fi
12010
12011
12012    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12013    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12014      # Do we have a bin/java?
12015      if test ! -x "$BOOT_JDK/bin/java"; then
12016        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12017$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12018        BOOT_JDK_FOUND=no
12019      else
12020        # Do we have a bin/javac?
12021        if test ! -x "$BOOT_JDK/bin/javac"; then
12022          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12023$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12024          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12025$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12026          BOOT_JDK_FOUND=no
12027        else
12028          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12029          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12030            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12031$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12032            BOOT_JDK_FOUND=no
12033          else
12034            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12035            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12036
12037            # Extra M4 quote needed to protect [] in grep expression.
12038            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12039            if test "x$FOUND_VERSION_78" = x; then
12040              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12041$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12042              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12043$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12044              BOOT_JDK_FOUND=no
12045            else
12046              # We're done! :-)
12047              BOOT_JDK_FOUND=yes
12048
12049  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12050
12051  # Input might be given as Windows format, start by converting to
12052  # unix format.
12053  path="$BOOT_JDK"
12054  new_path=`$CYGPATH -u "$path"`
12055
12056  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12057  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12058  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12059  # "foo.exe" is OK but "foo" is an error.
12060  #
12061  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12062  # It is also a way to make sure we got the proper file name for the real test later on.
12063  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12064  if test "x$test_shortpath" = x; then
12065    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12066$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12067    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12068  fi
12069
12070  # Call helper function which possibly converts this using DOS-style short mode.
12071  # If so, the updated path is stored in $new_path.
12072
12073  input_path="$new_path"
12074  # Check if we need to convert this using DOS-style short mode. If the path
12075  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12076  # take no chances and rewrite it.
12077  # Note: m4 eats our [], so we need to use [ and ] instead.
12078  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12079  if test "x$has_forbidden_chars" != x; then
12080    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12081    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12082    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12083    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12084      # Going to short mode and back again did indeed matter. Since short mode is
12085      # case insensitive, let's make it lowercase to improve readability.
12086      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12087      # Now convert it back to Unix-stile (cygpath)
12088      input_path=`$CYGPATH -u "$shortmode_path"`
12089      new_path="$input_path"
12090    fi
12091  fi
12092
12093  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12094  if test "x$test_cygdrive_prefix" = x; then
12095    # As a simple fix, exclude /usr/bin since it's not a real path.
12096    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12097      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12098      # a path prefixed by /cygdrive for fixpath to work.
12099      new_path="$CYGWIN_ROOT_PATH$input_path"
12100    fi
12101  fi
12102
12103
12104  if test "x$path" != "x$new_path"; then
12105    BOOT_JDK="$new_path"
12106    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12107$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12108  fi
12109
12110  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12111
12112  path="$BOOT_JDK"
12113  has_colon=`$ECHO $path | $GREP ^.:`
12114  new_path="$path"
12115  if test "x$has_colon" = x; then
12116    # Not in mixed or Windows style, start by that.
12117    new_path=`cmd //c echo $path`
12118  fi
12119
12120
12121  input_path="$new_path"
12122  # Check if we need to convert this using DOS-style short mode. If the path
12123  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12124  # take no chances and rewrite it.
12125  # Note: m4 eats our [], so we need to use [ and ] instead.
12126  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12127  if test "x$has_forbidden_chars" != x; then
12128    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12129    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12130  fi
12131
12132
12133  windows_path="$new_path"
12134  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12135    unix_path=`$CYGPATH -u "$windows_path"`
12136    new_path="$unix_path"
12137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12138    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12139    new_path="$unix_path"
12140  fi
12141
12142  if test "x$path" != "x$new_path"; then
12143    BOOT_JDK="$new_path"
12144    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12145$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12146  fi
12147
12148  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12149  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12150
12151  else
12152    # We're on a posix platform. Hooray! :)
12153    path="$BOOT_JDK"
12154    has_space=`$ECHO "$path" | $GREP " "`
12155    if test "x$has_space" != x; then
12156      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12157$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12158      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12159    fi
12160
12161    # Use eval to expand a potential ~
12162    eval path="$path"
12163    if test ! -f "$path" && test ! -d "$path"; then
12164      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12165    fi
12166
12167    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12168  fi
12169
12170              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12171$as_echo_n "checking for Boot JDK... " >&6; }
12172              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12173$as_echo "$BOOT_JDK" >&6; }
12174              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12175$as_echo_n "checking Boot JDK version... " >&6; }
12176              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12177              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12178$as_echo "$BOOT_JDK_VERSION" >&6; }
12179            fi # end check jdk version
12180          fi # end check rt.jar
12181        fi # end check javac
12182      fi # end check java
12183    fi # end check boot jdk found
12184  fi
12185
12186
12187# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
12188
12189  if test "x$BOOT_JDK_FOUND" = xno; then
12190    # Now execute the test
12191
12192    # Extract the first word of "javac", so it can be a program name with args.
12193set dummy javac; ac_word=$2
12194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12195$as_echo_n "checking for $ac_word... " >&6; }
12196if ${ac_cv_path_JAVAC_CHECK+:} false; then :
12197  $as_echo_n "(cached) " >&6
12198else
12199  case $JAVAC_CHECK in
12200  [\\/]* | ?:[\\/]*)
12201  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
12202  ;;
12203  *)
12204  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12205for as_dir in $PATH
12206do
12207  IFS=$as_save_IFS
12208  test -z "$as_dir" && as_dir=.
12209    for ac_exec_ext in '' $ac_executable_extensions; do
12210  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12211    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
12212    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12213    break 2
12214  fi
12215done
12216  done
12217IFS=$as_save_IFS
12218
12219  ;;
12220esac
12221fi
12222JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
12223if test -n "$JAVAC_CHECK"; then
12224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
12225$as_echo "$JAVAC_CHECK" >&6; }
12226else
12227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12228$as_echo "no" >&6; }
12229fi
12230
12231
12232    # Extract the first word of "java", so it can be a program name with args.
12233set dummy java; ac_word=$2
12234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12235$as_echo_n "checking for $ac_word... " >&6; }
12236if ${ac_cv_path_JAVA_CHECK+:} false; then :
12237  $as_echo_n "(cached) " >&6
12238else
12239  case $JAVA_CHECK in
12240  [\\/]* | ?:[\\/]*)
12241  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
12242  ;;
12243  *)
12244  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12245for as_dir in $PATH
12246do
12247  IFS=$as_save_IFS
12248  test -z "$as_dir" && as_dir=.
12249    for ac_exec_ext in '' $ac_executable_extensions; do
12250  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12251    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
12252    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12253    break 2
12254  fi
12255done
12256  done
12257IFS=$as_save_IFS
12258
12259  ;;
12260esac
12261fi
12262JAVA_CHECK=$ac_cv_path_JAVA_CHECK
12263if test -n "$JAVA_CHECK"; then
12264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
12265$as_echo "$JAVA_CHECK" >&6; }
12266else
12267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12268$as_echo "no" >&6; }
12269fi
12270
12271
12272    BINARY="$JAVAC_CHECK"
12273    if test "x$JAVAC_CHECK" = x; then
12274        BINARY="$JAVA_CHECK"
12275    fi
12276    if test "x$BINARY" != x; then
12277        # So there is a java(c) binary, it might be part of a JDK.
12278        # Lets find the JDK/JRE directory by following symbolic links.
12279        # Linux/GNU systems often have links from /usr/bin/java to
12280        # /etc/alternatives/java to the real JDK binary.
12281
12282    if test "x$OPENJDK_BUILD_OS" != xwindows; then
12283        # Follow a chain of symbolic links. Use readlink
12284        # where it exists, else fall back to horribly
12285        # complicated shell code.
12286        if test "x$READLINK_TESTED" != yes; then
12287            # On MacOSX there is a readlink tool with a different
12288            # purpose than the GNU readlink tool. Check the found readlink.
12289            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12290            if test "x$ISGNU" = x; then
12291                 # A readlink that we do not know how to use.
12292                 # Are there other non-GNU readlinks out there?
12293                 READLINK_TESTED=yes
12294                 READLINK=
12295            fi
12296        fi
12297
12298        if test "x$READLINK" != x; then
12299            BINARY=`$READLINK -f $BINARY`
12300        else
12301            # Save the current directory for restoring afterwards
12302            STARTDIR=$PWD
12303            COUNTER=0
12304            sym_link_dir=`$DIRNAME $BINARY`
12305            sym_link_file=`$BASENAME $BINARY`
12306            cd $sym_link_dir
12307            # Use -P flag to resolve symlinks in directories.
12308            cd `$THEPWDCMD -P`
12309            sym_link_dir=`$THEPWDCMD -P`
12310            # Resolve file symlinks
12311            while test $COUNTER -lt 20; do
12312                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12313                if test "x$ISLINK" == x; then
12314                    # This is not a symbolic link! We are done!
12315                    break
12316                fi
12317                # Again resolve directory symlinks since the target of the just found
12318                # link could be in a different directory
12319                cd `$DIRNAME $ISLINK`
12320                sym_link_dir=`$THEPWDCMD -P`
12321                sym_link_file=`$BASENAME $ISLINK`
12322                let COUNTER=COUNTER+1
12323            done
12324            cd $STARTDIR
12325            BINARY=$sym_link_dir/$sym_link_file
12326        fi
12327    fi
12328
12329        BOOT_JDK=`dirname "$BINARY"`
12330        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12331        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12332            # Looks like we found ourselves an JDK
12333            BOOT_JDK_FOUND=maybe
12334            { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12335$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12336        fi
12337    fi
12338
12339
12340    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12341    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12342      # Do we have a bin/java?
12343      if test ! -x "$BOOT_JDK/bin/java"; then
12344        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12345$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12346        BOOT_JDK_FOUND=no
12347      else
12348        # Do we have a bin/javac?
12349        if test ! -x "$BOOT_JDK/bin/javac"; then
12350          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12351$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12352          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12353$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12354          BOOT_JDK_FOUND=no
12355        else
12356          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12357          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12358            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12359$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12360            BOOT_JDK_FOUND=no
12361          else
12362            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12363            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12364
12365            # Extra M4 quote needed to protect [] in grep expression.
12366            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12367            if test "x$FOUND_VERSION_78" = x; then
12368              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12369$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12370              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12371$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12372              BOOT_JDK_FOUND=no
12373            else
12374              # We're done! :-)
12375              BOOT_JDK_FOUND=yes
12376
12377  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12378
12379  # Input might be given as Windows format, start by converting to
12380  # unix format.
12381  path="$BOOT_JDK"
12382  new_path=`$CYGPATH -u "$path"`
12383
12384  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12385  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12386  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12387  # "foo.exe" is OK but "foo" is an error.
12388  #
12389  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12390  # It is also a way to make sure we got the proper file name for the real test later on.
12391  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12392  if test "x$test_shortpath" = x; then
12393    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12394$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12395    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12396  fi
12397
12398  # Call helper function which possibly converts this using DOS-style short mode.
12399  # If so, the updated path is stored in $new_path.
12400
12401  input_path="$new_path"
12402  # Check if we need to convert this using DOS-style short mode. If the path
12403  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12404  # take no chances and rewrite it.
12405  # Note: m4 eats our [], so we need to use [ and ] instead.
12406  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12407  if test "x$has_forbidden_chars" != x; then
12408    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12409    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12410    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12411    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12412      # Going to short mode and back again did indeed matter. Since short mode is
12413      # case insensitive, let's make it lowercase to improve readability.
12414      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12415      # Now convert it back to Unix-stile (cygpath)
12416      input_path=`$CYGPATH -u "$shortmode_path"`
12417      new_path="$input_path"
12418    fi
12419  fi
12420
12421  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12422  if test "x$test_cygdrive_prefix" = x; then
12423    # As a simple fix, exclude /usr/bin since it's not a real path.
12424    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12425      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12426      # a path prefixed by /cygdrive for fixpath to work.
12427      new_path="$CYGWIN_ROOT_PATH$input_path"
12428    fi
12429  fi
12430
12431
12432  if test "x$path" != "x$new_path"; then
12433    BOOT_JDK="$new_path"
12434    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12435$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12436  fi
12437
12438  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12439
12440  path="$BOOT_JDK"
12441  has_colon=`$ECHO $path | $GREP ^.:`
12442  new_path="$path"
12443  if test "x$has_colon" = x; then
12444    # Not in mixed or Windows style, start by that.
12445    new_path=`cmd //c echo $path`
12446  fi
12447
12448
12449  input_path="$new_path"
12450  # Check if we need to convert this using DOS-style short mode. If the path
12451  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12452  # take no chances and rewrite it.
12453  # Note: m4 eats our [], so we need to use [ and ] instead.
12454  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12455  if test "x$has_forbidden_chars" != x; then
12456    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12457    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12458  fi
12459
12460
12461  windows_path="$new_path"
12462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12463    unix_path=`$CYGPATH -u "$windows_path"`
12464    new_path="$unix_path"
12465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12466    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12467    new_path="$unix_path"
12468  fi
12469
12470  if test "x$path" != "x$new_path"; then
12471    BOOT_JDK="$new_path"
12472    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12473$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12474  fi
12475
12476  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12477  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12478
12479  else
12480    # We're on a posix platform. Hooray! :)
12481    path="$BOOT_JDK"
12482    has_space=`$ECHO "$path" | $GREP " "`
12483    if test "x$has_space" != x; then
12484      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12485$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12486      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12487    fi
12488
12489    # Use eval to expand a potential ~
12490    eval path="$path"
12491    if test ! -f "$path" && test ! -d "$path"; then
12492      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12493    fi
12494
12495    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12496  fi
12497
12498              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12499$as_echo_n "checking for Boot JDK... " >&6; }
12500              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12501$as_echo "$BOOT_JDK" >&6; }
12502              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12503$as_echo_n "checking Boot JDK version... " >&6; }
12504              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12505              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12506$as_echo "$BOOT_JDK_VERSION" >&6; }
12507            fi # end check jdk version
12508          fi # end check rt.jar
12509        fi # end check javac
12510      fi # end check java
12511    fi # end check boot jdk found
12512  fi
12513
12514
12515# Test: Is there a JDK installed in default, well-known locations?
12516
12517  if test "x$BOOT_JDK_FOUND" = xno; then
12518    # Now execute the test
12519
12520  if test "x$OPENJDK_TARGET_OS" = xwindows; then
12521
12522  if test "x$BOOT_JDK_FOUND" = xno; then
12523    # Now execute the test
12524
12525  if test "x$ProgramW6432" != x; then
12526    VIRTUAL_DIR="$ProgramW6432/Java"
12527
12528  windows_path="$VIRTUAL_DIR"
12529  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12530    unix_path=`$CYGPATH -u "$windows_path"`
12531    VIRTUAL_DIR="$unix_path"
12532  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12533    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12534    VIRTUAL_DIR="$unix_path"
12535  fi
12536
12537
12538  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12539  BOOT_JDK_SUFFIX=""
12540  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12541  if test "x$ALL_JDKS_FOUND" != x; then
12542    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12543
12544  if test "x$BOOT_JDK_FOUND" = xno; then
12545    # Now execute the test
12546
12547        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12548        if test -d "$BOOT_JDK"; then
12549          BOOT_JDK_FOUND=maybe
12550          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12551$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12552        fi
12553
12554
12555    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12556    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12557      # Do we have a bin/java?
12558      if test ! -x "$BOOT_JDK/bin/java"; then
12559        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12560$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12561        BOOT_JDK_FOUND=no
12562      else
12563        # Do we have a bin/javac?
12564        if test ! -x "$BOOT_JDK/bin/javac"; then
12565          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12566$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12567          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12568$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12569          BOOT_JDK_FOUND=no
12570        else
12571          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12572          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12573            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12574$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12575            BOOT_JDK_FOUND=no
12576          else
12577            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12578            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12579
12580            # Extra M4 quote needed to protect [] in grep expression.
12581            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12582            if test "x$FOUND_VERSION_78" = x; then
12583              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12584$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12585              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12586$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12587              BOOT_JDK_FOUND=no
12588            else
12589              # We're done! :-)
12590              BOOT_JDK_FOUND=yes
12591
12592  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12593
12594  # Input might be given as Windows format, start by converting to
12595  # unix format.
12596  path="$BOOT_JDK"
12597  new_path=`$CYGPATH -u "$path"`
12598
12599  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12600  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12601  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12602  # "foo.exe" is OK but "foo" is an error.
12603  #
12604  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12605  # It is also a way to make sure we got the proper file name for the real test later on.
12606  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12607  if test "x$test_shortpath" = x; then
12608    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12609$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12610    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12611  fi
12612
12613  # Call helper function which possibly converts this using DOS-style short mode.
12614  # If so, the updated path is stored in $new_path.
12615
12616  input_path="$new_path"
12617  # Check if we need to convert this using DOS-style short mode. If the path
12618  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12619  # take no chances and rewrite it.
12620  # Note: m4 eats our [], so we need to use [ and ] instead.
12621  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12622  if test "x$has_forbidden_chars" != x; then
12623    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12624    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12625    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12626    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12627      # Going to short mode and back again did indeed matter. Since short mode is
12628      # case insensitive, let's make it lowercase to improve readability.
12629      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12630      # Now convert it back to Unix-stile (cygpath)
12631      input_path=`$CYGPATH -u "$shortmode_path"`
12632      new_path="$input_path"
12633    fi
12634  fi
12635
12636  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12637  if test "x$test_cygdrive_prefix" = x; then
12638    # As a simple fix, exclude /usr/bin since it's not a real path.
12639    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12640      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12641      # a path prefixed by /cygdrive for fixpath to work.
12642      new_path="$CYGWIN_ROOT_PATH$input_path"
12643    fi
12644  fi
12645
12646
12647  if test "x$path" != "x$new_path"; then
12648    BOOT_JDK="$new_path"
12649    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12650$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12651  fi
12652
12653  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12654
12655  path="$BOOT_JDK"
12656  has_colon=`$ECHO $path | $GREP ^.:`
12657  new_path="$path"
12658  if test "x$has_colon" = x; then
12659    # Not in mixed or Windows style, start by that.
12660    new_path=`cmd //c echo $path`
12661  fi
12662
12663
12664  input_path="$new_path"
12665  # Check if we need to convert this using DOS-style short mode. If the path
12666  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12667  # take no chances and rewrite it.
12668  # Note: m4 eats our [], so we need to use [ and ] instead.
12669  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12670  if test "x$has_forbidden_chars" != x; then
12671    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12672    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12673  fi
12674
12675
12676  windows_path="$new_path"
12677  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12678    unix_path=`$CYGPATH -u "$windows_path"`
12679    new_path="$unix_path"
12680  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12681    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12682    new_path="$unix_path"
12683  fi
12684
12685  if test "x$path" != "x$new_path"; then
12686    BOOT_JDK="$new_path"
12687    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12688$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12689  fi
12690
12691  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12692  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12693
12694  else
12695    # We're on a posix platform. Hooray! :)
12696    path="$BOOT_JDK"
12697    has_space=`$ECHO "$path" | $GREP " "`
12698    if test "x$has_space" != x; then
12699      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12700$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12701      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12702    fi
12703
12704    # Use eval to expand a potential ~
12705    eval path="$path"
12706    if test ! -f "$path" && test ! -d "$path"; then
12707      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12708    fi
12709
12710    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12711  fi
12712
12713              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12714$as_echo_n "checking for Boot JDK... " >&6; }
12715              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12716$as_echo "$BOOT_JDK" >&6; }
12717              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12718$as_echo_n "checking Boot JDK version... " >&6; }
12719              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12720              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12721$as_echo "$BOOT_JDK_VERSION" >&6; }
12722            fi # end check jdk version
12723          fi # end check rt.jar
12724        fi # end check javac
12725      fi # end check java
12726    fi # end check boot jdk found
12727  fi
12728
12729    done
12730  fi
12731
12732  fi
12733
12734
12735    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12736    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12737      # Do we have a bin/java?
12738      if test ! -x "$BOOT_JDK/bin/java"; then
12739        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12740$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12741        BOOT_JDK_FOUND=no
12742      else
12743        # Do we have a bin/javac?
12744        if test ! -x "$BOOT_JDK/bin/javac"; then
12745          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12746$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12747          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12748$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12749          BOOT_JDK_FOUND=no
12750        else
12751          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12752          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12753            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12754$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12755            BOOT_JDK_FOUND=no
12756          else
12757            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12758            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12759
12760            # Extra M4 quote needed to protect [] in grep expression.
12761            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12762            if test "x$FOUND_VERSION_78" = x; then
12763              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12764$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12765              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12766$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12767              BOOT_JDK_FOUND=no
12768            else
12769              # We're done! :-)
12770              BOOT_JDK_FOUND=yes
12771
12772  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12773
12774  # Input might be given as Windows format, start by converting to
12775  # unix format.
12776  path="$BOOT_JDK"
12777  new_path=`$CYGPATH -u "$path"`
12778
12779  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12780  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12781  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12782  # "foo.exe" is OK but "foo" is an error.
12783  #
12784  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12785  # It is also a way to make sure we got the proper file name for the real test later on.
12786  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12787  if test "x$test_shortpath" = x; then
12788    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12789$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12790    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12791  fi
12792
12793  # Call helper function which possibly converts this using DOS-style short mode.
12794  # If so, the updated path is stored in $new_path.
12795
12796  input_path="$new_path"
12797  # Check if we need to convert this using DOS-style short mode. If the path
12798  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12799  # take no chances and rewrite it.
12800  # Note: m4 eats our [], so we need to use [ and ] instead.
12801  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12802  if test "x$has_forbidden_chars" != x; then
12803    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12804    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12805    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12806    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12807      # Going to short mode and back again did indeed matter. Since short mode is
12808      # case insensitive, let's make it lowercase to improve readability.
12809      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12810      # Now convert it back to Unix-stile (cygpath)
12811      input_path=`$CYGPATH -u "$shortmode_path"`
12812      new_path="$input_path"
12813    fi
12814  fi
12815
12816  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12817  if test "x$test_cygdrive_prefix" = x; then
12818    # As a simple fix, exclude /usr/bin since it's not a real path.
12819    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12820      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12821      # a path prefixed by /cygdrive for fixpath to work.
12822      new_path="$CYGWIN_ROOT_PATH$input_path"
12823    fi
12824  fi
12825
12826
12827  if test "x$path" != "x$new_path"; then
12828    BOOT_JDK="$new_path"
12829    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12830$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12831  fi
12832
12833  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12834
12835  path="$BOOT_JDK"
12836  has_colon=`$ECHO $path | $GREP ^.:`
12837  new_path="$path"
12838  if test "x$has_colon" = x; then
12839    # Not in mixed or Windows style, start by that.
12840    new_path=`cmd //c echo $path`
12841  fi
12842
12843
12844  input_path="$new_path"
12845  # Check if we need to convert this using DOS-style short mode. If the path
12846  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12847  # take no chances and rewrite it.
12848  # Note: m4 eats our [], so we need to use [ and ] instead.
12849  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12850  if test "x$has_forbidden_chars" != x; then
12851    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12852    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12853  fi
12854
12855
12856  windows_path="$new_path"
12857  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12858    unix_path=`$CYGPATH -u "$windows_path"`
12859    new_path="$unix_path"
12860  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12861    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12862    new_path="$unix_path"
12863  fi
12864
12865  if test "x$path" != "x$new_path"; then
12866    BOOT_JDK="$new_path"
12867    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12868$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12869  fi
12870
12871  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12872  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12873
12874  else
12875    # We're on a posix platform. Hooray! :)
12876    path="$BOOT_JDK"
12877    has_space=`$ECHO "$path" | $GREP " "`
12878    if test "x$has_space" != x; then
12879      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12880$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12881      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12882    fi
12883
12884    # Use eval to expand a potential ~
12885    eval path="$path"
12886    if test ! -f "$path" && test ! -d "$path"; then
12887      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12888    fi
12889
12890    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12891  fi
12892
12893              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12894$as_echo_n "checking for Boot JDK... " >&6; }
12895              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12896$as_echo "$BOOT_JDK" >&6; }
12897              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12898$as_echo_n "checking Boot JDK version... " >&6; }
12899              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12900              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12901$as_echo "$BOOT_JDK_VERSION" >&6; }
12902            fi # end check jdk version
12903          fi # end check rt.jar
12904        fi # end check javac
12905      fi # end check java
12906    fi # end check boot jdk found
12907  fi
12908
12909
12910  if test "x$BOOT_JDK_FOUND" = xno; then
12911    # Now execute the test
12912
12913  if test "x$PROGRAMW6432" != x; then
12914    VIRTUAL_DIR="$PROGRAMW6432/Java"
12915
12916  windows_path="$VIRTUAL_DIR"
12917  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12918    unix_path=`$CYGPATH -u "$windows_path"`
12919    VIRTUAL_DIR="$unix_path"
12920  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12921    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12922    VIRTUAL_DIR="$unix_path"
12923  fi
12924
12925
12926  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12927  BOOT_JDK_SUFFIX=""
12928  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12929  if test "x$ALL_JDKS_FOUND" != x; then
12930    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12931
12932  if test "x$BOOT_JDK_FOUND" = xno; then
12933    # Now execute the test
12934
12935        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12936        if test -d "$BOOT_JDK"; then
12937          BOOT_JDK_FOUND=maybe
12938          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12939$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12940        fi
12941
12942
12943    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12944    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12945      # Do we have a bin/java?
12946      if test ! -x "$BOOT_JDK/bin/java"; then
12947        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12948$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12949        BOOT_JDK_FOUND=no
12950      else
12951        # Do we have a bin/javac?
12952        if test ! -x "$BOOT_JDK/bin/javac"; then
12953          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12954$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12955          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12956$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12957          BOOT_JDK_FOUND=no
12958        else
12959          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12960          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12961            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12962$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12963            BOOT_JDK_FOUND=no
12964          else
12965            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12966            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12967
12968            # Extra M4 quote needed to protect [] in grep expression.
12969            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12970            if test "x$FOUND_VERSION_78" = x; then
12971              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12972$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12973              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12974$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12975              BOOT_JDK_FOUND=no
12976            else
12977              # We're done! :-)
12978              BOOT_JDK_FOUND=yes
12979
12980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12981
12982  # Input might be given as Windows format, start by converting to
12983  # unix format.
12984  path="$BOOT_JDK"
12985  new_path=`$CYGPATH -u "$path"`
12986
12987  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12988  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12989  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12990  # "foo.exe" is OK but "foo" is an error.
12991  #
12992  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12993  # It is also a way to make sure we got the proper file name for the real test later on.
12994  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12995  if test "x$test_shortpath" = x; then
12996    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12997$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12998    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12999  fi
13000
13001  # Call helper function which possibly converts this using DOS-style short mode.
13002  # If so, the updated path is stored in $new_path.
13003
13004  input_path="$new_path"
13005  # Check if we need to convert this using DOS-style short mode. If the path
13006  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13007  # take no chances and rewrite it.
13008  # Note: m4 eats our [], so we need to use [ and ] instead.
13009  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13010  if test "x$has_forbidden_chars" != x; then
13011    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13012    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13013    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13014    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13015      # Going to short mode and back again did indeed matter. Since short mode is
13016      # case insensitive, let's make it lowercase to improve readability.
13017      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13018      # Now convert it back to Unix-stile (cygpath)
13019      input_path=`$CYGPATH -u "$shortmode_path"`
13020      new_path="$input_path"
13021    fi
13022  fi
13023
13024  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13025  if test "x$test_cygdrive_prefix" = x; then
13026    # As a simple fix, exclude /usr/bin since it's not a real path.
13027    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13028      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13029      # a path prefixed by /cygdrive for fixpath to work.
13030      new_path="$CYGWIN_ROOT_PATH$input_path"
13031    fi
13032  fi
13033
13034
13035  if test "x$path" != "x$new_path"; then
13036    BOOT_JDK="$new_path"
13037    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13038$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13039  fi
13040
13041  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13042
13043  path="$BOOT_JDK"
13044  has_colon=`$ECHO $path | $GREP ^.:`
13045  new_path="$path"
13046  if test "x$has_colon" = x; then
13047    # Not in mixed or Windows style, start by that.
13048    new_path=`cmd //c echo $path`
13049  fi
13050
13051
13052  input_path="$new_path"
13053  # Check if we need to convert this using DOS-style short mode. If the path
13054  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13055  # take no chances and rewrite it.
13056  # Note: m4 eats our [], so we need to use [ and ] instead.
13057  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13058  if test "x$has_forbidden_chars" != x; then
13059    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13060    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13061  fi
13062
13063
13064  windows_path="$new_path"
13065  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13066    unix_path=`$CYGPATH -u "$windows_path"`
13067    new_path="$unix_path"
13068  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13069    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13070    new_path="$unix_path"
13071  fi
13072
13073  if test "x$path" != "x$new_path"; then
13074    BOOT_JDK="$new_path"
13075    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13076$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13077  fi
13078
13079  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13080  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13081
13082  else
13083    # We're on a posix platform. Hooray! :)
13084    path="$BOOT_JDK"
13085    has_space=`$ECHO "$path" | $GREP " "`
13086    if test "x$has_space" != x; then
13087      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13088$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13089      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13090    fi
13091
13092    # Use eval to expand a potential ~
13093    eval path="$path"
13094    if test ! -f "$path" && test ! -d "$path"; then
13095      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13096    fi
13097
13098    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13099  fi
13100
13101              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13102$as_echo_n "checking for Boot JDK... " >&6; }
13103              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13104$as_echo "$BOOT_JDK" >&6; }
13105              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13106$as_echo_n "checking Boot JDK version... " >&6; }
13107              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13108              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13109$as_echo "$BOOT_JDK_VERSION" >&6; }
13110            fi # end check jdk version
13111          fi # end check rt.jar
13112        fi # end check javac
13113      fi # end check java
13114    fi # end check boot jdk found
13115  fi
13116
13117    done
13118  fi
13119
13120  fi
13121
13122
13123    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13124    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13125      # Do we have a bin/java?
13126      if test ! -x "$BOOT_JDK/bin/java"; then
13127        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13128$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13129        BOOT_JDK_FOUND=no
13130      else
13131        # Do we have a bin/javac?
13132        if test ! -x "$BOOT_JDK/bin/javac"; then
13133          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13134$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13135          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13136$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13137          BOOT_JDK_FOUND=no
13138        else
13139          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13140          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13141            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13142$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13143            BOOT_JDK_FOUND=no
13144          else
13145            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13146            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13147
13148            # Extra M4 quote needed to protect [] in grep expression.
13149            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13150            if test "x$FOUND_VERSION_78" = x; then
13151              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13152$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13153              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13154$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13155              BOOT_JDK_FOUND=no
13156            else
13157              # We're done! :-)
13158              BOOT_JDK_FOUND=yes
13159
13160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13161
13162  # Input might be given as Windows format, start by converting to
13163  # unix format.
13164  path="$BOOT_JDK"
13165  new_path=`$CYGPATH -u "$path"`
13166
13167  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13168  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13169  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13170  # "foo.exe" is OK but "foo" is an error.
13171  #
13172  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13173  # It is also a way to make sure we got the proper file name for the real test later on.
13174  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13175  if test "x$test_shortpath" = x; then
13176    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13177$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13178    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13179  fi
13180
13181  # Call helper function which possibly converts this using DOS-style short mode.
13182  # If so, the updated path is stored in $new_path.
13183
13184  input_path="$new_path"
13185  # Check if we need to convert this using DOS-style short mode. If the path
13186  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13187  # take no chances and rewrite it.
13188  # Note: m4 eats our [], so we need to use [ and ] instead.
13189  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13190  if test "x$has_forbidden_chars" != x; then
13191    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13192    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13193    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13194    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13195      # Going to short mode and back again did indeed matter. Since short mode is
13196      # case insensitive, let's make it lowercase to improve readability.
13197      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13198      # Now convert it back to Unix-stile (cygpath)
13199      input_path=`$CYGPATH -u "$shortmode_path"`
13200      new_path="$input_path"
13201    fi
13202  fi
13203
13204  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13205  if test "x$test_cygdrive_prefix" = x; then
13206    # As a simple fix, exclude /usr/bin since it's not a real path.
13207    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13208      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13209      # a path prefixed by /cygdrive for fixpath to work.
13210      new_path="$CYGWIN_ROOT_PATH$input_path"
13211    fi
13212  fi
13213
13214
13215  if test "x$path" != "x$new_path"; then
13216    BOOT_JDK="$new_path"
13217    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13218$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13219  fi
13220
13221  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13222
13223  path="$BOOT_JDK"
13224  has_colon=`$ECHO $path | $GREP ^.:`
13225  new_path="$path"
13226  if test "x$has_colon" = x; then
13227    # Not in mixed or Windows style, start by that.
13228    new_path=`cmd //c echo $path`
13229  fi
13230
13231
13232  input_path="$new_path"
13233  # Check if we need to convert this using DOS-style short mode. If the path
13234  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13235  # take no chances and rewrite it.
13236  # Note: m4 eats our [], so we need to use [ and ] instead.
13237  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13238  if test "x$has_forbidden_chars" != x; then
13239    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13240    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13241  fi
13242
13243
13244  windows_path="$new_path"
13245  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13246    unix_path=`$CYGPATH -u "$windows_path"`
13247    new_path="$unix_path"
13248  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13249    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13250    new_path="$unix_path"
13251  fi
13252
13253  if test "x$path" != "x$new_path"; then
13254    BOOT_JDK="$new_path"
13255    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13256$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13257  fi
13258
13259  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13260  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13261
13262  else
13263    # We're on a posix platform. Hooray! :)
13264    path="$BOOT_JDK"
13265    has_space=`$ECHO "$path" | $GREP " "`
13266    if test "x$has_space" != x; then
13267      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13268$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13269      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13270    fi
13271
13272    # Use eval to expand a potential ~
13273    eval path="$path"
13274    if test ! -f "$path" && test ! -d "$path"; then
13275      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13276    fi
13277
13278    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13279  fi
13280
13281              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13282$as_echo_n "checking for Boot JDK... " >&6; }
13283              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13284$as_echo "$BOOT_JDK" >&6; }
13285              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13286$as_echo_n "checking Boot JDK version... " >&6; }
13287              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13288              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13289$as_echo "$BOOT_JDK_VERSION" >&6; }
13290            fi # end check jdk version
13291          fi # end check rt.jar
13292        fi # end check javac
13293      fi # end check java
13294    fi # end check boot jdk found
13295  fi
13296
13297
13298  if test "x$BOOT_JDK_FOUND" = xno; then
13299    # Now execute the test
13300
13301  if test "x$PROGRAMFILES" != x; then
13302    VIRTUAL_DIR="$PROGRAMFILES/Java"
13303
13304  windows_path="$VIRTUAL_DIR"
13305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13306    unix_path=`$CYGPATH -u "$windows_path"`
13307    VIRTUAL_DIR="$unix_path"
13308  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13309    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13310    VIRTUAL_DIR="$unix_path"
13311  fi
13312
13313
13314  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13315  BOOT_JDK_SUFFIX=""
13316  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13317  if test "x$ALL_JDKS_FOUND" != x; then
13318    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13319
13320  if test "x$BOOT_JDK_FOUND" = xno; then
13321    # Now execute the test
13322
13323        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13324        if test -d "$BOOT_JDK"; then
13325          BOOT_JDK_FOUND=maybe
13326          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13327$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13328        fi
13329
13330
13331    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13332    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13333      # Do we have a bin/java?
13334      if test ! -x "$BOOT_JDK/bin/java"; then
13335        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13336$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13337        BOOT_JDK_FOUND=no
13338      else
13339        # Do we have a bin/javac?
13340        if test ! -x "$BOOT_JDK/bin/javac"; then
13341          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13342$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13343          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13344$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13345          BOOT_JDK_FOUND=no
13346        else
13347          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13348          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13349            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13350$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13351            BOOT_JDK_FOUND=no
13352          else
13353            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13354            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13355
13356            # Extra M4 quote needed to protect [] in grep expression.
13357            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13358            if test "x$FOUND_VERSION_78" = x; then
13359              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13360$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13361              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13362$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13363              BOOT_JDK_FOUND=no
13364            else
13365              # We're done! :-)
13366              BOOT_JDK_FOUND=yes
13367
13368  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13369
13370  # Input might be given as Windows format, start by converting to
13371  # unix format.
13372  path="$BOOT_JDK"
13373  new_path=`$CYGPATH -u "$path"`
13374
13375  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13376  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13377  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13378  # "foo.exe" is OK but "foo" is an error.
13379  #
13380  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13381  # It is also a way to make sure we got the proper file name for the real test later on.
13382  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13383  if test "x$test_shortpath" = x; then
13384    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13385$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13386    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13387  fi
13388
13389  # Call helper function which possibly converts this using DOS-style short mode.
13390  # If so, the updated path is stored in $new_path.
13391
13392  input_path="$new_path"
13393  # Check if we need to convert this using DOS-style short mode. If the path
13394  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13395  # take no chances and rewrite it.
13396  # Note: m4 eats our [], so we need to use [ and ] instead.
13397  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13398  if test "x$has_forbidden_chars" != x; then
13399    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13400    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13401    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13402    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13403      # Going to short mode and back again did indeed matter. Since short mode is
13404      # case insensitive, let's make it lowercase to improve readability.
13405      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13406      # Now convert it back to Unix-stile (cygpath)
13407      input_path=`$CYGPATH -u "$shortmode_path"`
13408      new_path="$input_path"
13409    fi
13410  fi
13411
13412  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13413  if test "x$test_cygdrive_prefix" = x; then
13414    # As a simple fix, exclude /usr/bin since it's not a real path.
13415    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13416      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13417      # a path prefixed by /cygdrive for fixpath to work.
13418      new_path="$CYGWIN_ROOT_PATH$input_path"
13419    fi
13420  fi
13421
13422
13423  if test "x$path" != "x$new_path"; then
13424    BOOT_JDK="$new_path"
13425    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13426$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13427  fi
13428
13429  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13430
13431  path="$BOOT_JDK"
13432  has_colon=`$ECHO $path | $GREP ^.:`
13433  new_path="$path"
13434  if test "x$has_colon" = x; then
13435    # Not in mixed or Windows style, start by that.
13436    new_path=`cmd //c echo $path`
13437  fi
13438
13439
13440  input_path="$new_path"
13441  # Check if we need to convert this using DOS-style short mode. If the path
13442  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13443  # take no chances and rewrite it.
13444  # Note: m4 eats our [], so we need to use [ and ] instead.
13445  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13446  if test "x$has_forbidden_chars" != x; then
13447    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13448    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13449  fi
13450
13451
13452  windows_path="$new_path"
13453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13454    unix_path=`$CYGPATH -u "$windows_path"`
13455    new_path="$unix_path"
13456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13457    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13458    new_path="$unix_path"
13459  fi
13460
13461  if test "x$path" != "x$new_path"; then
13462    BOOT_JDK="$new_path"
13463    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13464$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13465  fi
13466
13467  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13468  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13469
13470  else
13471    # We're on a posix platform. Hooray! :)
13472    path="$BOOT_JDK"
13473    has_space=`$ECHO "$path" | $GREP " "`
13474    if test "x$has_space" != x; then
13475      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13476$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13477      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13478    fi
13479
13480    # Use eval to expand a potential ~
13481    eval path="$path"
13482    if test ! -f "$path" && test ! -d "$path"; then
13483      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13484    fi
13485
13486    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13487  fi
13488
13489              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13490$as_echo_n "checking for Boot JDK... " >&6; }
13491              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13492$as_echo "$BOOT_JDK" >&6; }
13493              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13494$as_echo_n "checking Boot JDK version... " >&6; }
13495              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13496              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13497$as_echo "$BOOT_JDK_VERSION" >&6; }
13498            fi # end check jdk version
13499          fi # end check rt.jar
13500        fi # end check javac
13501      fi # end check java
13502    fi # end check boot jdk found
13503  fi
13504
13505    done
13506  fi
13507
13508  fi
13509
13510
13511    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13512    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13513      # Do we have a bin/java?
13514      if test ! -x "$BOOT_JDK/bin/java"; then
13515        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13516$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13517        BOOT_JDK_FOUND=no
13518      else
13519        # Do we have a bin/javac?
13520        if test ! -x "$BOOT_JDK/bin/javac"; then
13521          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13522$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13523          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13524$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13525          BOOT_JDK_FOUND=no
13526        else
13527          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13528          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13529            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13530$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13531            BOOT_JDK_FOUND=no
13532          else
13533            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13534            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13535
13536            # Extra M4 quote needed to protect [] in grep expression.
13537            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13538            if test "x$FOUND_VERSION_78" = x; then
13539              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13540$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13541              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13542$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13543              BOOT_JDK_FOUND=no
13544            else
13545              # We're done! :-)
13546              BOOT_JDK_FOUND=yes
13547
13548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13549
13550  # Input might be given as Windows format, start by converting to
13551  # unix format.
13552  path="$BOOT_JDK"
13553  new_path=`$CYGPATH -u "$path"`
13554
13555  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13556  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13557  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13558  # "foo.exe" is OK but "foo" is an error.
13559  #
13560  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13561  # It is also a way to make sure we got the proper file name for the real test later on.
13562  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13563  if test "x$test_shortpath" = x; then
13564    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13565$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13566    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13567  fi
13568
13569  # Call helper function which possibly converts this using DOS-style short mode.
13570  # If so, the updated path is stored in $new_path.
13571
13572  input_path="$new_path"
13573  # Check if we need to convert this using DOS-style short mode. If the path
13574  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13575  # take no chances and rewrite it.
13576  # Note: m4 eats our [], so we need to use [ and ] instead.
13577  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13578  if test "x$has_forbidden_chars" != x; then
13579    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13580    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13581    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13582    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13583      # Going to short mode and back again did indeed matter. Since short mode is
13584      # case insensitive, let's make it lowercase to improve readability.
13585      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13586      # Now convert it back to Unix-stile (cygpath)
13587      input_path=`$CYGPATH -u "$shortmode_path"`
13588      new_path="$input_path"
13589    fi
13590  fi
13591
13592  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13593  if test "x$test_cygdrive_prefix" = x; then
13594    # As a simple fix, exclude /usr/bin since it's not a real path.
13595    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13596      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13597      # a path prefixed by /cygdrive for fixpath to work.
13598      new_path="$CYGWIN_ROOT_PATH$input_path"
13599    fi
13600  fi
13601
13602
13603  if test "x$path" != "x$new_path"; then
13604    BOOT_JDK="$new_path"
13605    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13606$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13607  fi
13608
13609  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13610
13611  path="$BOOT_JDK"
13612  has_colon=`$ECHO $path | $GREP ^.:`
13613  new_path="$path"
13614  if test "x$has_colon" = x; then
13615    # Not in mixed or Windows style, start by that.
13616    new_path=`cmd //c echo $path`
13617  fi
13618
13619
13620  input_path="$new_path"
13621  # Check if we need to convert this using DOS-style short mode. If the path
13622  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13623  # take no chances and rewrite it.
13624  # Note: m4 eats our [], so we need to use [ and ] instead.
13625  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13626  if test "x$has_forbidden_chars" != x; then
13627    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13628    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13629  fi
13630
13631
13632  windows_path="$new_path"
13633  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13634    unix_path=`$CYGPATH -u "$windows_path"`
13635    new_path="$unix_path"
13636  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13637    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13638    new_path="$unix_path"
13639  fi
13640
13641  if test "x$path" != "x$new_path"; then
13642    BOOT_JDK="$new_path"
13643    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13644$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13645  fi
13646
13647  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13648  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13649
13650  else
13651    # We're on a posix platform. Hooray! :)
13652    path="$BOOT_JDK"
13653    has_space=`$ECHO "$path" | $GREP " "`
13654    if test "x$has_space" != x; then
13655      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13656$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13657      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13658    fi
13659
13660    # Use eval to expand a potential ~
13661    eval path="$path"
13662    if test ! -f "$path" && test ! -d "$path"; then
13663      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13664    fi
13665
13666    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13667  fi
13668
13669              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13670$as_echo_n "checking for Boot JDK... " >&6; }
13671              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13672$as_echo "$BOOT_JDK" >&6; }
13673              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13674$as_echo_n "checking Boot JDK version... " >&6; }
13675              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13676              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13677$as_echo "$BOOT_JDK_VERSION" >&6; }
13678            fi # end check jdk version
13679          fi # end check rt.jar
13680        fi # end check javac
13681      fi # end check java
13682    fi # end check boot jdk found
13683  fi
13684
13685
13686  if test "x$BOOT_JDK_FOUND" = xno; then
13687    # Now execute the test
13688
13689  if test "x$ProgramFiles" != x; then
13690    VIRTUAL_DIR="$ProgramFiles/Java"
13691
13692  windows_path="$VIRTUAL_DIR"
13693  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13694    unix_path=`$CYGPATH -u "$windows_path"`
13695    VIRTUAL_DIR="$unix_path"
13696  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13697    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13698    VIRTUAL_DIR="$unix_path"
13699  fi
13700
13701
13702  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13703  BOOT_JDK_SUFFIX=""
13704  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13705  if test "x$ALL_JDKS_FOUND" != x; then
13706    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13707
13708  if test "x$BOOT_JDK_FOUND" = xno; then
13709    # Now execute the test
13710
13711        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13712        if test -d "$BOOT_JDK"; then
13713          BOOT_JDK_FOUND=maybe
13714          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13715$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13716        fi
13717
13718
13719    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13720    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13721      # Do we have a bin/java?
13722      if test ! -x "$BOOT_JDK/bin/java"; then
13723        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13724$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13725        BOOT_JDK_FOUND=no
13726      else
13727        # Do we have a bin/javac?
13728        if test ! -x "$BOOT_JDK/bin/javac"; then
13729          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13730$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13731          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13732$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13733          BOOT_JDK_FOUND=no
13734        else
13735          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13736          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13737            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13738$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13739            BOOT_JDK_FOUND=no
13740          else
13741            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13742            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13743
13744            # Extra M4 quote needed to protect [] in grep expression.
13745            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13746            if test "x$FOUND_VERSION_78" = x; then
13747              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13748$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13749              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13750$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13751              BOOT_JDK_FOUND=no
13752            else
13753              # We're done! :-)
13754              BOOT_JDK_FOUND=yes
13755
13756  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13757
13758  # Input might be given as Windows format, start by converting to
13759  # unix format.
13760  path="$BOOT_JDK"
13761  new_path=`$CYGPATH -u "$path"`
13762
13763  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13764  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13765  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13766  # "foo.exe" is OK but "foo" is an error.
13767  #
13768  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13769  # It is also a way to make sure we got the proper file name for the real test later on.
13770  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13771  if test "x$test_shortpath" = x; then
13772    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13773$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13774    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13775  fi
13776
13777  # Call helper function which possibly converts this using DOS-style short mode.
13778  # If so, the updated path is stored in $new_path.
13779
13780  input_path="$new_path"
13781  # Check if we need to convert this using DOS-style short mode. If the path
13782  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13783  # take no chances and rewrite it.
13784  # Note: m4 eats our [], so we need to use [ and ] instead.
13785  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13786  if test "x$has_forbidden_chars" != x; then
13787    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13788    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13789    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13790    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13791      # Going to short mode and back again did indeed matter. Since short mode is
13792      # case insensitive, let's make it lowercase to improve readability.
13793      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13794      # Now convert it back to Unix-stile (cygpath)
13795      input_path=`$CYGPATH -u "$shortmode_path"`
13796      new_path="$input_path"
13797    fi
13798  fi
13799
13800  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13801  if test "x$test_cygdrive_prefix" = x; then
13802    # As a simple fix, exclude /usr/bin since it's not a real path.
13803    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13804      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13805      # a path prefixed by /cygdrive for fixpath to work.
13806      new_path="$CYGWIN_ROOT_PATH$input_path"
13807    fi
13808  fi
13809
13810
13811  if test "x$path" != "x$new_path"; then
13812    BOOT_JDK="$new_path"
13813    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13814$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13815  fi
13816
13817  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13818
13819  path="$BOOT_JDK"
13820  has_colon=`$ECHO $path | $GREP ^.:`
13821  new_path="$path"
13822  if test "x$has_colon" = x; then
13823    # Not in mixed or Windows style, start by that.
13824    new_path=`cmd //c echo $path`
13825  fi
13826
13827
13828  input_path="$new_path"
13829  # Check if we need to convert this using DOS-style short mode. If the path
13830  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13831  # take no chances and rewrite it.
13832  # Note: m4 eats our [], so we need to use [ and ] instead.
13833  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13834  if test "x$has_forbidden_chars" != x; then
13835    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13836    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13837  fi
13838
13839
13840  windows_path="$new_path"
13841  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13842    unix_path=`$CYGPATH -u "$windows_path"`
13843    new_path="$unix_path"
13844  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13845    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13846    new_path="$unix_path"
13847  fi
13848
13849  if test "x$path" != "x$new_path"; then
13850    BOOT_JDK="$new_path"
13851    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13852$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13853  fi
13854
13855  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13856  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13857
13858  else
13859    # We're on a posix platform. Hooray! :)
13860    path="$BOOT_JDK"
13861    has_space=`$ECHO "$path" | $GREP " "`
13862    if test "x$has_space" != x; then
13863      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13864$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13865      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13866    fi
13867
13868    # Use eval to expand a potential ~
13869    eval path="$path"
13870    if test ! -f "$path" && test ! -d "$path"; then
13871      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13872    fi
13873
13874    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13875  fi
13876
13877              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13878$as_echo_n "checking for Boot JDK... " >&6; }
13879              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13880$as_echo "$BOOT_JDK" >&6; }
13881              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13882$as_echo_n "checking Boot JDK version... " >&6; }
13883              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13884              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13885$as_echo "$BOOT_JDK_VERSION" >&6; }
13886            fi # end check jdk version
13887          fi # end check rt.jar
13888        fi # end check javac
13889      fi # end check java
13890    fi # end check boot jdk found
13891  fi
13892
13893    done
13894  fi
13895
13896  fi
13897
13898
13899    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13900    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13901      # Do we have a bin/java?
13902      if test ! -x "$BOOT_JDK/bin/java"; then
13903        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13904$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13905        BOOT_JDK_FOUND=no
13906      else
13907        # Do we have a bin/javac?
13908        if test ! -x "$BOOT_JDK/bin/javac"; then
13909          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13910$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13911          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13912$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13913          BOOT_JDK_FOUND=no
13914        else
13915          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13916          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13917            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13918$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13919            BOOT_JDK_FOUND=no
13920          else
13921            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13922            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13923
13924            # Extra M4 quote needed to protect [] in grep expression.
13925            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13926            if test "x$FOUND_VERSION_78" = x; then
13927              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13928$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13929              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13930$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13931              BOOT_JDK_FOUND=no
13932            else
13933              # We're done! :-)
13934              BOOT_JDK_FOUND=yes
13935
13936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13937
13938  # Input might be given as Windows format, start by converting to
13939  # unix format.
13940  path="$BOOT_JDK"
13941  new_path=`$CYGPATH -u "$path"`
13942
13943  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13944  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13945  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13946  # "foo.exe" is OK but "foo" is an error.
13947  #
13948  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13949  # It is also a way to make sure we got the proper file name for the real test later on.
13950  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13951  if test "x$test_shortpath" = x; then
13952    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13953$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13954    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13955  fi
13956
13957  # Call helper function which possibly converts this using DOS-style short mode.
13958  # If so, the updated path is stored in $new_path.
13959
13960  input_path="$new_path"
13961  # Check if we need to convert this using DOS-style short mode. If the path
13962  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13963  # take no chances and rewrite it.
13964  # Note: m4 eats our [], so we need to use [ and ] instead.
13965  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13966  if test "x$has_forbidden_chars" != x; then
13967    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13968    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13969    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13970    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13971      # Going to short mode and back again did indeed matter. Since short mode is
13972      # case insensitive, let's make it lowercase to improve readability.
13973      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13974      # Now convert it back to Unix-stile (cygpath)
13975      input_path=`$CYGPATH -u "$shortmode_path"`
13976      new_path="$input_path"
13977    fi
13978  fi
13979
13980  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13981  if test "x$test_cygdrive_prefix" = x; then
13982    # As a simple fix, exclude /usr/bin since it's not a real path.
13983    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13984      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13985      # a path prefixed by /cygdrive for fixpath to work.
13986      new_path="$CYGWIN_ROOT_PATH$input_path"
13987    fi
13988  fi
13989
13990
13991  if test "x$path" != "x$new_path"; then
13992    BOOT_JDK="$new_path"
13993    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13994$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13995  fi
13996
13997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13998
13999  path="$BOOT_JDK"
14000  has_colon=`$ECHO $path | $GREP ^.:`
14001  new_path="$path"
14002  if test "x$has_colon" = x; then
14003    # Not in mixed or Windows style, start by that.
14004    new_path=`cmd //c echo $path`
14005  fi
14006
14007
14008  input_path="$new_path"
14009  # Check if we need to convert this using DOS-style short mode. If the path
14010  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14011  # take no chances and rewrite it.
14012  # Note: m4 eats our [], so we need to use [ and ] instead.
14013  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14014  if test "x$has_forbidden_chars" != x; then
14015    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14016    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14017  fi
14018
14019
14020  windows_path="$new_path"
14021  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14022    unix_path=`$CYGPATH -u "$windows_path"`
14023    new_path="$unix_path"
14024  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14025    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14026    new_path="$unix_path"
14027  fi
14028
14029  if test "x$path" != "x$new_path"; then
14030    BOOT_JDK="$new_path"
14031    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14032$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14033  fi
14034
14035  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14036  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14037
14038  else
14039    # We're on a posix platform. Hooray! :)
14040    path="$BOOT_JDK"
14041    has_space=`$ECHO "$path" | $GREP " "`
14042    if test "x$has_space" != x; then
14043      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14044$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14045      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14046    fi
14047
14048    # Use eval to expand a potential ~
14049    eval path="$path"
14050    if test ! -f "$path" && test ! -d "$path"; then
14051      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14052    fi
14053
14054    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14055  fi
14056
14057              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14058$as_echo_n "checking for Boot JDK... " >&6; }
14059              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14060$as_echo "$BOOT_JDK" >&6; }
14061              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14062$as_echo_n "checking Boot JDK version... " >&6; }
14063              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14064              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14065$as_echo "$BOOT_JDK_VERSION" >&6; }
14066            fi # end check jdk version
14067          fi # end check rt.jar
14068        fi # end check javac
14069      fi # end check java
14070    fi # end check boot jdk found
14071  fi
14072
14073
14074  if test "x$BOOT_JDK_FOUND" = xno; then
14075    # Now execute the test
14076
14077  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
14078  BOOT_JDK_SUFFIX=""
14079  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14080  if test "x$ALL_JDKS_FOUND" != x; then
14081    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14082
14083  if test "x$BOOT_JDK_FOUND" = xno; then
14084    # Now execute the test
14085
14086        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14087        if test -d "$BOOT_JDK"; then
14088          BOOT_JDK_FOUND=maybe
14089          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14090$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14091        fi
14092
14093
14094    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14095    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14096      # Do we have a bin/java?
14097      if test ! -x "$BOOT_JDK/bin/java"; then
14098        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14099$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14100        BOOT_JDK_FOUND=no
14101      else
14102        # Do we have a bin/javac?
14103        if test ! -x "$BOOT_JDK/bin/javac"; then
14104          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14105$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14106          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14107$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14108          BOOT_JDK_FOUND=no
14109        else
14110          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14111          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14112            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14113$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14114            BOOT_JDK_FOUND=no
14115          else
14116            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14117            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14118
14119            # Extra M4 quote needed to protect [] in grep expression.
14120            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14121            if test "x$FOUND_VERSION_78" = x; then
14122              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14123$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14124              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14125$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14126              BOOT_JDK_FOUND=no
14127            else
14128              # We're done! :-)
14129              BOOT_JDK_FOUND=yes
14130
14131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14132
14133  # Input might be given as Windows format, start by converting to
14134  # unix format.
14135  path="$BOOT_JDK"
14136  new_path=`$CYGPATH -u "$path"`
14137
14138  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14139  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14140  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14141  # "foo.exe" is OK but "foo" is an error.
14142  #
14143  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14144  # It is also a way to make sure we got the proper file name for the real test later on.
14145  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14146  if test "x$test_shortpath" = x; then
14147    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14148$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14149    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14150  fi
14151
14152  # Call helper function which possibly converts this using DOS-style short mode.
14153  # If so, the updated path is stored in $new_path.
14154
14155  input_path="$new_path"
14156  # Check if we need to convert this using DOS-style short mode. If the path
14157  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14158  # take no chances and rewrite it.
14159  # Note: m4 eats our [], so we need to use [ and ] instead.
14160  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14161  if test "x$has_forbidden_chars" != x; then
14162    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14163    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14164    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14165    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14166      # Going to short mode and back again did indeed matter. Since short mode is
14167      # case insensitive, let's make it lowercase to improve readability.
14168      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14169      # Now convert it back to Unix-stile (cygpath)
14170      input_path=`$CYGPATH -u "$shortmode_path"`
14171      new_path="$input_path"
14172    fi
14173  fi
14174
14175  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14176  if test "x$test_cygdrive_prefix" = x; then
14177    # As a simple fix, exclude /usr/bin since it's not a real path.
14178    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14179      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14180      # a path prefixed by /cygdrive for fixpath to work.
14181      new_path="$CYGWIN_ROOT_PATH$input_path"
14182    fi
14183  fi
14184
14185
14186  if test "x$path" != "x$new_path"; then
14187    BOOT_JDK="$new_path"
14188    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14189$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14190  fi
14191
14192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14193
14194  path="$BOOT_JDK"
14195  has_colon=`$ECHO $path | $GREP ^.:`
14196  new_path="$path"
14197  if test "x$has_colon" = x; then
14198    # Not in mixed or Windows style, start by that.
14199    new_path=`cmd //c echo $path`
14200  fi
14201
14202
14203  input_path="$new_path"
14204  # Check if we need to convert this using DOS-style short mode. If the path
14205  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14206  # take no chances and rewrite it.
14207  # Note: m4 eats our [], so we need to use [ and ] instead.
14208  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14209  if test "x$has_forbidden_chars" != x; then
14210    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14211    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14212  fi
14213
14214
14215  windows_path="$new_path"
14216  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14217    unix_path=`$CYGPATH -u "$windows_path"`
14218    new_path="$unix_path"
14219  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14220    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14221    new_path="$unix_path"
14222  fi
14223
14224  if test "x$path" != "x$new_path"; then
14225    BOOT_JDK="$new_path"
14226    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14227$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14228  fi
14229
14230  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14231  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14232
14233  else
14234    # We're on a posix platform. Hooray! :)
14235    path="$BOOT_JDK"
14236    has_space=`$ECHO "$path" | $GREP " "`
14237    if test "x$has_space" != x; then
14238      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14239$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14240      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14241    fi
14242
14243    # Use eval to expand a potential ~
14244    eval path="$path"
14245    if test ! -f "$path" && test ! -d "$path"; then
14246      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14247    fi
14248
14249    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14250  fi
14251
14252              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14253$as_echo_n "checking for Boot JDK... " >&6; }
14254              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14255$as_echo "$BOOT_JDK" >&6; }
14256              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14257$as_echo_n "checking Boot JDK version... " >&6; }
14258              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14259              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14260$as_echo "$BOOT_JDK_VERSION" >&6; }
14261            fi # end check jdk version
14262          fi # end check rt.jar
14263        fi # end check javac
14264      fi # end check java
14265    fi # end check boot jdk found
14266  fi
14267
14268    done
14269  fi
14270
14271
14272    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14273    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14274      # Do we have a bin/java?
14275      if test ! -x "$BOOT_JDK/bin/java"; then
14276        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14277$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14278        BOOT_JDK_FOUND=no
14279      else
14280        # Do we have a bin/javac?
14281        if test ! -x "$BOOT_JDK/bin/javac"; then
14282          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14283$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14284          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14285$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14286          BOOT_JDK_FOUND=no
14287        else
14288          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14289          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14290            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14291$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14292            BOOT_JDK_FOUND=no
14293          else
14294            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14295            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14296
14297            # Extra M4 quote needed to protect [] in grep expression.
14298            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14299            if test "x$FOUND_VERSION_78" = x; then
14300              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14301$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14302              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14303$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14304              BOOT_JDK_FOUND=no
14305            else
14306              # We're done! :-)
14307              BOOT_JDK_FOUND=yes
14308
14309  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14310
14311  # Input might be given as Windows format, start by converting to
14312  # unix format.
14313  path="$BOOT_JDK"
14314  new_path=`$CYGPATH -u "$path"`
14315
14316  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14317  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14318  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14319  # "foo.exe" is OK but "foo" is an error.
14320  #
14321  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14322  # It is also a way to make sure we got the proper file name for the real test later on.
14323  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14324  if test "x$test_shortpath" = x; then
14325    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14326$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14327    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14328  fi
14329
14330  # Call helper function which possibly converts this using DOS-style short mode.
14331  # If so, the updated path is stored in $new_path.
14332
14333  input_path="$new_path"
14334  # Check if we need to convert this using DOS-style short mode. If the path
14335  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14336  # take no chances and rewrite it.
14337  # Note: m4 eats our [], so we need to use [ and ] instead.
14338  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14339  if test "x$has_forbidden_chars" != x; then
14340    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14341    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14342    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14343    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14344      # Going to short mode and back again did indeed matter. Since short mode is
14345      # case insensitive, let's make it lowercase to improve readability.
14346      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14347      # Now convert it back to Unix-stile (cygpath)
14348      input_path=`$CYGPATH -u "$shortmode_path"`
14349      new_path="$input_path"
14350    fi
14351  fi
14352
14353  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14354  if test "x$test_cygdrive_prefix" = x; then
14355    # As a simple fix, exclude /usr/bin since it's not a real path.
14356    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14357      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14358      # a path prefixed by /cygdrive for fixpath to work.
14359      new_path="$CYGWIN_ROOT_PATH$input_path"
14360    fi
14361  fi
14362
14363
14364  if test "x$path" != "x$new_path"; then
14365    BOOT_JDK="$new_path"
14366    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14367$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14368  fi
14369
14370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14371
14372  path="$BOOT_JDK"
14373  has_colon=`$ECHO $path | $GREP ^.:`
14374  new_path="$path"
14375  if test "x$has_colon" = x; then
14376    # Not in mixed or Windows style, start by that.
14377    new_path=`cmd //c echo $path`
14378  fi
14379
14380
14381  input_path="$new_path"
14382  # Check if we need to convert this using DOS-style short mode. If the path
14383  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14384  # take no chances and rewrite it.
14385  # Note: m4 eats our [], so we need to use [ and ] instead.
14386  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14387  if test "x$has_forbidden_chars" != x; then
14388    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14389    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14390  fi
14391
14392
14393  windows_path="$new_path"
14394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14395    unix_path=`$CYGPATH -u "$windows_path"`
14396    new_path="$unix_path"
14397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14398    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14399    new_path="$unix_path"
14400  fi
14401
14402  if test "x$path" != "x$new_path"; then
14403    BOOT_JDK="$new_path"
14404    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14405$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14406  fi
14407
14408  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14409  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14410
14411  else
14412    # We're on a posix platform. Hooray! :)
14413    path="$BOOT_JDK"
14414    has_space=`$ECHO "$path" | $GREP " "`
14415    if test "x$has_space" != x; then
14416      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14417$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14418      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14419    fi
14420
14421    # Use eval to expand a potential ~
14422    eval path="$path"
14423    if test ! -f "$path" && test ! -d "$path"; then
14424      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14425    fi
14426
14427    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14428  fi
14429
14430              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14431$as_echo_n "checking for Boot JDK... " >&6; }
14432              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14433$as_echo "$BOOT_JDK" >&6; }
14434              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14435$as_echo_n "checking Boot JDK version... " >&6; }
14436              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14437              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14438$as_echo "$BOOT_JDK_VERSION" >&6; }
14439            fi # end check jdk version
14440          fi # end check rt.jar
14441        fi # end check javac
14442      fi # end check java
14443    fi # end check boot jdk found
14444  fi
14445
14446  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14447
14448  if test "x$BOOT_JDK_FOUND" = xno; then
14449    # Now execute the test
14450
14451  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14452  BOOT_JDK_SUFFIX="/Contents/Home"
14453  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14454  if test "x$ALL_JDKS_FOUND" != x; then
14455    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14456
14457  if test "x$BOOT_JDK_FOUND" = xno; then
14458    # Now execute the test
14459
14460        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14461        if test -d "$BOOT_JDK"; then
14462          BOOT_JDK_FOUND=maybe
14463          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14464$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14465        fi
14466
14467
14468    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14469    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14470      # Do we have a bin/java?
14471      if test ! -x "$BOOT_JDK/bin/java"; then
14472        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14473$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14474        BOOT_JDK_FOUND=no
14475      else
14476        # Do we have a bin/javac?
14477        if test ! -x "$BOOT_JDK/bin/javac"; then
14478          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14479$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14480          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14481$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14482          BOOT_JDK_FOUND=no
14483        else
14484          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14485          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14486            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14487$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14488            BOOT_JDK_FOUND=no
14489          else
14490            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14491            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14492
14493            # Extra M4 quote needed to protect [] in grep expression.
14494            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14495            if test "x$FOUND_VERSION_78" = x; then
14496              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14497$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14498              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14499$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14500              BOOT_JDK_FOUND=no
14501            else
14502              # We're done! :-)
14503              BOOT_JDK_FOUND=yes
14504
14505  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14506
14507  # Input might be given as Windows format, start by converting to
14508  # unix format.
14509  path="$BOOT_JDK"
14510  new_path=`$CYGPATH -u "$path"`
14511
14512  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14513  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14514  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14515  # "foo.exe" is OK but "foo" is an error.
14516  #
14517  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14518  # It is also a way to make sure we got the proper file name for the real test later on.
14519  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14520  if test "x$test_shortpath" = x; then
14521    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14522$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14523    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14524  fi
14525
14526  # Call helper function which possibly converts this using DOS-style short mode.
14527  # If so, the updated path is stored in $new_path.
14528
14529  input_path="$new_path"
14530  # Check if we need to convert this using DOS-style short mode. If the path
14531  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14532  # take no chances and rewrite it.
14533  # Note: m4 eats our [], so we need to use [ and ] instead.
14534  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14535  if test "x$has_forbidden_chars" != x; then
14536    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14537    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14538    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14539    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14540      # Going to short mode and back again did indeed matter. Since short mode is
14541      # case insensitive, let's make it lowercase to improve readability.
14542      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14543      # Now convert it back to Unix-stile (cygpath)
14544      input_path=`$CYGPATH -u "$shortmode_path"`
14545      new_path="$input_path"
14546    fi
14547  fi
14548
14549  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14550  if test "x$test_cygdrive_prefix" = x; then
14551    # As a simple fix, exclude /usr/bin since it's not a real path.
14552    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14553      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14554      # a path prefixed by /cygdrive for fixpath to work.
14555      new_path="$CYGWIN_ROOT_PATH$input_path"
14556    fi
14557  fi
14558
14559
14560  if test "x$path" != "x$new_path"; then
14561    BOOT_JDK="$new_path"
14562    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14563$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14564  fi
14565
14566  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14567
14568  path="$BOOT_JDK"
14569  has_colon=`$ECHO $path | $GREP ^.:`
14570  new_path="$path"
14571  if test "x$has_colon" = x; then
14572    # Not in mixed or Windows style, start by that.
14573    new_path=`cmd //c echo $path`
14574  fi
14575
14576
14577  input_path="$new_path"
14578  # Check if we need to convert this using DOS-style short mode. If the path
14579  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14580  # take no chances and rewrite it.
14581  # Note: m4 eats our [], so we need to use [ and ] instead.
14582  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14583  if test "x$has_forbidden_chars" != x; then
14584    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14585    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14586  fi
14587
14588
14589  windows_path="$new_path"
14590  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14591    unix_path=`$CYGPATH -u "$windows_path"`
14592    new_path="$unix_path"
14593  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14594    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14595    new_path="$unix_path"
14596  fi
14597
14598  if test "x$path" != "x$new_path"; then
14599    BOOT_JDK="$new_path"
14600    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14601$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14602  fi
14603
14604  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14605  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14606
14607  else
14608    # We're on a posix platform. Hooray! :)
14609    path="$BOOT_JDK"
14610    has_space=`$ECHO "$path" | $GREP " "`
14611    if test "x$has_space" != x; then
14612      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14613$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14614      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14615    fi
14616
14617    # Use eval to expand a potential ~
14618    eval path="$path"
14619    if test ! -f "$path" && test ! -d "$path"; then
14620      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14621    fi
14622
14623    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14624  fi
14625
14626              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14627$as_echo_n "checking for Boot JDK... " >&6; }
14628              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14629$as_echo "$BOOT_JDK" >&6; }
14630              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14631$as_echo_n "checking Boot JDK version... " >&6; }
14632              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14633              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14634$as_echo "$BOOT_JDK_VERSION" >&6; }
14635            fi # end check jdk version
14636          fi # end check rt.jar
14637        fi # end check javac
14638      fi # end check java
14639    fi # end check boot jdk found
14640  fi
14641
14642    done
14643  fi
14644
14645
14646    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14647    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14648      # Do we have a bin/java?
14649      if test ! -x "$BOOT_JDK/bin/java"; then
14650        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14651$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14652        BOOT_JDK_FOUND=no
14653      else
14654        # Do we have a bin/javac?
14655        if test ! -x "$BOOT_JDK/bin/javac"; then
14656          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14657$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14658          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14659$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14660          BOOT_JDK_FOUND=no
14661        else
14662          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14663          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14664            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14665$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14666            BOOT_JDK_FOUND=no
14667          else
14668            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14669            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14670
14671            # Extra M4 quote needed to protect [] in grep expression.
14672            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14673            if test "x$FOUND_VERSION_78" = x; then
14674              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14675$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14676              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14677$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14678              BOOT_JDK_FOUND=no
14679            else
14680              # We're done! :-)
14681              BOOT_JDK_FOUND=yes
14682
14683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14684
14685  # Input might be given as Windows format, start by converting to
14686  # unix format.
14687  path="$BOOT_JDK"
14688  new_path=`$CYGPATH -u "$path"`
14689
14690  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14691  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14692  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14693  # "foo.exe" is OK but "foo" is an error.
14694  #
14695  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14696  # It is also a way to make sure we got the proper file name for the real test later on.
14697  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14698  if test "x$test_shortpath" = x; then
14699    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14700$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14701    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14702  fi
14703
14704  # Call helper function which possibly converts this using DOS-style short mode.
14705  # If so, the updated path is stored in $new_path.
14706
14707  input_path="$new_path"
14708  # Check if we need to convert this using DOS-style short mode. If the path
14709  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14710  # take no chances and rewrite it.
14711  # Note: m4 eats our [], so we need to use [ and ] instead.
14712  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14713  if test "x$has_forbidden_chars" != x; then
14714    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14715    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14716    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14717    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14718      # Going to short mode and back again did indeed matter. Since short mode is
14719      # case insensitive, let's make it lowercase to improve readability.
14720      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14721      # Now convert it back to Unix-stile (cygpath)
14722      input_path=`$CYGPATH -u "$shortmode_path"`
14723      new_path="$input_path"
14724    fi
14725  fi
14726
14727  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14728  if test "x$test_cygdrive_prefix" = x; then
14729    # As a simple fix, exclude /usr/bin since it's not a real path.
14730    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14731      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14732      # a path prefixed by /cygdrive for fixpath to work.
14733      new_path="$CYGWIN_ROOT_PATH$input_path"
14734    fi
14735  fi
14736
14737
14738  if test "x$path" != "x$new_path"; then
14739    BOOT_JDK="$new_path"
14740    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14741$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14742  fi
14743
14744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14745
14746  path="$BOOT_JDK"
14747  has_colon=`$ECHO $path | $GREP ^.:`
14748  new_path="$path"
14749  if test "x$has_colon" = x; then
14750    # Not in mixed or Windows style, start by that.
14751    new_path=`cmd //c echo $path`
14752  fi
14753
14754
14755  input_path="$new_path"
14756  # Check if we need to convert this using DOS-style short mode. If the path
14757  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14758  # take no chances and rewrite it.
14759  # Note: m4 eats our [], so we need to use [ and ] instead.
14760  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14761  if test "x$has_forbidden_chars" != x; then
14762    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14763    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14764  fi
14765
14766
14767  windows_path="$new_path"
14768  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14769    unix_path=`$CYGPATH -u "$windows_path"`
14770    new_path="$unix_path"
14771  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14772    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14773    new_path="$unix_path"
14774  fi
14775
14776  if test "x$path" != "x$new_path"; then
14777    BOOT_JDK="$new_path"
14778    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14779$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14780  fi
14781
14782  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14783  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14784
14785  else
14786    # We're on a posix platform. Hooray! :)
14787    path="$BOOT_JDK"
14788    has_space=`$ECHO "$path" | $GREP " "`
14789    if test "x$has_space" != x; then
14790      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14791$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14792      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14793    fi
14794
14795    # Use eval to expand a potential ~
14796    eval path="$path"
14797    if test ! -f "$path" && test ! -d "$path"; then
14798      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14799    fi
14800
14801    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14802  fi
14803
14804              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14805$as_echo_n "checking for Boot JDK... " >&6; }
14806              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14807$as_echo "$BOOT_JDK" >&6; }
14808              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14809$as_echo_n "checking Boot JDK version... " >&6; }
14810              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14811              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14812$as_echo "$BOOT_JDK_VERSION" >&6; }
14813            fi # end check jdk version
14814          fi # end check rt.jar
14815        fi # end check javac
14816      fi # end check java
14817    fi # end check boot jdk found
14818  fi
14819
14820
14821  if test "x$BOOT_JDK_FOUND" = xno; then
14822    # Now execute the test
14823
14824  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14825  BOOT_JDK_SUFFIX="/Contents/Home"
14826  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14827  if test "x$ALL_JDKS_FOUND" != x; then
14828    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14829
14830  if test "x$BOOT_JDK_FOUND" = xno; then
14831    # Now execute the test
14832
14833        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14834        if test -d "$BOOT_JDK"; then
14835          BOOT_JDK_FOUND=maybe
14836          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14837$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14838        fi
14839
14840
14841    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14842    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14843      # Do we have a bin/java?
14844      if test ! -x "$BOOT_JDK/bin/java"; then
14845        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14846$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14847        BOOT_JDK_FOUND=no
14848      else
14849        # Do we have a bin/javac?
14850        if test ! -x "$BOOT_JDK/bin/javac"; then
14851          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14852$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14853          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14854$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14855          BOOT_JDK_FOUND=no
14856        else
14857          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14858          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14859            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14860$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14861            BOOT_JDK_FOUND=no
14862          else
14863            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14864            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14865
14866            # Extra M4 quote needed to protect [] in grep expression.
14867            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14868            if test "x$FOUND_VERSION_78" = x; then
14869              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14870$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14871              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14872$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14873              BOOT_JDK_FOUND=no
14874            else
14875              # We're done! :-)
14876              BOOT_JDK_FOUND=yes
14877
14878  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14879
14880  # Input might be given as Windows format, start by converting to
14881  # unix format.
14882  path="$BOOT_JDK"
14883  new_path=`$CYGPATH -u "$path"`
14884
14885  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14886  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14887  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14888  # "foo.exe" is OK but "foo" is an error.
14889  #
14890  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14891  # It is also a way to make sure we got the proper file name for the real test later on.
14892  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14893  if test "x$test_shortpath" = x; then
14894    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14895$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14896    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14897  fi
14898
14899  # Call helper function which possibly converts this using DOS-style short mode.
14900  # If so, the updated path is stored in $new_path.
14901
14902  input_path="$new_path"
14903  # Check if we need to convert this using DOS-style short mode. If the path
14904  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14905  # take no chances and rewrite it.
14906  # Note: m4 eats our [], so we need to use [ and ] instead.
14907  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14908  if test "x$has_forbidden_chars" != x; then
14909    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14910    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14911    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14912    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14913      # Going to short mode and back again did indeed matter. Since short mode is
14914      # case insensitive, let's make it lowercase to improve readability.
14915      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14916      # Now convert it back to Unix-stile (cygpath)
14917      input_path=`$CYGPATH -u "$shortmode_path"`
14918      new_path="$input_path"
14919    fi
14920  fi
14921
14922  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14923  if test "x$test_cygdrive_prefix" = x; then
14924    # As a simple fix, exclude /usr/bin since it's not a real path.
14925    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14926      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14927      # a path prefixed by /cygdrive for fixpath to work.
14928      new_path="$CYGWIN_ROOT_PATH$input_path"
14929    fi
14930  fi
14931
14932
14933  if test "x$path" != "x$new_path"; then
14934    BOOT_JDK="$new_path"
14935    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14936$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14937  fi
14938
14939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14940
14941  path="$BOOT_JDK"
14942  has_colon=`$ECHO $path | $GREP ^.:`
14943  new_path="$path"
14944  if test "x$has_colon" = x; then
14945    # Not in mixed or Windows style, start by that.
14946    new_path=`cmd //c echo $path`
14947  fi
14948
14949
14950  input_path="$new_path"
14951  # Check if we need to convert this using DOS-style short mode. If the path
14952  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14953  # take no chances and rewrite it.
14954  # Note: m4 eats our [], so we need to use [ and ] instead.
14955  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14956  if test "x$has_forbidden_chars" != x; then
14957    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14958    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14959  fi
14960
14961
14962  windows_path="$new_path"
14963  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14964    unix_path=`$CYGPATH -u "$windows_path"`
14965    new_path="$unix_path"
14966  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14967    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14968    new_path="$unix_path"
14969  fi
14970
14971  if test "x$path" != "x$new_path"; then
14972    BOOT_JDK="$new_path"
14973    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14974$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14975  fi
14976
14977  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14978  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14979
14980  else
14981    # We're on a posix platform. Hooray! :)
14982    path="$BOOT_JDK"
14983    has_space=`$ECHO "$path" | $GREP " "`
14984    if test "x$has_space" != x; then
14985      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14986$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14987      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14988    fi
14989
14990    # Use eval to expand a potential ~
14991    eval path="$path"
14992    if test ! -f "$path" && test ! -d "$path"; then
14993      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14994    fi
14995
14996    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14997  fi
14998
14999              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15000$as_echo_n "checking for Boot JDK... " >&6; }
15001              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15002$as_echo "$BOOT_JDK" >&6; }
15003              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15004$as_echo_n "checking Boot JDK version... " >&6; }
15005              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15006              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15007$as_echo "$BOOT_JDK_VERSION" >&6; }
15008            fi # end check jdk version
15009          fi # end check rt.jar
15010        fi # end check javac
15011      fi # end check java
15012    fi # end check boot jdk found
15013  fi
15014
15015    done
15016  fi
15017
15018
15019    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15020    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15021      # Do we have a bin/java?
15022      if test ! -x "$BOOT_JDK/bin/java"; then
15023        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15024$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15025        BOOT_JDK_FOUND=no
15026      else
15027        # Do we have a bin/javac?
15028        if test ! -x "$BOOT_JDK/bin/javac"; then
15029          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15030$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15031          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15032$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15033          BOOT_JDK_FOUND=no
15034        else
15035          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15036          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15037            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15038$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15039            BOOT_JDK_FOUND=no
15040          else
15041            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15042            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15043
15044            # Extra M4 quote needed to protect [] in grep expression.
15045            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15046            if test "x$FOUND_VERSION_78" = x; then
15047              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15048$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15049              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15050$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15051              BOOT_JDK_FOUND=no
15052            else
15053              # We're done! :-)
15054              BOOT_JDK_FOUND=yes
15055
15056  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15057
15058  # Input might be given as Windows format, start by converting to
15059  # unix format.
15060  path="$BOOT_JDK"
15061  new_path=`$CYGPATH -u "$path"`
15062
15063  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15064  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15065  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15066  # "foo.exe" is OK but "foo" is an error.
15067  #
15068  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15069  # It is also a way to make sure we got the proper file name for the real test later on.
15070  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15071  if test "x$test_shortpath" = x; then
15072    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15073$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15074    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15075  fi
15076
15077  # Call helper function which possibly converts this using DOS-style short mode.
15078  # If so, the updated path is stored in $new_path.
15079
15080  input_path="$new_path"
15081  # Check if we need to convert this using DOS-style short mode. If the path
15082  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15083  # take no chances and rewrite it.
15084  # Note: m4 eats our [], so we need to use [ and ] instead.
15085  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15086  if test "x$has_forbidden_chars" != x; then
15087    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15088    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15089    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15090    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15091      # Going to short mode and back again did indeed matter. Since short mode is
15092      # case insensitive, let's make it lowercase to improve readability.
15093      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15094      # Now convert it back to Unix-stile (cygpath)
15095      input_path=`$CYGPATH -u "$shortmode_path"`
15096      new_path="$input_path"
15097    fi
15098  fi
15099
15100  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15101  if test "x$test_cygdrive_prefix" = x; then
15102    # As a simple fix, exclude /usr/bin since it's not a real path.
15103    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15104      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15105      # a path prefixed by /cygdrive for fixpath to work.
15106      new_path="$CYGWIN_ROOT_PATH$input_path"
15107    fi
15108  fi
15109
15110
15111  if test "x$path" != "x$new_path"; then
15112    BOOT_JDK="$new_path"
15113    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15114$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15115  fi
15116
15117  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15118
15119  path="$BOOT_JDK"
15120  has_colon=`$ECHO $path | $GREP ^.:`
15121  new_path="$path"
15122  if test "x$has_colon" = x; then
15123    # Not in mixed or Windows style, start by that.
15124    new_path=`cmd //c echo $path`
15125  fi
15126
15127
15128  input_path="$new_path"
15129  # Check if we need to convert this using DOS-style short mode. If the path
15130  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15131  # take no chances and rewrite it.
15132  # Note: m4 eats our [], so we need to use [ and ] instead.
15133  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15134  if test "x$has_forbidden_chars" != x; then
15135    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15136    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15137  fi
15138
15139
15140  windows_path="$new_path"
15141  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15142    unix_path=`$CYGPATH -u "$windows_path"`
15143    new_path="$unix_path"
15144  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15145    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15146    new_path="$unix_path"
15147  fi
15148
15149  if test "x$path" != "x$new_path"; then
15150    BOOT_JDK="$new_path"
15151    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15152$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15153  fi
15154
15155  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15156  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15157
15158  else
15159    # We're on a posix platform. Hooray! :)
15160    path="$BOOT_JDK"
15161    has_space=`$ECHO "$path" | $GREP " "`
15162    if test "x$has_space" != x; then
15163      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15164$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15165      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15166    fi
15167
15168    # Use eval to expand a potential ~
15169    eval path="$path"
15170    if test ! -f "$path" && test ! -d "$path"; then
15171      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15172    fi
15173
15174    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15175  fi
15176
15177              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15178$as_echo_n "checking for Boot JDK... " >&6; }
15179              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15180$as_echo "$BOOT_JDK" >&6; }
15181              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15182$as_echo_n "checking Boot JDK version... " >&6; }
15183              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15184              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15185$as_echo "$BOOT_JDK_VERSION" >&6; }
15186            fi # end check jdk version
15187          fi # end check rt.jar
15188        fi # end check javac
15189      fi # end check java
15190    fi # end check boot jdk found
15191  fi
15192
15193  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
15194
15195  if test "x$BOOT_JDK_FOUND" = xno; then
15196    # Now execute the test
15197
15198  BOOT_JDK_PREFIX="/usr/lib/jvm"
15199  BOOT_JDK_SUFFIX=""
15200  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
15201  if test "x$ALL_JDKS_FOUND" != x; then
15202    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
15203
15204  if test "x$BOOT_JDK_FOUND" = xno; then
15205    # Now execute the test
15206
15207        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
15208        if test -d "$BOOT_JDK"; then
15209          BOOT_JDK_FOUND=maybe
15210          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
15211$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
15212        fi
15213
15214
15215    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15216    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15217      # Do we have a bin/java?
15218      if test ! -x "$BOOT_JDK/bin/java"; then
15219        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15220$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15221        BOOT_JDK_FOUND=no
15222      else
15223        # Do we have a bin/javac?
15224        if test ! -x "$BOOT_JDK/bin/javac"; then
15225          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15226$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15227          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15228$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15229          BOOT_JDK_FOUND=no
15230        else
15231          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15232          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15233            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15234$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15235            BOOT_JDK_FOUND=no
15236          else
15237            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15238            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15239
15240            # Extra M4 quote needed to protect [] in grep expression.
15241            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15242            if test "x$FOUND_VERSION_78" = x; then
15243              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15244$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15245              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15246$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15247              BOOT_JDK_FOUND=no
15248            else
15249              # We're done! :-)
15250              BOOT_JDK_FOUND=yes
15251
15252  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15253
15254  # Input might be given as Windows format, start by converting to
15255  # unix format.
15256  path="$BOOT_JDK"
15257  new_path=`$CYGPATH -u "$path"`
15258
15259  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15260  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15261  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15262  # "foo.exe" is OK but "foo" is an error.
15263  #
15264  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15265  # It is also a way to make sure we got the proper file name for the real test later on.
15266  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15267  if test "x$test_shortpath" = x; then
15268    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15269$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15270    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15271  fi
15272
15273  # Call helper function which possibly converts this using DOS-style short mode.
15274  # If so, the updated path is stored in $new_path.
15275
15276  input_path="$new_path"
15277  # Check if we need to convert this using DOS-style short mode. If the path
15278  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15279  # take no chances and rewrite it.
15280  # Note: m4 eats our [], so we need to use [ and ] instead.
15281  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15282  if test "x$has_forbidden_chars" != x; then
15283    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15284    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15285    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15286    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15287      # Going to short mode and back again did indeed matter. Since short mode is
15288      # case insensitive, let's make it lowercase to improve readability.
15289      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15290      # Now convert it back to Unix-stile (cygpath)
15291      input_path=`$CYGPATH -u "$shortmode_path"`
15292      new_path="$input_path"
15293    fi
15294  fi
15295
15296  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15297  if test "x$test_cygdrive_prefix" = x; then
15298    # As a simple fix, exclude /usr/bin since it's not a real path.
15299    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15300      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15301      # a path prefixed by /cygdrive for fixpath to work.
15302      new_path="$CYGWIN_ROOT_PATH$input_path"
15303    fi
15304  fi
15305
15306
15307  if test "x$path" != "x$new_path"; then
15308    BOOT_JDK="$new_path"
15309    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15310$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15311  fi
15312
15313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15314
15315  path="$BOOT_JDK"
15316  has_colon=`$ECHO $path | $GREP ^.:`
15317  new_path="$path"
15318  if test "x$has_colon" = x; then
15319    # Not in mixed or Windows style, start by that.
15320    new_path=`cmd //c echo $path`
15321  fi
15322
15323
15324  input_path="$new_path"
15325  # Check if we need to convert this using DOS-style short mode. If the path
15326  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15327  # take no chances and rewrite it.
15328  # Note: m4 eats our [], so we need to use [ and ] instead.
15329  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15330  if test "x$has_forbidden_chars" != x; then
15331    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15332    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15333  fi
15334
15335
15336  windows_path="$new_path"
15337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15338    unix_path=`$CYGPATH -u "$windows_path"`
15339    new_path="$unix_path"
15340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15341    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15342    new_path="$unix_path"
15343  fi
15344
15345  if test "x$path" != "x$new_path"; then
15346    BOOT_JDK="$new_path"
15347    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15348$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15349  fi
15350
15351  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15352  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15353
15354  else
15355    # We're on a posix platform. Hooray! :)
15356    path="$BOOT_JDK"
15357    has_space=`$ECHO "$path" | $GREP " "`
15358    if test "x$has_space" != x; then
15359      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15360$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15361      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15362    fi
15363
15364    # Use eval to expand a potential ~
15365    eval path="$path"
15366    if test ! -f "$path" && test ! -d "$path"; then
15367      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15368    fi
15369
15370    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15371  fi
15372
15373              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15374$as_echo_n "checking for Boot JDK... " >&6; }
15375              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15376$as_echo "$BOOT_JDK" >&6; }
15377              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15378$as_echo_n "checking Boot JDK version... " >&6; }
15379              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15380              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15381$as_echo "$BOOT_JDK_VERSION" >&6; }
15382            fi # end check jdk version
15383          fi # end check rt.jar
15384        fi # end check javac
15385      fi # end check java
15386    fi # end check boot jdk found
15387  fi
15388
15389    done
15390  fi
15391
15392
15393    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15394    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15395      # Do we have a bin/java?
15396      if test ! -x "$BOOT_JDK/bin/java"; then
15397        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15398$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15399        BOOT_JDK_FOUND=no
15400      else
15401        # Do we have a bin/javac?
15402        if test ! -x "$BOOT_JDK/bin/javac"; then
15403          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15404$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15405          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15406$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15407          BOOT_JDK_FOUND=no
15408        else
15409          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15410          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15411            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15412$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15413            BOOT_JDK_FOUND=no
15414          else
15415            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15416            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15417
15418            # Extra M4 quote needed to protect [] in grep expression.
15419            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15420            if test "x$FOUND_VERSION_78" = x; then
15421              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15422$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15423              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15424$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15425              BOOT_JDK_FOUND=no
15426            else
15427              # We're done! :-)
15428              BOOT_JDK_FOUND=yes
15429
15430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15431
15432  # Input might be given as Windows format, start by converting to
15433  # unix format.
15434  path="$BOOT_JDK"
15435  new_path=`$CYGPATH -u "$path"`
15436
15437  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15438  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15439  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15440  # "foo.exe" is OK but "foo" is an error.
15441  #
15442  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15443  # It is also a way to make sure we got the proper file name for the real test later on.
15444  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15445  if test "x$test_shortpath" = x; then
15446    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15447$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15448    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15449  fi
15450
15451  # Call helper function which possibly converts this using DOS-style short mode.
15452  # If so, the updated path is stored in $new_path.
15453
15454  input_path="$new_path"
15455  # Check if we need to convert this using DOS-style short mode. If the path
15456  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15457  # take no chances and rewrite it.
15458  # Note: m4 eats our [], so we need to use [ and ] instead.
15459  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15460  if test "x$has_forbidden_chars" != x; then
15461    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15462    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15463    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15464    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15465      # Going to short mode and back again did indeed matter. Since short mode is
15466      # case insensitive, let's make it lowercase to improve readability.
15467      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15468      # Now convert it back to Unix-stile (cygpath)
15469      input_path=`$CYGPATH -u "$shortmode_path"`
15470      new_path="$input_path"
15471    fi
15472  fi
15473
15474  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15475  if test "x$test_cygdrive_prefix" = x; then
15476    # As a simple fix, exclude /usr/bin since it's not a real path.
15477    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15478      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15479      # a path prefixed by /cygdrive for fixpath to work.
15480      new_path="$CYGWIN_ROOT_PATH$input_path"
15481    fi
15482  fi
15483
15484
15485  if test "x$path" != "x$new_path"; then
15486    BOOT_JDK="$new_path"
15487    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15488$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15489  fi
15490
15491  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15492
15493  path="$BOOT_JDK"
15494  has_colon=`$ECHO $path | $GREP ^.:`
15495  new_path="$path"
15496  if test "x$has_colon" = x; then
15497    # Not in mixed or Windows style, start by that.
15498    new_path=`cmd //c echo $path`
15499  fi
15500
15501
15502  input_path="$new_path"
15503  # Check if we need to convert this using DOS-style short mode. If the path
15504  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15505  # take no chances and rewrite it.
15506  # Note: m4 eats our [], so we need to use [ and ] instead.
15507  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15508  if test "x$has_forbidden_chars" != x; then
15509    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15510    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15511  fi
15512
15513
15514  windows_path="$new_path"
15515  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15516    unix_path=`$CYGPATH -u "$windows_path"`
15517    new_path="$unix_path"
15518  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15519    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15520    new_path="$unix_path"
15521  fi
15522
15523  if test "x$path" != "x$new_path"; then
15524    BOOT_JDK="$new_path"
15525    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15526$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15527  fi
15528
15529  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15530  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15531
15532  else
15533    # We're on a posix platform. Hooray! :)
15534    path="$BOOT_JDK"
15535    has_space=`$ECHO "$path" | $GREP " "`
15536    if test "x$has_space" != x; then
15537      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15538$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15539      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15540    fi
15541
15542    # Use eval to expand a potential ~
15543    eval path="$path"
15544    if test ! -f "$path" && test ! -d "$path"; then
15545      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15546    fi
15547
15548    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15549  fi
15550
15551              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15552$as_echo_n "checking for Boot JDK... " >&6; }
15553              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15554$as_echo "$BOOT_JDK" >&6; }
15555              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15556$as_echo_n "checking Boot JDK version... " >&6; }
15557              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15558              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15559$as_echo "$BOOT_JDK_VERSION" >&6; }
15560            fi # end check jdk version
15561          fi # end check rt.jar
15562        fi # end check javac
15563      fi # end check java
15564    fi # end check boot jdk found
15565  fi
15566
15567  fi
15568
15569
15570    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15571    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15572      # Do we have a bin/java?
15573      if test ! -x "$BOOT_JDK/bin/java"; then
15574        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15575$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15576        BOOT_JDK_FOUND=no
15577      else
15578        # Do we have a bin/javac?
15579        if test ! -x "$BOOT_JDK/bin/javac"; then
15580          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15581$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15582          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15583$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15584          BOOT_JDK_FOUND=no
15585        else
15586          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15587          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15588            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15589$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15590            BOOT_JDK_FOUND=no
15591          else
15592            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15593            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15594
15595            # Extra M4 quote needed to protect [] in grep expression.
15596            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15597            if test "x$FOUND_VERSION_78" = x; then
15598              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15599$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15600              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15601$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15602              BOOT_JDK_FOUND=no
15603            else
15604              # We're done! :-)
15605              BOOT_JDK_FOUND=yes
15606
15607  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15608
15609  # Input might be given as Windows format, start by converting to
15610  # unix format.
15611  path="$BOOT_JDK"
15612  new_path=`$CYGPATH -u "$path"`
15613
15614  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15615  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15616  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15617  # "foo.exe" is OK but "foo" is an error.
15618  #
15619  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15620  # It is also a way to make sure we got the proper file name for the real test later on.
15621  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15622  if test "x$test_shortpath" = x; then
15623    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15624$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15625    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15626  fi
15627
15628  # Call helper function which possibly converts this using DOS-style short mode.
15629  # If so, the updated path is stored in $new_path.
15630
15631  input_path="$new_path"
15632  # Check if we need to convert this using DOS-style short mode. If the path
15633  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15634  # take no chances and rewrite it.
15635  # Note: m4 eats our [], so we need to use [ and ] instead.
15636  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15637  if test "x$has_forbidden_chars" != x; then
15638    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15639    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15640    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15641    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15642      # Going to short mode and back again did indeed matter. Since short mode is
15643      # case insensitive, let's make it lowercase to improve readability.
15644      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15645      # Now convert it back to Unix-stile (cygpath)
15646      input_path=`$CYGPATH -u "$shortmode_path"`
15647      new_path="$input_path"
15648    fi
15649  fi
15650
15651  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15652  if test "x$test_cygdrive_prefix" = x; then
15653    # As a simple fix, exclude /usr/bin since it's not a real path.
15654    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15655      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15656      # a path prefixed by /cygdrive for fixpath to work.
15657      new_path="$CYGWIN_ROOT_PATH$input_path"
15658    fi
15659  fi
15660
15661
15662  if test "x$path" != "x$new_path"; then
15663    BOOT_JDK="$new_path"
15664    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15665$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15666  fi
15667
15668  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15669
15670  path="$BOOT_JDK"
15671  has_colon=`$ECHO $path | $GREP ^.:`
15672  new_path="$path"
15673  if test "x$has_colon" = x; then
15674    # Not in mixed or Windows style, start by that.
15675    new_path=`cmd //c echo $path`
15676  fi
15677
15678
15679  input_path="$new_path"
15680  # Check if we need to convert this using DOS-style short mode. If the path
15681  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15682  # take no chances and rewrite it.
15683  # Note: m4 eats our [], so we need to use [ and ] instead.
15684  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15685  if test "x$has_forbidden_chars" != x; then
15686    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15687    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15688  fi
15689
15690
15691  windows_path="$new_path"
15692  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15693    unix_path=`$CYGPATH -u "$windows_path"`
15694    new_path="$unix_path"
15695  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15696    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15697    new_path="$unix_path"
15698  fi
15699
15700  if test "x$path" != "x$new_path"; then
15701    BOOT_JDK="$new_path"
15702    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15703$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15704  fi
15705
15706  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15707  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15708
15709  else
15710    # We're on a posix platform. Hooray! :)
15711    path="$BOOT_JDK"
15712    has_space=`$ECHO "$path" | $GREP " "`
15713    if test "x$has_space" != x; then
15714      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15715$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15716      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15717    fi
15718
15719    # Use eval to expand a potential ~
15720    eval path="$path"
15721    if test ! -f "$path" && test ! -d "$path"; then
15722      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15723    fi
15724
15725    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15726  fi
15727
15728              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15729$as_echo_n "checking for Boot JDK... " >&6; }
15730              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15731$as_echo "$BOOT_JDK" >&6; }
15732              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15733$as_echo_n "checking Boot JDK version... " >&6; }
15734              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15735              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15736$as_echo "$BOOT_JDK_VERSION" >&6; }
15737            fi # end check jdk version
15738          fi # end check rt.jar
15739        fi # end check javac
15740      fi # end check java
15741    fi # end check boot jdk found
15742  fi
15743
15744
15745# If we haven't found anything yet, we've truly lost. Give up.
15746if test "x$BOOT_JDK_FOUND" = xno; then
15747
15748    # Print a helpful message on how to acquire the necessary build dependency.
15749    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15750    MISSING_DEPENDENCY=openjdk
15751    PKGHANDLER_COMMAND=
15752
15753    case $PKGHANDLER in
15754	apt-get)
15755                apt_help     $MISSING_DEPENDENCY ;;
15756	yum)
15757                yum_help     $MISSING_DEPENDENCY ;;
15758	port)
15759                port_help    $MISSING_DEPENDENCY ;;
15760	pkgutil)
15761                pkgutil_help $MISSING_DEPENDENCY ;;
15762	pkgadd)
15763                pkgadd_help  $MISSING_DEPENDENCY ;;
15764    esac
15765
15766    if test "x$PKGHANDLER_COMMAND" != x; then
15767        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15768    fi
15769
15770  { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15771$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15772  { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15773$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15774  as_fn_error $? "Cannot continue" "$LINENO" 5
15775fi
15776
15777# Setup proper paths for what we found
15778BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15779if test ! -f "$BOOT_RTJAR"; then
15780    # On MacOSX it is called classes.jar
15781    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15782    if test -f "$BOOT_RTJAR"; then
15783      # Remove the ..
15784      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15785    fi
15786fi
15787BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15788BOOT_JDK="$BOOT_JDK"
15789
15790
15791
15792
15793# Setup tools from the Boot JDK.
15794
15795  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15796$as_echo_n "checking for java in Boot JDK... " >&6; }
15797  JAVA=$BOOT_JDK/bin/java
15798  if test ! -x $JAVA; then
15799      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15800$as_echo "not found" >&6; }
15801      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15802$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15803      as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15804  fi
15805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15806$as_echo "ok" >&6; }
15807
15808
15809  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15810$as_echo_n "checking for javac in Boot JDK... " >&6; }
15811  JAVAC=$BOOT_JDK/bin/javac
15812  if test ! -x $JAVAC; then
15813      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15814$as_echo "not found" >&6; }
15815      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15816$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15817      as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15818  fi
15819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15820$as_echo "ok" >&6; }
15821
15822
15823  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15824$as_echo_n "checking for javah in Boot JDK... " >&6; }
15825  JAVAH=$BOOT_JDK/bin/javah
15826  if test ! -x $JAVAH; then
15827      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15828$as_echo "not found" >&6; }
15829      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15830$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15831      as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15832  fi
15833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15834$as_echo "ok" >&6; }
15835
15836
15837  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15838$as_echo_n "checking for javap in Boot JDK... " >&6; }
15839  JAVAP=$BOOT_JDK/bin/javap
15840  if test ! -x $JAVAP; then
15841      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15842$as_echo "not found" >&6; }
15843      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15844$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15845      as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15846  fi
15847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15848$as_echo "ok" >&6; }
15849
15850
15851  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15852$as_echo_n "checking for jar in Boot JDK... " >&6; }
15853  JAR=$BOOT_JDK/bin/jar
15854  if test ! -x $JAR; then
15855      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15856$as_echo "not found" >&6; }
15857      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15858$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15859      as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15860  fi
15861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15862$as_echo "ok" >&6; }
15863
15864
15865  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15866$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15867  RMIC=$BOOT_JDK/bin/rmic
15868  if test ! -x $RMIC; then
15869      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15870$as_echo "not found" >&6; }
15871      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15872$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15873      as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15874  fi
15875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15876$as_echo "ok" >&6; }
15877
15878
15879  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15880$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15881  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15882  if test ! -x $NATIVE2ASCII; then
15883      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15884$as_echo "not found" >&6; }
15885      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15886$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15887      as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15888  fi
15889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15890$as_echo "ok" >&6; }
15891
15892
15893# Finally, set some other options...
15894
15895# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15896BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15897
15898
15899
15900
15901##############################################################################
15902#
15903# Specify options for anything that is run with the Boot JDK.
15904#
15905
15906# Check whether --with-boot-jdk-jvmargs was given.
15907if test "${with_boot_jdk_jvmargs+set}" = set; then :
15908  withval=$with_boot_jdk_jvmargs;
15909fi
15910
15911
15912if test "x$with_boot_jdk_jvmargs" = x; then
15913    # Not all JVM:s accept the same arguments on the command line.
15914    # OpenJDK specific increase in thread stack for JDK build,
15915    # well more specifically, when running javac.
15916    if test "x$BUILD_NUM_BITS" = x32; then
15917       STACK_SIZE=768
15918    else
15919       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15920       # since 64-bit pointers are pushed on the stach. Apparently, we need
15921       # to increase the stack space when javacing the JDK....
15922       STACK_SIZE=1536
15923    fi
15924
15925    # Minimum amount of heap memory.
15926
15927    $ECHO "Check if jvm arg is ok: -Xms64M" >&5
15928    $ECHO "Command: $JAVA -Xms64M -version" >&5
15929    OUTPUT=`$JAVA -Xms64M -version 2>&1`
15930    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15931    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15932    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15933        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15934	JVM_ARG_OK=true
15935    else
15936	$ECHO "Arg failed:" >&5
15937	$ECHO "$OUTPUT" >&5
15938	JVM_ARG_OK=false
15939    fi
15940
15941    if test "x$OPENJDK_TARGET_OS" = "xmacosx" || test "x$OPENJDK_TARGET_CPU" = "xppc64" ; then
15942        # Why does macosx need more heap? Its the huge JDK batch.
15943
15944    $ECHO "Check if jvm arg is ok: -Xmx1600M" >&5
15945    $ECHO "Command: $JAVA -Xmx1600M -version" >&5
15946    OUTPUT=`$JAVA -Xmx1600M -version 2>&1`
15947    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15948    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15949    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15950        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15951	JVM_ARG_OK=true
15952    else
15953	$ECHO "Arg failed:" >&5
15954	$ECHO "$OUTPUT" >&5
15955	JVM_ARG_OK=false
15956    fi
15957
15958    else
15959
15960    $ECHO "Check if jvm arg is ok: -Xmx1100M" >&5
15961    $ECHO "Command: $JAVA -Xmx1100M -version" >&5
15962    OUTPUT=`$JAVA -Xmx1100M -version 2>&1`
15963    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15964    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15965    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15966        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15967	JVM_ARG_OK=true
15968    else
15969	$ECHO "Arg failed:" >&5
15970	$ECHO "$OUTPUT" >&5
15971	JVM_ARG_OK=false
15972    fi
15973
15974    fi
15975    # When is adding -client something that speeds up the JVM?
15976    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15977
15978    $ECHO "Check if jvm arg is ok: -XX:PermSize=32m" >&5
15979    $ECHO "Command: $JAVA -XX:PermSize=32m -version" >&5
15980    OUTPUT=`$JAVA -XX:PermSize=32m -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 -XX:PermSize=32m"
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
15993    $ECHO "Check if jvm arg is ok: -XX:MaxPermSize=160m" >&5
15994    $ECHO "Command: $JAVA -XX:MaxPermSize=160m -version" >&5
15995    OUTPUT=`$JAVA -XX:MaxPermSize=160m -version 2>&1`
15996    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15997    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15998    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15999        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
16000	JVM_ARG_OK=true
16001    else
16002	$ECHO "Arg failed:" >&5
16003	$ECHO "$OUTPUT" >&5
16004	JVM_ARG_OK=false
16005    fi
16006
16007
16008    $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
16009    $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
16010    OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
16011    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16012    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16013    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16014        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
16015	JVM_ARG_OK=true
16016    else
16017	$ECHO "Arg failed:" >&5
16018	$ECHO "$OUTPUT" >&5
16019	JVM_ARG_OK=false
16020    fi
16021
16022    # Disable special log output when a debug build is used as Boot JDK...
16023
16024    $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
16025    $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
16026    OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
16027    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16028    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16029    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16030        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
16031	JVM_ARG_OK=true
16032    else
16033	$ECHO "Arg failed:" >&5
16034	$ECHO "$OUTPUT" >&5
16035	JVM_ARG_OK=false
16036    fi
16037
16038fi
16039
16040BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
16041
16042
16043
16044###############################################################################
16045#
16046# Configure the sources to use. We can add or override individual directories.
16047#
16048###############################################################################
16049
16050
16051
16052# Where are the sources. Any of these can be overridden
16053# using --with-override-corba and the likes.
16054LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
16055CORBA_TOPDIR="$SRC_ROOT/corba"
16056JAXP_TOPDIR="$SRC_ROOT/jaxp"
16057JAXWS_TOPDIR="$SRC_ROOT/jaxws"
16058HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
16059NASHORN_TOPDIR="$SRC_ROOT/nashorn"
16060JDK_TOPDIR="$SRC_ROOT/jdk"
16061
16062
16063
16064
16065
16066
16067
16068
16069
16070
16071###############################################################################
16072#
16073# Pickup additional source for a component from outside of the source root
16074# or override source for a component.
16075#
16076
16077# Check whether --with-add-source-root was given.
16078if test "${with_add_source_root+set}" = set; then :
16079  withval=$with_add_source_root;
16080fi
16081
16082
16083
16084# Check whether --with-override-source-root was given.
16085if test "${with_override_source_root+set}" = set; then :
16086  withval=$with_override_source_root;
16087fi
16088
16089
16090
16091# Check whether --with-adds-and-overrides was given.
16092if test "${with_adds_and_overrides+set}" = set; then :
16093  withval=$with_adds_and_overrides;
16094fi
16095
16096
16097if test "x$with_adds_and_overrides" != x; then
16098    with_add_source_root="$with_adds_and_overrides/adds"
16099    with_override_source_root="$with_adds_and_overrides/overrides"
16100fi
16101
16102if test "x$with_add_source_root" != x; then
16103    if ! test -d $with_add_source_root; then
16104       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
16105    fi
16106    CURDIR="$PWD"
16107    cd "$with_add_source_root"
16108    ADD_SRC_ROOT="`pwd`"
16109    cd "$CURDIR"
16110    # Verify that the addon source root does not have any root makefiles.
16111    # If it does, then it is usually an error, prevent this.
16112    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
16113       test -f $with_add_source_root/langtools/make/Makefile; then
16114        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
16115    fi
16116    if test -f $with_add_source_root/corba/makefiles/Makefile || \
16117       test -f $with_add_source_root/corba/make/Makefile; then
16118        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
16119    fi
16120    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
16121       test -f $with_add_source_root/jaxp/make/Makefile; then
16122        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
16123    fi
16124    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
16125       test -f $with_add_source_root/jaxws/make/Makefile; then
16126        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
16127    fi
16128    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
16129       test -f $with_add_source_root/hotspot/make/Makefile; then
16130        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
16131    fi
16132    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
16133       test -f $with_add_source_root/jdk/make/Makefile; then
16134        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
16135    fi
16136fi
16137
16138
16139if test "x$with_override_source_root" != x; then
16140    if ! test -d $with_override_source_root; then
16141       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
16142    fi
16143    CURDIR="$PWD"
16144    cd "$with_override_source_root"
16145    OVERRIDE_SRC_ROOT="`pwd`"
16146    cd "$CURDIR"
16147    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
16148       test -f $with_override_source_root/langtools/make/Makefile; then
16149        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
16150    fi
16151    if test -f $with_override_source_root/corba/makefiles/Makefile || \
16152       test -f $with_override_source_root/corba/make/Makefile; then
16153        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
16154    fi
16155    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
16156       test -f $with_override_source_root/jaxp/make/Makefile; then
16157        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
16158    fi
16159    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
16160       test -f $with_override_source_root/jaxws/make/Makefile; then
16161        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
16162    fi
16163    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
16164       test -f $with_override_source_root/hotspot/make/Makefile; then
16165        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
16166    fi
16167    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
16168       test -f $with_override_source_root/jdk/make/Makefile; then
16169        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
16170    fi
16171fi
16172
16173
16174###############################################################################
16175#
16176# Override a repo completely, this is used for example when you have 3 small
16177# development sandboxes of the langtools sources and want to avoid having 3 full
16178# OpenJDK sources checked out on disk.
16179#
16180# Assuming that the 3 langtools sandboxes are located here:
16181# /home/fredrik/sandbox1/langtools
16182# /home/fredrik/sandbox2/langtools
16183# /home/fredrik/sandbox3/langtools
16184#
16185# From the source root you create build subdirs manually:
16186#     mkdir -p build1 build2 build3
16187# in each build directory run:
16188#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
16189#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
16190#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
16191#
16192
16193
16194# Check whether --with-override-langtools was given.
16195if test "${with_override_langtools+set}" = set; then :
16196  withval=$with_override_langtools;
16197fi
16198
16199
16200
16201# Check whether --with-override-corba was given.
16202if test "${with_override_corba+set}" = set; then :
16203  withval=$with_override_corba;
16204fi
16205
16206
16207
16208# Check whether --with-override-jaxp was given.
16209if test "${with_override_jaxp+set}" = set; then :
16210  withval=$with_override_jaxp;
16211fi
16212
16213
16214
16215# Check whether --with-override-jaxws was given.
16216if test "${with_override_jaxws+set}" = set; then :
16217  withval=$with_override_jaxws;
16218fi
16219
16220
16221
16222# Check whether --with-override-hotspot was given.
16223if test "${with_override_hotspot+set}" = set; then :
16224  withval=$with_override_hotspot;
16225fi
16226
16227
16228
16229# Check whether --with-override-jdk was given.
16230if test "${with_override_jdk+set}" = set; then :
16231  withval=$with_override_jdk;
16232fi
16233
16234
16235if test "x$with_override_langtools" != x; then
16236    CURDIR="$PWD"
16237    cd "$with_override_langtools"
16238    LANGTOOLS_TOPDIR="`pwd`"
16239    cd "$CURDIR"
16240    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
16241        as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
16242    fi
16243    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
16244$as_echo_n "checking if langtools should be overridden... " >&6; }
16245    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
16246$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
16247fi
16248if test "x$with_override_corba" != x; then
16249    CURDIR="$PWD"
16250    cd "$with_override_corba"
16251    CORBA_TOPDIR="`pwd`"
16252    cd "$CURDIR"
16253    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
16254        as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
16255    fi
16256    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
16257$as_echo_n "checking if corba should be overridden... " >&6; }
16258    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
16259$as_echo "yes with $CORBA_TOPDIR" >&6; }
16260fi
16261if test "x$with_override_jaxp" != x; then
16262    CURDIR="$PWD"
16263    cd "$with_override_jaxp"
16264    JAXP_TOPDIR="`pwd`"
16265    cd "$CURDIR"
16266    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
16267        as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
16268    fi
16269    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
16270$as_echo_n "checking if jaxp should be overridden... " >&6; }
16271    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
16272$as_echo "yes with $JAXP_TOPDIR" >&6; }
16273fi
16274if test "x$with_override_jaxws" != x; then
16275    CURDIR="$PWD"
16276    cd "$with_override_jaxws"
16277    JAXWS_TOPDIR="`pwd`"
16278    cd "$CURDIR"
16279    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
16280        as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
16281    fi
16282    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
16283$as_echo_n "checking if jaxws should be overridden... " >&6; }
16284    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
16285$as_echo "yes with $JAXWS_TOPDIR" >&6; }
16286fi
16287if test "x$with_override_hotspot" != x; then
16288    CURDIR="$PWD"
16289    cd "$with_override_hotspot"
16290    HOTSPOT_TOPDIR="`pwd`"
16291    cd "$CURDIR"
16292    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
16293       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
16294        as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
16295    fi
16296    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
16297$as_echo_n "checking if hotspot should be overridden... " >&6; }
16298    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
16299$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
16300fi
16301if test "x$with_override_nashorn" != x; then
16302    CURDIR="$PWD"
16303    cd "$with_override_nashorn"
16304    NASHORN_TOPDIR="`pwd`"
16305    cd "$CURDIR"
16306    if ! test -f $NASHORN_TOPDIR/makefiles/BuildNashorn.gmk; then
16307        as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
16308    fi
16309    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
16310$as_echo_n "checking if nashorn should be overridden... " >&6; }
16311    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
16312$as_echo "yes with $NASHORN_TOPDIR" >&6; }
16313fi
16314if test "x$with_override_jdk" != x; then
16315    CURDIR="$PWD"
16316    cd "$with_override_jdk"
16317    JDK_TOPDIR="`pwd`"
16318    cd "$CURDIR"
16319    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
16320        as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
16321    fi
16322    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
16323$as_echo_n "checking if JDK should be overridden... " >&6; }
16324    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
16325$as_echo "yes with $JDK_TOPDIR" >&6; }
16326fi
16327
16328
16329
16330BUILD_OUTPUT="$OUTPUT_ROOT"
16331
16332
16333HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
16334BUILD_HOTSPOT=true
16335
16336
16337
16338# Check whether --with-import-hotspot was given.
16339if test "${with_import_hotspot+set}" = set; then :
16340  withval=$with_import_hotspot;
16341fi
16342
16343if test "x$with_import_hotspot" != x; then
16344    CURDIR="$PWD"
16345    cd "$with_import_hotspot"
16346    HOTSPOT_DIST="`pwd`"
16347    cd "$CURDIR"
16348    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
16349        as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
16350    fi
16351    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
16352$as_echo_n "checking if hotspot should be imported... " >&6; }
16353    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
16354$as_echo "yes from $HOTSPOT_DIST" >&6; }
16355    BUILD_HOTSPOT=false
16356fi
16357
16358JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
16359
16360
16361###############################################################################
16362#
16363# Setup the toolchain (compilers etc), i.e. the tools that need to be
16364# cross-compilation aware.
16365#
16366###############################################################################
16367
16368
16369###############################################################################
16370#
16371# Configure the development tool paths and potential sysroot.
16372#
16373ac_ext=cpp
16374ac_cpp='$CXXCPP $CPPFLAGS'
16375ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16376ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16377ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16378
16379
16380# The option used to specify the target .o,.a or .so file.
16381# When compiling, how to specify the to be created object file.
16382CC_OUT_OPTION='-o$(SPACE)'
16383# When linking, how to specify the to be created executable.
16384EXE_OUT_OPTION='-o$(SPACE)'
16385# When linking, how to specify the to be created dynamically linkable library.
16386LD_OUT_OPTION='-o$(SPACE)'
16387# When archiving, how to specify the to be create static archive for object files.
16388AR_OUT_OPTION='rcs$(SPACE)'
16389
16390
16391
16392
16393
16394# Locate the actual tools
16395
16396
16397# Check whether --with-jtreg was given.
16398if test "${with_jtreg+set}" = set; then :
16399  withval=$with_jtreg;
16400else
16401  with_jtreg=no
16402fi
16403
16404
16405  if test "x$with_jtreg" = xno; then
16406    # jtreg disabled
16407    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16408$as_echo_n "checking for jtreg... " >&6; }
16409    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16410$as_echo "no" >&6; }
16411  else
16412    if test "x$with_jtreg" != xyes; then
16413      # with path specified.
16414      JT_HOME="$with_jtreg"
16415    fi
16416
16417    if test "x$JT_HOME" != x; then
16418      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16419$as_echo_n "checking for jtreg... " >&6; }
16420
16421      # use JT_HOME enviroment var.
16422
16423  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16424
16425  # Input might be given as Windows format, start by converting to
16426  # unix format.
16427  path="$JT_HOME"
16428  new_path=`$CYGPATH -u "$path"`
16429
16430  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16431  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16432  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16433  # "foo.exe" is OK but "foo" is an error.
16434  #
16435  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16436  # It is also a way to make sure we got the proper file name for the real test later on.
16437  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16438  if test "x$test_shortpath" = x; then
16439    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16440$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16441    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
16442  fi
16443
16444  # Call helper function which possibly converts this using DOS-style short mode.
16445  # If so, the updated path is stored in $new_path.
16446
16447  input_path="$new_path"
16448  # Check if we need to convert this using DOS-style short mode. If the path
16449  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16450  # take no chances and rewrite it.
16451  # Note: m4 eats our [], so we need to use [ and ] instead.
16452  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16453  if test "x$has_forbidden_chars" != x; then
16454    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16455    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16456    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16457    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16458      # Going to short mode and back again did indeed matter. Since short mode is
16459      # case insensitive, let's make it lowercase to improve readability.
16460      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16461      # Now convert it back to Unix-stile (cygpath)
16462      input_path=`$CYGPATH -u "$shortmode_path"`
16463      new_path="$input_path"
16464    fi
16465  fi
16466
16467  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16468  if test "x$test_cygdrive_prefix" = x; then
16469    # As a simple fix, exclude /usr/bin since it's not a real path.
16470    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16471      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16472      # a path prefixed by /cygdrive for fixpath to work.
16473      new_path="$CYGWIN_ROOT_PATH$input_path"
16474    fi
16475  fi
16476
16477
16478  if test "x$path" != "x$new_path"; then
16479    JT_HOME="$new_path"
16480    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16481$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16482  fi
16483
16484  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16485
16486  path="$JT_HOME"
16487  has_colon=`$ECHO $path | $GREP ^.:`
16488  new_path="$path"
16489  if test "x$has_colon" = x; then
16490    # Not in mixed or Windows style, start by that.
16491    new_path=`cmd //c echo $path`
16492  fi
16493
16494
16495  input_path="$new_path"
16496  # Check if we need to convert this using DOS-style short mode. If the path
16497  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16498  # take no chances and rewrite it.
16499  # Note: m4 eats our [], so we need to use [ and ] instead.
16500  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16501  if test "x$has_forbidden_chars" != x; then
16502    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16503    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16504  fi
16505
16506
16507  windows_path="$new_path"
16508  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16509    unix_path=`$CYGPATH -u "$windows_path"`
16510    new_path="$unix_path"
16511  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16512    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16513    new_path="$unix_path"
16514  fi
16515
16516  if test "x$path" != "x$new_path"; then
16517    JT_HOME="$new_path"
16518    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16519$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16520  fi
16521
16522  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16523  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16524
16525  else
16526    # We're on a posix platform. Hooray! :)
16527    path="$JT_HOME"
16528    has_space=`$ECHO "$path" | $GREP " "`
16529    if test "x$has_space" != x; then
16530      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16531$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16532      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16533    fi
16534
16535    # Use eval to expand a potential ~
16536    eval path="$path"
16537    if test ! -f "$path" && test ! -d "$path"; then
16538      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
16539    fi
16540
16541    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
16542  fi
16543
16544
16545      # jtreg win32 script works for everybody
16546      JTREGEXE="$JT_HOME/win32/bin/jtreg"
16547
16548      if test ! -f "$JTREGEXE"; then
16549        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
16550      fi
16551
16552      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16553$as_echo "$JTREGEXE" >&6; }
16554    else
16555      # try to find jtreg on path
16556
16557    for ac_prog in jtreg
16558do
16559  # Extract the first word of "$ac_prog", so it can be a program name with args.
16560set dummy $ac_prog; ac_word=$2
16561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16562$as_echo_n "checking for $ac_word... " >&6; }
16563if ${ac_cv_path_JTREGEXE+:} false; then :
16564  $as_echo_n "(cached) " >&6
16565else
16566  case $JTREGEXE in
16567  [\\/]* | ?:[\\/]*)
16568  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
16569  ;;
16570  *)
16571  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16572for as_dir in $PATH
16573do
16574  IFS=$as_save_IFS
16575  test -z "$as_dir" && as_dir=.
16576    for ac_exec_ext in '' $ac_executable_extensions; do
16577  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16578    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
16579    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16580    break 2
16581  fi
16582done
16583  done
16584IFS=$as_save_IFS
16585
16586  ;;
16587esac
16588fi
16589JTREGEXE=$ac_cv_path_JTREGEXE
16590if test -n "$JTREGEXE"; then
16591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16592$as_echo "$JTREGEXE" >&6; }
16593else
16594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16595$as_echo "no" >&6; }
16596fi
16597
16598
16599  test -n "$JTREGEXE" && break
16600done
16601
16602
16603    if test "x$JTREGEXE" = x; then
16604        if test "xjtreg" = x; then
16605          PROG_NAME=jtregexe
16606        else
16607          PROG_NAME=jtreg
16608        fi
16609        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
16610$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
16611        as_fn_error $? "Cannot continue" "$LINENO" 5
16612    fi
16613
16614
16615      JT_HOME="`$DIRNAME $JTREGEXE`"
16616    fi
16617  fi
16618
16619
16620
16621
16622
16623if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16624
16625  # Store path to cygwin link.exe to help excluding it when searching for
16626  # VS linker. This must be done before changing the PATH when looking for VS.
16627  # Extract the first word of "link", so it can be a program name with args.
16628set dummy link; ac_word=$2
16629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16630$as_echo_n "checking for $ac_word... " >&6; }
16631if ${ac_cv_path_CYGWIN_LINK+:} false; then :
16632  $as_echo_n "(cached) " >&6
16633else
16634  case $CYGWIN_LINK in
16635  [\\/]* | ?:[\\/]*)
16636  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16637  ;;
16638  *)
16639  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16640for as_dir in $PATH
16641do
16642  IFS=$as_save_IFS
16643  test -z "$as_dir" && as_dir=.
16644    for ac_exec_ext in '' $ac_executable_extensions; do
16645  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16646    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16647    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16648    break 2
16649  fi
16650done
16651  done
16652IFS=$as_save_IFS
16653
16654  ;;
16655esac
16656fi
16657CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16658if test -n "$CYGWIN_LINK"; then
16659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16660$as_echo "$CYGWIN_LINK" >&6; }
16661else
16662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16663$as_echo "no" >&6; }
16664fi
16665
16666
16667  if test "x$CYGWIN_LINK" != x; then
16668    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16669$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16670    "$CYGWIN_LINK" --version > /dev/null
16671    if test $? -eq 0 ; then
16672      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16673$as_echo "yes" >&6; }
16674    else
16675      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16676$as_echo "no" >&6; }
16677      # This might be the VS linker. Don't exclude it later on.
16678      CYGWIN_LINK=""
16679    fi
16680  fi
16681
16682  # First-hand choice is to locate and run the vsvars bat file.
16683
16684  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16685    VCVARSFILE="vc/bin/vcvars32.bat"
16686  else
16687    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16688  fi
16689
16690  VS_ENV_CMD=""
16691  VS_ENV_ARGS=""
16692  if test "x$with_toolsdir" != x; then
16693
16694  if test "x$VS_ENV_CMD" = x; then
16695    VS100BASE="$with_toolsdir/../.."
16696    METHOD="--with-tools-dir"
16697
16698  windows_path="$VS100BASE"
16699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16700    unix_path=`$CYGPATH -u "$windows_path"`
16701    VS100BASE="$unix_path"
16702  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16703    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16704    VS100BASE="$unix_path"
16705  fi
16706
16707    if test -d "$VS100BASE"; then
16708      if test -f "$VS100BASE/$VCVARSFILE"; then
16709        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16710$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16711        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16712      else
16713        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16714$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16715        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16716$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16717      fi
16718    fi
16719  fi
16720
16721  fi
16722
16723  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16724    # Having specified an argument which is incorrect will produce an instant failure;
16725    # we should not go on looking
16726    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16727$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16728    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16729$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16730    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16731  fi
16732
16733  if test "x$VS100COMNTOOLS" != x; then
16734
16735  if test "x$VS_ENV_CMD" = x; then
16736    VS100BASE="$VS100COMNTOOLS/../.."
16737    METHOD="VS100COMNTOOLS variable"
16738
16739  windows_path="$VS100BASE"
16740  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16741    unix_path=`$CYGPATH -u "$windows_path"`
16742    VS100BASE="$unix_path"
16743  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16744    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16745    VS100BASE="$unix_path"
16746  fi
16747
16748    if test -d "$VS100BASE"; then
16749      if test -f "$VS100BASE/$VCVARSFILE"; then
16750        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16751$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16752        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16753      else
16754        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16755$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16756        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16757$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16758      fi
16759    fi
16760  fi
16761
16762  fi
16763  if test "x$PROGRAMFILES" != x; then
16764
16765  if test "x$VS_ENV_CMD" = x; then
16766    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16767    METHOD="well-known name"
16768
16769  windows_path="$VS100BASE"
16770  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16771    unix_path=`$CYGPATH -u "$windows_path"`
16772    VS100BASE="$unix_path"
16773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16774    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16775    VS100BASE="$unix_path"
16776  fi
16777
16778    if test -d "$VS100BASE"; then
16779      if test -f "$VS100BASE/$VCVARSFILE"; then
16780        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16781$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16782        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16783      else
16784        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16785$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16786        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16787$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16788      fi
16789    fi
16790  fi
16791
16792  fi
16793
16794  if test "x$VS_ENV_CMD" = x; then
16795    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16796    METHOD="well-known name"
16797
16798  windows_path="$VS100BASE"
16799  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16800    unix_path=`$CYGPATH -u "$windows_path"`
16801    VS100BASE="$unix_path"
16802  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16803    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16804    VS100BASE="$unix_path"
16805  fi
16806
16807    if test -d "$VS100BASE"; then
16808      if test -f "$VS100BASE/$VCVARSFILE"; then
16809        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16810$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16811        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16812      else
16813        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16814$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16815        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16816$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16817      fi
16818    fi
16819  fi
16820
16821
16822  if test "x$VS_ENV_CMD" = x; then
16823    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16824    METHOD="well-known name"
16825
16826  windows_path="$VS100BASE"
16827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16828    unix_path=`$CYGPATH -u "$windows_path"`
16829    VS100BASE="$unix_path"
16830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16831    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16832    VS100BASE="$unix_path"
16833  fi
16834
16835    if test -d "$VS100BASE"; then
16836      if test -f "$VS100BASE/$VCVARSFILE"; then
16837        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16838$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16839        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16840      else
16841        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16842$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16843        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16844$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16845      fi
16846    fi
16847  fi
16848
16849
16850  if test "x$ProgramW6432" != x; then
16851
16852  if test "x$VS_ENV_CMD" = x; then
16853    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16854    METHOD="well-known name"
16855
16856  windows_path="$WIN_SDK_BASE"
16857  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16858    unix_path=`$CYGPATH -u "$windows_path"`
16859    WIN_SDK_BASE="$unix_path"
16860  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16861    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16862    WIN_SDK_BASE="$unix_path"
16863  fi
16864
16865    if test -d "$WIN_SDK_BASE"; then
16866      # There have been cases of partial or broken SDK installations. A missing
16867      # lib dir is not going to work.
16868      if test ! -d "$WIN_SDK_BASE/../lib"; then
16869        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16870$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16871        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16872$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16873      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16874        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16875$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16876        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16877        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16878          VS_ENV_ARGS="/x86"
16879        else
16880          VS_ENV_ARGS="/x64"
16881        fi
16882      else
16883        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16884$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16885        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16886$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16887      fi
16888    fi
16889  fi
16890
16891  fi
16892  if test "x$PROGRAMW6432" != x; then
16893
16894  if test "x$VS_ENV_CMD" = x; then
16895    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16896    METHOD="well-known name"
16897
16898  windows_path="$WIN_SDK_BASE"
16899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16900    unix_path=`$CYGPATH -u "$windows_path"`
16901    WIN_SDK_BASE="$unix_path"
16902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16903    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16904    WIN_SDK_BASE="$unix_path"
16905  fi
16906
16907    if test -d "$WIN_SDK_BASE"; then
16908      # There have been cases of partial or broken SDK installations. A missing
16909      # lib dir is not going to work.
16910      if test ! -d "$WIN_SDK_BASE/../lib"; then
16911        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16912$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16913        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16914$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16915      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16916        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16917$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16918        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16919        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16920          VS_ENV_ARGS="/x86"
16921        else
16922          VS_ENV_ARGS="/x64"
16923        fi
16924      else
16925        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16926$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16927        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16928$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16929      fi
16930    fi
16931  fi
16932
16933  fi
16934  if test "x$PROGRAMFILES" != x; then
16935
16936  if test "x$VS_ENV_CMD" = x; then
16937    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16938    METHOD="well-known name"
16939
16940  windows_path="$WIN_SDK_BASE"
16941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16942    unix_path=`$CYGPATH -u "$windows_path"`
16943    WIN_SDK_BASE="$unix_path"
16944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16946    WIN_SDK_BASE="$unix_path"
16947  fi
16948
16949    if test -d "$WIN_SDK_BASE"; then
16950      # There have been cases of partial or broken SDK installations. A missing
16951      # lib dir is not going to work.
16952      if test ! -d "$WIN_SDK_BASE/../lib"; then
16953        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16954$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16955        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16956$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16957      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16958        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16959$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16960        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16961        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16962          VS_ENV_ARGS="/x86"
16963        else
16964          VS_ENV_ARGS="/x64"
16965        fi
16966      else
16967        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16968$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16969        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16970$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16971      fi
16972    fi
16973  fi
16974
16975  fi
16976
16977  if test "x$VS_ENV_CMD" = x; then
16978    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
16979    METHOD="well-known name"
16980
16981  windows_path="$WIN_SDK_BASE"
16982  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16983    unix_path=`$CYGPATH -u "$windows_path"`
16984    WIN_SDK_BASE="$unix_path"
16985  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16986    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16987    WIN_SDK_BASE="$unix_path"
16988  fi
16989
16990    if test -d "$WIN_SDK_BASE"; then
16991      # There have been cases of partial or broken SDK installations. A missing
16992      # lib dir is not going to work.
16993      if test ! -d "$WIN_SDK_BASE/../lib"; then
16994        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16995$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16996        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16997$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16998      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16999        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17000$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17001        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17002        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17003          VS_ENV_ARGS="/x86"
17004        else
17005          VS_ENV_ARGS="/x64"
17006        fi
17007      else
17008        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17009$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17010        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17011$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17012      fi
17013    fi
17014  fi
17015
17016
17017  if test "x$VS_ENV_CMD" = x; then
17018    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
17019    METHOD="well-known name"
17020
17021  windows_path="$WIN_SDK_BASE"
17022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17023    unix_path=`$CYGPATH -u "$windows_path"`
17024    WIN_SDK_BASE="$unix_path"
17025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17026    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17027    WIN_SDK_BASE="$unix_path"
17028  fi
17029
17030    if test -d "$WIN_SDK_BASE"; then
17031      # There have been cases of partial or broken SDK installations. A missing
17032      # lib dir is not going to work.
17033      if test ! -d "$WIN_SDK_BASE/../lib"; then
17034        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17035$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17036        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17037$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17038      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17039        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17040$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17041        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17042        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17043          VS_ENV_ARGS="/x86"
17044        else
17045          VS_ENV_ARGS="/x64"
17046        fi
17047      else
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        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17051$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17052      fi
17053    fi
17054  fi
17055
17056
17057  if test "x$VS_ENV_CMD" != x; then
17058    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
17059
17060  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17061
17062  # First separate the path from the arguments. This will split at the first
17063  # space.
17064  complete="$VS_ENV_CMD"
17065  path="${complete%% *}"
17066  tmp="$complete EOL"
17067  arguments="${tmp#* }"
17068
17069  # Input might be given as Windows format, start by converting to
17070  # unix format.
17071  new_path=`$CYGPATH -u "$path"`
17072
17073  # Now try to locate executable using which
17074  new_path=`$WHICH "$new_path" 2> /dev/null`
17075  # bat and cmd files are not always considered executable in cygwin causing which
17076  # to not find them
17077  if test "x$new_path" = x \
17078           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17079           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17080    new_path=`$CYGPATH -u "$path"`
17081  fi
17082  if test "x$new_path" = x; then
17083    # Oops. Which didn't find the executable.
17084    # The splitting of arguments from the executable at a space might have been incorrect,
17085    # since paths with space are more likely in Windows. Give it another try with the whole
17086    # argument.
17087    path="$complete"
17088    arguments="EOL"
17089    new_path=`$CYGPATH -u "$path"`
17090    new_path=`$WHICH "$new_path" 2> /dev/null`
17091    # bat and cmd files are not always considered executable in cygwin causing which
17092    # to not find them
17093    if test "x$new_path" = x \
17094             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17095             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17096      new_path=`$CYGPATH -u "$path"`
17097    fi
17098    if test "x$new_path" = x; then
17099      # It's still not found. Now this is an unrecoverable error.
17100      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17101$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17102      has_space=`$ECHO "$complete" | $GREP " "`
17103      if test "x$has_space" != x; then
17104        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17105$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17106      fi
17107      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17108    fi
17109  fi
17110
17111  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17112  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17113  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17114  # "foo.exe" is OK but "foo" is an error.
17115  #
17116  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17117  # It is also a way to make sure we got the proper file name for the real test later on.
17118  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17119  if test "x$test_shortpath" = x; then
17120    # Short path failed, file does not exist as specified.
17121    # Try adding .exe or .cmd
17122    if test -f "${new_path}.exe"; then
17123       input_to_shortpath="${new_path}.exe"
17124    elif test -f "${new_path}.cmd"; then
17125       input_to_shortpath="${new_path}.cmd"
17126    else
17127      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
17128$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
17129      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17130$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17131      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17132    fi
17133  else
17134    input_to_shortpath="$new_path"
17135  fi
17136
17137  # Call helper function which possibly converts this using DOS-style short mode.
17138  # If so, the updated path is stored in $new_path.
17139  new_path="$input_to_shortpath"
17140
17141  input_path="$input_to_shortpath"
17142  # Check if we need to convert this using DOS-style short mode. If the path
17143  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17144  # take no chances and rewrite it.
17145  # Note: m4 eats our [], so we need to use [ and ] instead.
17146  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17147  if test "x$has_forbidden_chars" != x; then
17148    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17149    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17150    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17151    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17152      # Going to short mode and back again did indeed matter. Since short mode is
17153      # case insensitive, let's make it lowercase to improve readability.
17154      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17155      # Now convert it back to Unix-stile (cygpath)
17156      input_path=`$CYGPATH -u "$shortmode_path"`
17157      new_path="$input_path"
17158    fi
17159  fi
17160
17161  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17162  if test "x$test_cygdrive_prefix" = x; then
17163    # As a simple fix, exclude /usr/bin since it's not a real path.
17164    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17165      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17166      # a path prefixed by /cygdrive for fixpath to work.
17167      new_path="$CYGWIN_ROOT_PATH$input_path"
17168    fi
17169  fi
17170
17171  # remove trailing .exe if any
17172  new_path="${new_path/%.exe/}"
17173
17174  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17175
17176  # First separate the path from the arguments. This will split at the first
17177  # space.
17178  complete="$VS_ENV_CMD"
17179  path="${complete%% *}"
17180  tmp="$complete EOL"
17181  arguments="${tmp#* }"
17182
17183  # Input might be given as Windows format, start by converting to
17184  # unix format.
17185  new_path="$path"
17186
17187  windows_path="$new_path"
17188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17189    unix_path=`$CYGPATH -u "$windows_path"`
17190    new_path="$unix_path"
17191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17192    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17193    new_path="$unix_path"
17194  fi
17195
17196
17197  # Now try to locate executable using which
17198  new_path=`$WHICH "$new_path" 2> /dev/null`
17199
17200  if test "x$new_path" = x; then
17201    # Oops. Which didn't find the executable.
17202    # The splitting of arguments from the executable at a space might have been incorrect,
17203    # since paths with space are more likely in Windows. Give it another try with the whole
17204    # argument.
17205    path="$complete"
17206    arguments="EOL"
17207    new_path="$path"
17208
17209  windows_path="$new_path"
17210  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17211    unix_path=`$CYGPATH -u "$windows_path"`
17212    new_path="$unix_path"
17213  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17214    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17215    new_path="$unix_path"
17216  fi
17217
17218
17219    new_path=`$WHICH "$new_path" 2> /dev/null`
17220
17221    if test "x$new_path" = x; then
17222      # It's still not found. Now this is an unrecoverable error.
17223      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17224$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17225      has_space=`$ECHO "$complete" | $GREP " "`
17226      if test "x$has_space" != x; then
17227        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17228$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17229      fi
17230      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17231    fi
17232  fi
17233
17234  # Now new_path has a complete unix path to the binary
17235  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17236    # Keep paths in /bin as-is, but remove trailing .exe if any
17237    new_path="${new_path/%.exe/}"
17238    # Do not save /bin paths to all_fixpath_prefixes!
17239  else
17240    # Not in mixed or Windows style, start by that.
17241    new_path=`cmd //c echo $new_path`
17242
17243  input_path="$new_path"
17244  # Check if we need to convert this using DOS-style short mode. If the path
17245  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17246  # take no chances and rewrite it.
17247  # Note: m4 eats our [], so we need to use [ and ] instead.
17248  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17249  if test "x$has_forbidden_chars" != x; then
17250    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17251    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17252  fi
17253
17254    # Output is in $new_path
17255
17256  windows_path="$new_path"
17257  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17258    unix_path=`$CYGPATH -u "$windows_path"`
17259    new_path="$unix_path"
17260  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17261    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17262    new_path="$unix_path"
17263  fi
17264
17265    # remove trailing .exe if any
17266    new_path="${new_path/%.exe/}"
17267
17268    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17269    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17270  fi
17271
17272  else
17273    # We're on a posix platform. Hooray! :)
17274    # First separate the path from the arguments. This will split at the first
17275    # space.
17276    complete="$VS_ENV_CMD"
17277    path="${complete%% *}"
17278    tmp="$complete EOL"
17279    arguments="${tmp#* }"
17280
17281    # Cannot rely on the command "which" here since it doesn't always work.
17282    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17283    if test -z "$is_absolute_path"; then
17284      # Path to executable is not absolute. Find it.
17285      IFS_save="$IFS"
17286      IFS=:
17287      for p in $PATH; do
17288        if test -f "$p/$path" && test -x "$p/$path"; then
17289          new_path="$p/$path"
17290          break
17291        fi
17292      done
17293      IFS="$IFS_save"
17294    else
17295      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
17296$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
17297      new_path="$path"
17298    fi
17299
17300    if test "x$new_path" = x; then
17301        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17302$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17303        has_space=`$ECHO "$complete" | $GREP " "`
17304        if test "x$has_space" != x; then
17305          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17306$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17307        fi
17308        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17309      fi
17310  fi
17311
17312      # Now join together the path and the arguments once again
17313      if test "x$arguments" != xEOL; then
17314        new_complete="$new_path ${arguments% *}"
17315      else
17316        new_complete="$new_path"
17317      fi
17318
17319  if test "x$complete" != "x$new_complete"; then
17320      VS_ENV_CMD="$new_complete"
17321      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
17322$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
17323    fi
17324
17325
17326    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
17327    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
17328$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
17329    cd $OUTPUT_ROOT
17330    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
17331    # to autoconf standards.
17332
17333    #----
17334
17335    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
17336    # but calculate the difference in Cygwin environment before/after running it and then
17337    # apply the diff.
17338
17339    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
17340      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
17341      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
17342      _dosbash=`cygpath -a -w -s \`which bash\`.*`
17343    else
17344      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
17345      _dosbash=`cmd //c echo \`which bash\``
17346    fi
17347
17348    # generate the set of exported vars before/after the vs10 setup
17349    $ECHO "@echo off"                                           >  localdevenvtmp.bat
17350    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
17351    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
17352    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
17353
17354    # Now execute the newly created bat file.
17355    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
17356    cmd /c localdevenvtmp.bat | cat
17357
17358    # apply the diff (less some non-vs10 vars named by "!")
17359    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
17360    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
17361    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
17362
17363    # cleanup
17364    $RM localdevenvtmp*
17365    #----
17366    cd $CURDIR
17367    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
17368      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17369$as_echo "no" >&6; }
17370      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
17371$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
17372      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17373$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17374      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17375$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17376      as_fn_error $? "Cannot continue" "$LINENO" 5
17377    fi
17378
17379    # Now set all paths and other env variables. This will allow the rest of
17380    # the configure script to find and run the compiler in the proper way.
17381    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
17382$as_echo "$as_me: Setting extracted environment variables" >&6;}
17383    . $OUTPUT_ROOT/localdevenv.sh
17384  else
17385    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
17386    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
17387$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
17388  fi
17389
17390  # At this point, we should have corrent variables in the environment, or we can't continue.
17391  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
17392$as_echo_n "checking for Visual Studio variables... " >&6; }
17393
17394  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
17395    if test "x$INCLUDE" = x || test "x$LIB" = x; then
17396      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
17397$as_echo "present but broken" >&6; }
17398      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
17399    else
17400      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17401$as_echo "ok" >&6; }
17402      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
17403      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
17404      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
17405      # Remove any paths containing # (typically F#) as that messes up make
17406      PATH=`$ECHO "$PATH" | $SED 's/[^:#]*#[^:]*://g'`
17407      VS_PATH="$PATH"
17408
17409
17410
17411    fi
17412  else
17413    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17414$as_echo "not found" >&6; }
17415
17416    if test "x$VS_ENV_CMD" = x; then
17417      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
17418$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
17419      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
17420$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
17421    else
17422      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
17423$as_echo "$as_me: Running the extraction script failed." >&6;}
17424    fi
17425    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17426$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17427    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17428$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17429    as_fn_error $? "Cannot continue" "$LINENO" 5
17430  fi
17431
17432  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17433$as_echo_n "checking for msvcr100.dll... " >&6; }
17434
17435# Check whether --with-msvcr-dll was given.
17436if test "${with_msvcr_dll+set}" = set; then :
17437  withval=$with_msvcr_dll;
17438fi
17439
17440  if test "x$with_msvcr_dll" != x; then
17441    MSVCR_DLL="$with_msvcr_dll"
17442  else
17443    if test "x$VCINSTALLDIR" != x; then
17444      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17445        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
17446      else
17447        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
17448        if test "x$MSVCR_DLL" = x; then
17449          MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
17450        fi
17451      fi
17452      if test "x$MSVCR_DLL" != x; then
17453        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
17454$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
17455      else
17456        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
17457$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
17458      fi
17459    fi
17460    # Try some fallback alternatives
17461    if test "x$MSVCR_DLL" = x; then
17462      # If visual studio express is installed, there is usually one with the debugger
17463      if test "x$VS100COMNTOOLS" != x; then
17464        if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17465          MSVCR_DLL=`find "$VS100COMNTOOLS/.." -name msvcr100.dll | grep -i x64 | head --lines 1`
17466          { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $VS100COMNTOOLS..: $VS100COMNTOOLS.." >&5
17467$as_echo "$as_me: msvcr100.dll found in $VS100COMNTOOLS..: $VS100COMNTOOLS.." >&6;}
17468        fi
17469      fi
17470    fi
17471    if test "x$MSVCR_DLL" = x; then
17472      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17473        # Fallback for 32bit builds, look in the windows directory.
17474        if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
17475          { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
17476$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
17477          MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
17478        fi
17479      fi
17480    fi
17481  fi
17482  if test "x$MSVCR_DLL" = x; then
17483    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17484$as_echo "no" >&6; }
17485    as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
17486  fi
17487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17488$as_echo "$MSVCR_DLL" >&6; }
17489
17490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17491
17492  # Input might be given as Windows format, start by converting to
17493  # unix format.
17494  path="$MSVCR_DLL"
17495  new_path=`$CYGPATH -u "$path"`
17496
17497  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17498  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17499  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17500  # "foo.exe" is OK but "foo" is an error.
17501  #
17502  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17503  # It is also a way to make sure we got the proper file name for the real test later on.
17504  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17505  if test "x$test_shortpath" = x; then
17506    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17507$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17508    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
17509  fi
17510
17511  # Call helper function which possibly converts this using DOS-style short mode.
17512  # If so, the updated path is stored in $new_path.
17513
17514  input_path="$new_path"
17515  # Check if we need to convert this using DOS-style short mode. If the path
17516  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17517  # take no chances and rewrite it.
17518  # Note: m4 eats our [], so we need to use [ and ] instead.
17519  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17520  if test "x$has_forbidden_chars" != x; then
17521    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17522    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17523    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17524    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17525      # Going to short mode and back again did indeed matter. Since short mode is
17526      # case insensitive, let's make it lowercase to improve readability.
17527      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17528      # Now convert it back to Unix-stile (cygpath)
17529      input_path=`$CYGPATH -u "$shortmode_path"`
17530      new_path="$input_path"
17531    fi
17532  fi
17533
17534  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17535  if test "x$test_cygdrive_prefix" = x; then
17536    # As a simple fix, exclude /usr/bin since it's not a real path.
17537    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17538      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17539      # a path prefixed by /cygdrive for fixpath to work.
17540      new_path="$CYGWIN_ROOT_PATH$input_path"
17541    fi
17542  fi
17543
17544
17545  if test "x$path" != "x$new_path"; then
17546    MSVCR_DLL="$new_path"
17547    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17548$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17549  fi
17550
17551  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17552
17553  path="$MSVCR_DLL"
17554  has_colon=`$ECHO $path | $GREP ^.:`
17555  new_path="$path"
17556  if test "x$has_colon" = x; then
17557    # Not in mixed or Windows style, start by that.
17558    new_path=`cmd //c echo $path`
17559  fi
17560
17561
17562  input_path="$new_path"
17563  # Check if we need to convert this using DOS-style short mode. If the path
17564  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17565  # take no chances and rewrite it.
17566  # Note: m4 eats our [], so we need to use [ and ] instead.
17567  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17568  if test "x$has_forbidden_chars" != x; then
17569    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17570    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17571  fi
17572
17573
17574  windows_path="$new_path"
17575  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17576    unix_path=`$CYGPATH -u "$windows_path"`
17577    new_path="$unix_path"
17578  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17579    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17580    new_path="$unix_path"
17581  fi
17582
17583  if test "x$path" != "x$new_path"; then
17584    MSVCR_DLL="$new_path"
17585    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17586$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17587  fi
17588
17589  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17590  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17591
17592  else
17593    # We're on a posix platform. Hooray! :)
17594    path="$MSVCR_DLL"
17595    has_space=`$ECHO "$path" | $GREP " "`
17596    if test "x$has_space" != x; then
17597      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17598$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17599      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17600    fi
17601
17602    # Use eval to expand a potential ~
17603    eval path="$path"
17604    if test ! -f "$path" && test ! -d "$path"; then
17605      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
17606    fi
17607
17608    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
17609  fi
17610
17611
17612
17613
17614# Check whether --with-dxsdk was given.
17615if test "${with_dxsdk+set}" = set; then :
17616  withval=$with_dxsdk;
17617fi
17618
17619
17620# Check whether --with-dxsdk-lib was given.
17621if test "${with_dxsdk_lib+set}" = set; then :
17622  withval=$with_dxsdk_lib;
17623fi
17624
17625
17626# Check whether --with-dxsdk-include was given.
17627if test "${with_dxsdk_include+set}" = set; then :
17628  withval=$with_dxsdk_include;
17629fi
17630
17631
17632  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK" >&5
17633$as_echo_n "checking for DirectX SDK... " >&6; }
17634
17635  if test "x$with_dxsdk" != x; then
17636    dxsdk_path="$with_dxsdk"
17637  elif test "x$DXSDK_DIR" != x; then
17638    dxsdk_path="$DXSDK_DIR"
17639  elif test -d "C:/DXSDK"; then
17640    dxsdk_path="C:/DXSDK"
17641  else
17642    as_fn_error $? "Could not find the DirectX SDK" "$LINENO" 5
17643  fi
17644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dxsdk_path" >&5
17645$as_echo "$dxsdk_path" >&6; }
17646
17647  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17648
17649  # Input might be given as Windows format, start by converting to
17650  # unix format.
17651  path="$dxsdk_path"
17652  new_path=`$CYGPATH -u "$path"`
17653
17654  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17655  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17656  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17657  # "foo.exe" is OK but "foo" is an error.
17658  #
17659  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17660  # It is also a way to make sure we got the proper file name for the real test later on.
17661  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17662  if test "x$test_shortpath" = x; then
17663    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17664$as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17665    as_fn_error $? "Cannot locate the the path of dxsdk_path" "$LINENO" 5
17666  fi
17667
17668  # Call helper function which possibly converts this using DOS-style short mode.
17669  # If so, the updated path is stored in $new_path.
17670
17671  input_path="$new_path"
17672  # Check if we need to convert this using DOS-style short mode. If the path
17673  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17674  # take no chances and rewrite it.
17675  # Note: m4 eats our [], so we need to use [ and ] instead.
17676  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17677  if test "x$has_forbidden_chars" != x; then
17678    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17679    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17680    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17681    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17682      # Going to short mode and back again did indeed matter. Since short mode is
17683      # case insensitive, let's make it lowercase to improve readability.
17684      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17685      # Now convert it back to Unix-stile (cygpath)
17686      input_path=`$CYGPATH -u "$shortmode_path"`
17687      new_path="$input_path"
17688    fi
17689  fi
17690
17691  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17692  if test "x$test_cygdrive_prefix" = x; then
17693    # As a simple fix, exclude /usr/bin since it's not a real path.
17694    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17695      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17696      # a path prefixed by /cygdrive for fixpath to work.
17697      new_path="$CYGWIN_ROOT_PATH$input_path"
17698    fi
17699  fi
17700
17701
17702  if test "x$path" != "x$new_path"; then
17703    dxsdk_path="$new_path"
17704    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17705$as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17706  fi
17707
17708  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17709
17710  path="$dxsdk_path"
17711  has_colon=`$ECHO $path | $GREP ^.:`
17712  new_path="$path"
17713  if test "x$has_colon" = x; then
17714    # Not in mixed or Windows style, start by that.
17715    new_path=`cmd //c echo $path`
17716  fi
17717
17718
17719  input_path="$new_path"
17720  # Check if we need to convert this using DOS-style short mode. If the path
17721  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17722  # take no chances and rewrite it.
17723  # Note: m4 eats our [], so we need to use [ and ] instead.
17724  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17725  if test "x$has_forbidden_chars" != x; then
17726    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17727    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17728  fi
17729
17730
17731  windows_path="$new_path"
17732  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17733    unix_path=`$CYGPATH -u "$windows_path"`
17734    new_path="$unix_path"
17735  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17736    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17737    new_path="$unix_path"
17738  fi
17739
17740  if test "x$path" != "x$new_path"; then
17741    dxsdk_path="$new_path"
17742    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17743$as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17744  fi
17745
17746  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17747  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17748
17749  else
17750    # We're on a posix platform. Hooray! :)
17751    path="$dxsdk_path"
17752    has_space=`$ECHO "$path" | $GREP " "`
17753    if test "x$has_space" != x; then
17754      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17755$as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17756      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17757    fi
17758
17759    # Use eval to expand a potential ~
17760    eval path="$path"
17761    if test ! -f "$path" && test ! -d "$path"; then
17762      as_fn_error $? "The path of dxsdk_path, which resolves as \"$path\", is not found." "$LINENO" 5
17763    fi
17764
17765    dxsdk_path="`cd "$path"; $THEPWDCMD -L`"
17766  fi
17767
17768
17769  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK lib dir" >&5
17770$as_echo_n "checking for DirectX SDK lib dir... " >&6; }
17771  if test "x$with_dxsdk_lib" != x; then
17772    DXSDK_LIB_PATH="$with_dxsdk_lib"
17773  elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
17774    DXSDK_LIB_PATH="$dxsdk_path/Lib/x64"
17775  else
17776    DXSDK_LIB_PATH="$dxsdk_path/Lib"
17777  fi
17778  # dsound.lib is linked to in jsoundds
17779  if test ! -f "$DXSDK_LIB_PATH/dsound.lib"; then
17780    as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17781  fi
17782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_LIB_PATH" >&5
17783$as_echo "$DXSDK_LIB_PATH" >&6; }
17784
17785  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17786
17787  # Input might be given as Windows format, start by converting to
17788  # unix format.
17789  path="$DXSDK_LIB_PATH"
17790  new_path=`$CYGPATH -u "$path"`
17791
17792  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17793  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17794  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17795  # "foo.exe" is OK but "foo" is an error.
17796  #
17797  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17798  # It is also a way to make sure we got the proper file name for the real test later on.
17799  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17800  if test "x$test_shortpath" = x; then
17801    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17802$as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17803    as_fn_error $? "Cannot locate the the path of DXSDK_LIB_PATH" "$LINENO" 5
17804  fi
17805
17806  # Call helper function which possibly converts this using DOS-style short mode.
17807  # If so, the updated path is stored in $new_path.
17808
17809  input_path="$new_path"
17810  # Check if we need to convert this using DOS-style short mode. If the path
17811  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17812  # take no chances and rewrite it.
17813  # Note: m4 eats our [], so we need to use [ and ] instead.
17814  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17815  if test "x$has_forbidden_chars" != x; then
17816    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17817    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17818    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17819    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17820      # Going to short mode and back again did indeed matter. Since short mode is
17821      # case insensitive, let's make it lowercase to improve readability.
17822      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17823      # Now convert it back to Unix-stile (cygpath)
17824      input_path=`$CYGPATH -u "$shortmode_path"`
17825      new_path="$input_path"
17826    fi
17827  fi
17828
17829  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17830  if test "x$test_cygdrive_prefix" = x; then
17831    # As a simple fix, exclude /usr/bin since it's not a real path.
17832    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17833      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17834      # a path prefixed by /cygdrive for fixpath to work.
17835      new_path="$CYGWIN_ROOT_PATH$input_path"
17836    fi
17837  fi
17838
17839
17840  if test "x$path" != "x$new_path"; then
17841    DXSDK_LIB_PATH="$new_path"
17842    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17843$as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17844  fi
17845
17846  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17847
17848  path="$DXSDK_LIB_PATH"
17849  has_colon=`$ECHO $path | $GREP ^.:`
17850  new_path="$path"
17851  if test "x$has_colon" = x; then
17852    # Not in mixed or Windows style, start by that.
17853    new_path=`cmd //c echo $path`
17854  fi
17855
17856
17857  input_path="$new_path"
17858  # Check if we need to convert this using DOS-style short mode. If the path
17859  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17860  # take no chances and rewrite it.
17861  # Note: m4 eats our [], so we need to use [ and ] instead.
17862  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17863  if test "x$has_forbidden_chars" != x; then
17864    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17865    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17866  fi
17867
17868
17869  windows_path="$new_path"
17870  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17871    unix_path=`$CYGPATH -u "$windows_path"`
17872    new_path="$unix_path"
17873  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17874    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17875    new_path="$unix_path"
17876  fi
17877
17878  if test "x$path" != "x$new_path"; then
17879    DXSDK_LIB_PATH="$new_path"
17880    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17881$as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17882  fi
17883
17884  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17885  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17886
17887  else
17888    # We're on a posix platform. Hooray! :)
17889    path="$DXSDK_LIB_PATH"
17890    has_space=`$ECHO "$path" | $GREP " "`
17891    if test "x$has_space" != x; then
17892      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17893$as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17894      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17895    fi
17896
17897    # Use eval to expand a potential ~
17898    eval path="$path"
17899    if test ! -f "$path" && test ! -d "$path"; then
17900      as_fn_error $? "The path of DXSDK_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17901    fi
17902
17903    DXSDK_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
17904  fi
17905
17906
17907  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK include dir" >&5
17908$as_echo_n "checking for DirectX SDK include dir... " >&6; }
17909  if test "x$with_dxsdk_include" != x; then
17910    DXSDK_INCLUDE_PATH="$with_dxsdk_include"
17911  else
17912    DXSDK_INCLUDE_PATH="$dxsdk_path/Include"
17913  fi
17914  # dsound.h is included in jsoundds
17915  if test ! -f "$DXSDK_INCLUDE_PATH/dsound.h"; then
17916    as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17917  fi
17918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_INCLUDE_PATH" >&5
17919$as_echo "$DXSDK_INCLUDE_PATH" >&6; }
17920
17921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17922
17923  # Input might be given as Windows format, start by converting to
17924  # unix format.
17925  path="$DXSDK_INCLUDE_PATH"
17926  new_path=`$CYGPATH -u "$path"`
17927
17928  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17929  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17930  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17931  # "foo.exe" is OK but "foo" is an error.
17932  #
17933  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17934  # It is also a way to make sure we got the proper file name for the real test later on.
17935  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17936  if test "x$test_shortpath" = x; then
17937    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17938$as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17939    as_fn_error $? "Cannot locate the the path of DXSDK_INCLUDE_PATH" "$LINENO" 5
17940  fi
17941
17942  # Call helper function which possibly converts this using DOS-style short mode.
17943  # If so, the updated path is stored in $new_path.
17944
17945  input_path="$new_path"
17946  # Check if we need to convert this using DOS-style short mode. If the path
17947  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17948  # take no chances and rewrite it.
17949  # Note: m4 eats our [], so we need to use [ and ] instead.
17950  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17951  if test "x$has_forbidden_chars" != x; then
17952    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17953    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17954    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17955    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17956      # Going to short mode and back again did indeed matter. Since short mode is
17957      # case insensitive, let's make it lowercase to improve readability.
17958      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17959      # Now convert it back to Unix-stile (cygpath)
17960      input_path=`$CYGPATH -u "$shortmode_path"`
17961      new_path="$input_path"
17962    fi
17963  fi
17964
17965  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17966  if test "x$test_cygdrive_prefix" = x; then
17967    # As a simple fix, exclude /usr/bin since it's not a real path.
17968    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17969      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17970      # a path prefixed by /cygdrive for fixpath to work.
17971      new_path="$CYGWIN_ROOT_PATH$input_path"
17972    fi
17973  fi
17974
17975
17976  if test "x$path" != "x$new_path"; then
17977    DXSDK_INCLUDE_PATH="$new_path"
17978    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17979$as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17980  fi
17981
17982  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17983
17984  path="$DXSDK_INCLUDE_PATH"
17985  has_colon=`$ECHO $path | $GREP ^.:`
17986  new_path="$path"
17987  if test "x$has_colon" = x; then
17988    # Not in mixed or Windows style, start by that.
17989    new_path=`cmd //c echo $path`
17990  fi
17991
17992
17993  input_path="$new_path"
17994  # Check if we need to convert this using DOS-style short mode. If the path
17995  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17996  # take no chances and rewrite it.
17997  # Note: m4 eats our [], so we need to use [ and ] instead.
17998  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17999  if test "x$has_forbidden_chars" != x; then
18000    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18001    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18002  fi
18003
18004
18005  windows_path="$new_path"
18006  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18007    unix_path=`$CYGPATH -u "$windows_path"`
18008    new_path="$unix_path"
18009  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18010    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18011    new_path="$unix_path"
18012  fi
18013
18014  if test "x$path" != "x$new_path"; then
18015    DXSDK_INCLUDE_PATH="$new_path"
18016    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
18017$as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
18018  fi
18019
18020  # Save the first 10 bytes of this path to the storage, so fixpath can work.
18021  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18022
18023  else
18024    # We're on a posix platform. Hooray! :)
18025    path="$DXSDK_INCLUDE_PATH"
18026    has_space=`$ECHO "$path" | $GREP " "`
18027    if test "x$has_space" != x; then
18028      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
18029$as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
18030      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
18031    fi
18032
18033    # Use eval to expand a potential ~
18034    eval path="$path"
18035    if test ! -f "$path" && test ! -d "$path"; then
18036      as_fn_error $? "The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
18037    fi
18038
18039    DXSDK_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
18040  fi
18041
18042
18043
18044
18045  LDFLAGS_JDK="$LDFLAGS_JDK -libpath:$DXSDK_LIB_PATH"
18046
18047fi
18048
18049
18050
18051# If --build AND --host is set, then the configure script will find any
18052# cross compilation tools in the PATH. Cross compilation tools
18053# follows the cross compilation standard where they are prefixed with ${host}.
18054# For example the binary i686-sun-solaris2.10-gcc
18055# will cross compile for i686-sun-solaris2.10
18056# If neither of build and host is not set, then build=host and the
18057# default compiler found in the path will be used.
18058# Setting only --host, does not seem to be really supported.
18059# Please set both --build and --host if you want to cross compile.
18060
18061if test "x$COMPILE_TYPE" = "xcross"; then
18062    # Now we to find a C/C++ compiler that can build executables for the build
18063    # platform. We can't use the AC_PROG_CC macro, since it can only be used
18064    # once. Also, we need to do this before adding a tools dir to the path,
18065    # otherwise we might pick up cross-compilers which don't use standard naming.
18066    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
18067    # to wait until they are properly discovered.
18068    for ac_prog in cl cc gcc
18069do
18070  # Extract the first word of "$ac_prog", so it can be a program name with args.
18071set dummy $ac_prog; ac_word=$2
18072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18073$as_echo_n "checking for $ac_word... " >&6; }
18074if ${ac_cv_path_BUILD_CC+:} false; then :
18075  $as_echo_n "(cached) " >&6
18076else
18077  case $BUILD_CC in
18078  [\\/]* | ?:[\\/]*)
18079  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
18080  ;;
18081  *)
18082  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18083for as_dir in $PATH
18084do
18085  IFS=$as_save_IFS
18086  test -z "$as_dir" && as_dir=.
18087    for ac_exec_ext in '' $ac_executable_extensions; do
18088  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18089    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
18090    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18091    break 2
18092  fi
18093done
18094  done
18095IFS=$as_save_IFS
18096
18097  ;;
18098esac
18099fi
18100BUILD_CC=$ac_cv_path_BUILD_CC
18101if test -n "$BUILD_CC"; then
18102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
18103$as_echo "$BUILD_CC" >&6; }
18104else
18105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18106$as_echo "no" >&6; }
18107fi
18108
18109
18110  test -n "$BUILD_CC" && break
18111done
18112
18113
18114  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18115
18116  # First separate the path from the arguments. This will split at the first
18117  # space.
18118  complete="$BUILD_CC"
18119  path="${complete%% *}"
18120  tmp="$complete EOL"
18121  arguments="${tmp#* }"
18122
18123  # Input might be given as Windows format, start by converting to
18124  # unix format.
18125  new_path=`$CYGPATH -u "$path"`
18126
18127  # Now try to locate executable using which
18128  new_path=`$WHICH "$new_path" 2> /dev/null`
18129  # bat and cmd files are not always considered executable in cygwin causing which
18130  # to not find them
18131  if test "x$new_path" = x \
18132           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18133           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18134    new_path=`$CYGPATH -u "$path"`
18135  fi
18136  if test "x$new_path" = x; then
18137    # Oops. Which didn't find the executable.
18138    # The splitting of arguments from the executable at a space might have been incorrect,
18139    # since paths with space are more likely in Windows. Give it another try with the whole
18140    # argument.
18141    path="$complete"
18142    arguments="EOL"
18143    new_path=`$CYGPATH -u "$path"`
18144    new_path=`$WHICH "$new_path" 2> /dev/null`
18145    # bat and cmd files are not always considered executable in cygwin causing which
18146    # to not find them
18147    if test "x$new_path" = x \
18148             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18149             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18150      new_path=`$CYGPATH -u "$path"`
18151    fi
18152    if test "x$new_path" = x; then
18153      # It's still not found. Now this is an unrecoverable error.
18154      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18155$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18156      has_space=`$ECHO "$complete" | $GREP " "`
18157      if test "x$has_space" != x; then
18158        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18159$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18160      fi
18161      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18162    fi
18163  fi
18164
18165  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18166  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18167  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18168  # "foo.exe" is OK but "foo" is an error.
18169  #
18170  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18171  # It is also a way to make sure we got the proper file name for the real test later on.
18172  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18173  if test "x$test_shortpath" = x; then
18174    # Short path failed, file does not exist as specified.
18175    # Try adding .exe or .cmd
18176    if test -f "${new_path}.exe"; then
18177       input_to_shortpath="${new_path}.exe"
18178    elif test -f "${new_path}.cmd"; then
18179       input_to_shortpath="${new_path}.cmd"
18180    else
18181      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
18182$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
18183      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18184$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18185      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18186    fi
18187  else
18188    input_to_shortpath="$new_path"
18189  fi
18190
18191  # Call helper function which possibly converts this using DOS-style short mode.
18192  # If so, the updated path is stored in $new_path.
18193  new_path="$input_to_shortpath"
18194
18195  input_path="$input_to_shortpath"
18196  # Check if we need to convert this using DOS-style short mode. If the path
18197  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18198  # take no chances and rewrite it.
18199  # Note: m4 eats our [], so we need to use [ and ] instead.
18200  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18201  if test "x$has_forbidden_chars" != x; then
18202    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18203    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18204    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18205    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18206      # Going to short mode and back again did indeed matter. Since short mode is
18207      # case insensitive, let's make it lowercase to improve readability.
18208      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18209      # Now convert it back to Unix-stile (cygpath)
18210      input_path=`$CYGPATH -u "$shortmode_path"`
18211      new_path="$input_path"
18212    fi
18213  fi
18214
18215  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18216  if test "x$test_cygdrive_prefix" = x; then
18217    # As a simple fix, exclude /usr/bin since it's not a real path.
18218    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18219      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18220      # a path prefixed by /cygdrive for fixpath to work.
18221      new_path="$CYGWIN_ROOT_PATH$input_path"
18222    fi
18223  fi
18224
18225  # remove trailing .exe if any
18226  new_path="${new_path/%.exe/}"
18227
18228  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18229
18230  # First separate the path from the arguments. This will split at the first
18231  # space.
18232  complete="$BUILD_CC"
18233  path="${complete%% *}"
18234  tmp="$complete EOL"
18235  arguments="${tmp#* }"
18236
18237  # Input might be given as Windows format, start by converting to
18238  # unix format.
18239  new_path="$path"
18240
18241  windows_path="$new_path"
18242  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18243    unix_path=`$CYGPATH -u "$windows_path"`
18244    new_path="$unix_path"
18245  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18246    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18247    new_path="$unix_path"
18248  fi
18249
18250
18251  # Now try to locate executable using which
18252  new_path=`$WHICH "$new_path" 2> /dev/null`
18253
18254  if test "x$new_path" = x; then
18255    # Oops. Which didn't find the executable.
18256    # The splitting of arguments from the executable at a space might have been incorrect,
18257    # since paths with space are more likely in Windows. Give it another try with the whole
18258    # argument.
18259    path="$complete"
18260    arguments="EOL"
18261    new_path="$path"
18262
18263  windows_path="$new_path"
18264  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18265    unix_path=`$CYGPATH -u "$windows_path"`
18266    new_path="$unix_path"
18267  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18268    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18269    new_path="$unix_path"
18270  fi
18271
18272
18273    new_path=`$WHICH "$new_path" 2> /dev/null`
18274
18275    if test "x$new_path" = x; then
18276      # It's still not found. Now this is an unrecoverable error.
18277      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18278$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18279      has_space=`$ECHO "$complete" | $GREP " "`
18280      if test "x$has_space" != x; then
18281        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18282$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18283      fi
18284      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18285    fi
18286  fi
18287
18288  # Now new_path has a complete unix path to the binary
18289  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18290    # Keep paths in /bin as-is, but remove trailing .exe if any
18291    new_path="${new_path/%.exe/}"
18292    # Do not save /bin paths to all_fixpath_prefixes!
18293  else
18294    # Not in mixed or Windows style, start by that.
18295    new_path=`cmd //c echo $new_path`
18296
18297  input_path="$new_path"
18298  # Check if we need to convert this using DOS-style short mode. If the path
18299  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18300  # take no chances and rewrite it.
18301  # Note: m4 eats our [], so we need to use [ and ] instead.
18302  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18303  if test "x$has_forbidden_chars" != x; then
18304    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18305    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18306  fi
18307
18308    # Output is in $new_path
18309
18310  windows_path="$new_path"
18311  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18312    unix_path=`$CYGPATH -u "$windows_path"`
18313    new_path="$unix_path"
18314  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18315    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18316    new_path="$unix_path"
18317  fi
18318
18319    # remove trailing .exe if any
18320    new_path="${new_path/%.exe/}"
18321
18322    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18323    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18324  fi
18325
18326  else
18327    # We're on a posix platform. Hooray! :)
18328    # First separate the path from the arguments. This will split at the first
18329    # space.
18330    complete="$BUILD_CC"
18331    path="${complete%% *}"
18332    tmp="$complete EOL"
18333    arguments="${tmp#* }"
18334
18335    # Cannot rely on the command "which" here since it doesn't always work.
18336    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18337    if test -z "$is_absolute_path"; then
18338      # Path to executable is not absolute. Find it.
18339      IFS_save="$IFS"
18340      IFS=:
18341      for p in $PATH; do
18342        if test -f "$p/$path" && test -x "$p/$path"; then
18343          new_path="$p/$path"
18344          break
18345        fi
18346      done
18347      IFS="$IFS_save"
18348    else
18349      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
18350$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
18351      new_path="$path"
18352    fi
18353
18354    if test "x$new_path" = x; then
18355        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18356$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18357        has_space=`$ECHO "$complete" | $GREP " "`
18358        if test "x$has_space" != x; then
18359          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18360$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18361        fi
18362        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18363      fi
18364  fi
18365
18366      # Now join together the path and the arguments once again
18367      if test "x$arguments" != xEOL; then
18368        new_complete="$new_path ${arguments% *}"
18369      else
18370        new_complete="$new_path"
18371      fi
18372
18373  if test "x$complete" != "x$new_complete"; then
18374      BUILD_CC="$new_complete"
18375      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
18376$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
18377    fi
18378
18379    for ac_prog in cl CC g++
18380do
18381  # Extract the first word of "$ac_prog", so it can be a program name with args.
18382set dummy $ac_prog; ac_word=$2
18383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18384$as_echo_n "checking for $ac_word... " >&6; }
18385if ${ac_cv_path_BUILD_CXX+:} false; then :
18386  $as_echo_n "(cached) " >&6
18387else
18388  case $BUILD_CXX in
18389  [\\/]* | ?:[\\/]*)
18390  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
18391  ;;
18392  *)
18393  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18394for as_dir in $PATH
18395do
18396  IFS=$as_save_IFS
18397  test -z "$as_dir" && as_dir=.
18398    for ac_exec_ext in '' $ac_executable_extensions; do
18399  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18400    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
18401    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18402    break 2
18403  fi
18404done
18405  done
18406IFS=$as_save_IFS
18407
18408  ;;
18409esac
18410fi
18411BUILD_CXX=$ac_cv_path_BUILD_CXX
18412if test -n "$BUILD_CXX"; then
18413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
18414$as_echo "$BUILD_CXX" >&6; }
18415else
18416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18417$as_echo "no" >&6; }
18418fi
18419
18420
18421  test -n "$BUILD_CXX" && break
18422done
18423
18424
18425  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18426
18427  # First separate the path from the arguments. This will split at the first
18428  # space.
18429  complete="$BUILD_CXX"
18430  path="${complete%% *}"
18431  tmp="$complete EOL"
18432  arguments="${tmp#* }"
18433
18434  # Input might be given as Windows format, start by converting to
18435  # unix format.
18436  new_path=`$CYGPATH -u "$path"`
18437
18438  # Now try to locate executable using which
18439  new_path=`$WHICH "$new_path" 2> /dev/null`
18440  # bat and cmd files are not always considered executable in cygwin causing which
18441  # to not find them
18442  if test "x$new_path" = x \
18443           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18444           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18445    new_path=`$CYGPATH -u "$path"`
18446  fi
18447  if test "x$new_path" = x; then
18448    # Oops. Which didn't find the executable.
18449    # The splitting of arguments from the executable at a space might have been incorrect,
18450    # since paths with space are more likely in Windows. Give it another try with the whole
18451    # argument.
18452    path="$complete"
18453    arguments="EOL"
18454    new_path=`$CYGPATH -u "$path"`
18455    new_path=`$WHICH "$new_path" 2> /dev/null`
18456    # bat and cmd files are not always considered executable in cygwin causing which
18457    # to not find them
18458    if test "x$new_path" = x \
18459             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18460             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18461      new_path=`$CYGPATH -u "$path"`
18462    fi
18463    if test "x$new_path" = x; then
18464      # It's still not found. Now this is an unrecoverable error.
18465      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18466$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18467      has_space=`$ECHO "$complete" | $GREP " "`
18468      if test "x$has_space" != x; then
18469        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18470$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18471      fi
18472      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18473    fi
18474  fi
18475
18476  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18477  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18478  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18479  # "foo.exe" is OK but "foo" is an error.
18480  #
18481  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18482  # It is also a way to make sure we got the proper file name for the real test later on.
18483  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18484  if test "x$test_shortpath" = x; then
18485    # Short path failed, file does not exist as specified.
18486    # Try adding .exe or .cmd
18487    if test -f "${new_path}.exe"; then
18488       input_to_shortpath="${new_path}.exe"
18489    elif test -f "${new_path}.cmd"; then
18490       input_to_shortpath="${new_path}.cmd"
18491    else
18492      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
18493$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
18494      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18495$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18496      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18497    fi
18498  else
18499    input_to_shortpath="$new_path"
18500  fi
18501
18502  # Call helper function which possibly converts this using DOS-style short mode.
18503  # If so, the updated path is stored in $new_path.
18504  new_path="$input_to_shortpath"
18505
18506  input_path="$input_to_shortpath"
18507  # Check if we need to convert this using DOS-style short mode. If the path
18508  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18509  # take no chances and rewrite it.
18510  # Note: m4 eats our [], so we need to use [ and ] instead.
18511  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18512  if test "x$has_forbidden_chars" != x; then
18513    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18514    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18515    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18516    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18517      # Going to short mode and back again did indeed matter. Since short mode is
18518      # case insensitive, let's make it lowercase to improve readability.
18519      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18520      # Now convert it back to Unix-stile (cygpath)
18521      input_path=`$CYGPATH -u "$shortmode_path"`
18522      new_path="$input_path"
18523    fi
18524  fi
18525
18526  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18527  if test "x$test_cygdrive_prefix" = x; then
18528    # As a simple fix, exclude /usr/bin since it's not a real path.
18529    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18530      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18531      # a path prefixed by /cygdrive for fixpath to work.
18532      new_path="$CYGWIN_ROOT_PATH$input_path"
18533    fi
18534  fi
18535
18536  # remove trailing .exe if any
18537  new_path="${new_path/%.exe/}"
18538
18539  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18540
18541  # First separate the path from the arguments. This will split at the first
18542  # space.
18543  complete="$BUILD_CXX"
18544  path="${complete%% *}"
18545  tmp="$complete EOL"
18546  arguments="${tmp#* }"
18547
18548  # Input might be given as Windows format, start by converting to
18549  # unix format.
18550  new_path="$path"
18551
18552  windows_path="$new_path"
18553  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18554    unix_path=`$CYGPATH -u "$windows_path"`
18555    new_path="$unix_path"
18556  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18557    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18558    new_path="$unix_path"
18559  fi
18560
18561
18562  # Now try to locate executable using which
18563  new_path=`$WHICH "$new_path" 2> /dev/null`
18564
18565  if test "x$new_path" = x; then
18566    # Oops. Which didn't find the executable.
18567    # The splitting of arguments from the executable at a space might have been incorrect,
18568    # since paths with space are more likely in Windows. Give it another try with the whole
18569    # argument.
18570    path="$complete"
18571    arguments="EOL"
18572    new_path="$path"
18573
18574  windows_path="$new_path"
18575  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18576    unix_path=`$CYGPATH -u "$windows_path"`
18577    new_path="$unix_path"
18578  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18579    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18580    new_path="$unix_path"
18581  fi
18582
18583
18584    new_path=`$WHICH "$new_path" 2> /dev/null`
18585
18586    if test "x$new_path" = x; then
18587      # It's still not found. Now this is an unrecoverable error.
18588      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18589$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18590      has_space=`$ECHO "$complete" | $GREP " "`
18591      if test "x$has_space" != x; then
18592        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18593$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18594      fi
18595      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18596    fi
18597  fi
18598
18599  # Now new_path has a complete unix path to the binary
18600  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18601    # Keep paths in /bin as-is, but remove trailing .exe if any
18602    new_path="${new_path/%.exe/}"
18603    # Do not save /bin paths to all_fixpath_prefixes!
18604  else
18605    # Not in mixed or Windows style, start by that.
18606    new_path=`cmd //c echo $new_path`
18607
18608  input_path="$new_path"
18609  # Check if we need to convert this using DOS-style short mode. If the path
18610  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18611  # take no chances and rewrite it.
18612  # Note: m4 eats our [], so we need to use [ and ] instead.
18613  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18614  if test "x$has_forbidden_chars" != x; then
18615    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18616    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18617  fi
18618
18619    # Output is in $new_path
18620
18621  windows_path="$new_path"
18622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18623    unix_path=`$CYGPATH -u "$windows_path"`
18624    new_path="$unix_path"
18625  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18626    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18627    new_path="$unix_path"
18628  fi
18629
18630    # remove trailing .exe if any
18631    new_path="${new_path/%.exe/}"
18632
18633    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18634    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18635  fi
18636
18637  else
18638    # We're on a posix platform. Hooray! :)
18639    # First separate the path from the arguments. This will split at the first
18640    # space.
18641    complete="$BUILD_CXX"
18642    path="${complete%% *}"
18643    tmp="$complete EOL"
18644    arguments="${tmp#* }"
18645
18646    # Cannot rely on the command "which" here since it doesn't always work.
18647    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18648    if test -z "$is_absolute_path"; then
18649      # Path to executable is not absolute. Find it.
18650      IFS_save="$IFS"
18651      IFS=:
18652      for p in $PATH; do
18653        if test -f "$p/$path" && test -x "$p/$path"; then
18654          new_path="$p/$path"
18655          break
18656        fi
18657      done
18658      IFS="$IFS_save"
18659    else
18660      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18661$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18662      new_path="$path"
18663    fi
18664
18665    if test "x$new_path" = x; then
18666        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18667$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18668        has_space=`$ECHO "$complete" | $GREP " "`
18669        if test "x$has_space" != x; then
18670          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18671$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18672        fi
18673        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18674      fi
18675  fi
18676
18677      # Now join together the path and the arguments once again
18678      if test "x$arguments" != xEOL; then
18679        new_complete="$new_path ${arguments% *}"
18680      else
18681        new_complete="$new_path"
18682      fi
18683
18684  if test "x$complete" != "x$new_complete"; then
18685      BUILD_CXX="$new_complete"
18686      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18687$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18688    fi
18689
18690    # Extract the first word of "ld", so it can be a program name with args.
18691set dummy ld; ac_word=$2
18692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18693$as_echo_n "checking for $ac_word... " >&6; }
18694if ${ac_cv_path_BUILD_LD+:} false; then :
18695  $as_echo_n "(cached) " >&6
18696else
18697  case $BUILD_LD in
18698  [\\/]* | ?:[\\/]*)
18699  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18700  ;;
18701  *)
18702  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18703for as_dir in $PATH
18704do
18705  IFS=$as_save_IFS
18706  test -z "$as_dir" && as_dir=.
18707    for ac_exec_ext in '' $ac_executable_extensions; do
18708  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18709    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18710    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18711    break 2
18712  fi
18713done
18714  done
18715IFS=$as_save_IFS
18716
18717  ;;
18718esac
18719fi
18720BUILD_LD=$ac_cv_path_BUILD_LD
18721if test -n "$BUILD_LD"; then
18722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18723$as_echo "$BUILD_LD" >&6; }
18724else
18725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18726$as_echo "no" >&6; }
18727fi
18728
18729
18730
18731  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18732
18733  # First separate the path from the arguments. This will split at the first
18734  # space.
18735  complete="$BUILD_LD"
18736  path="${complete%% *}"
18737  tmp="$complete EOL"
18738  arguments="${tmp#* }"
18739
18740  # Input might be given as Windows format, start by converting to
18741  # unix format.
18742  new_path=`$CYGPATH -u "$path"`
18743
18744  # Now try to locate executable using which
18745  new_path=`$WHICH "$new_path" 2> /dev/null`
18746  # bat and cmd files are not always considered executable in cygwin causing which
18747  # to not find them
18748  if test "x$new_path" = x \
18749           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18750           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18751    new_path=`$CYGPATH -u "$path"`
18752  fi
18753  if test "x$new_path" = x; then
18754    # Oops. Which didn't find the executable.
18755    # The splitting of arguments from the executable at a space might have been incorrect,
18756    # since paths with space are more likely in Windows. Give it another try with the whole
18757    # argument.
18758    path="$complete"
18759    arguments="EOL"
18760    new_path=`$CYGPATH -u "$path"`
18761    new_path=`$WHICH "$new_path" 2> /dev/null`
18762    # bat and cmd files are not always considered executable in cygwin causing which
18763    # to not find them
18764    if test "x$new_path" = x \
18765             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18766             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18767      new_path=`$CYGPATH -u "$path"`
18768    fi
18769    if test "x$new_path" = x; then
18770      # It's still not found. Now this is an unrecoverable error.
18771      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18772$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18773      has_space=`$ECHO "$complete" | $GREP " "`
18774      if test "x$has_space" != x; then
18775        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18776$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18777      fi
18778      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18779    fi
18780  fi
18781
18782  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18783  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18784  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18785  # "foo.exe" is OK but "foo" is an error.
18786  #
18787  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18788  # It is also a way to make sure we got the proper file name for the real test later on.
18789  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18790  if test "x$test_shortpath" = x; then
18791    # Short path failed, file does not exist as specified.
18792    # Try adding .exe or .cmd
18793    if test -f "${new_path}.exe"; then
18794       input_to_shortpath="${new_path}.exe"
18795    elif test -f "${new_path}.cmd"; then
18796       input_to_shortpath="${new_path}.cmd"
18797    else
18798      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18799$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18800      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18801$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18802      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18803    fi
18804  else
18805    input_to_shortpath="$new_path"
18806  fi
18807
18808  # Call helper function which possibly converts this using DOS-style short mode.
18809  # If so, the updated path is stored in $new_path.
18810  new_path="$input_to_shortpath"
18811
18812  input_path="$input_to_shortpath"
18813  # Check if we need to convert this using DOS-style short mode. If the path
18814  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18815  # take no chances and rewrite it.
18816  # Note: m4 eats our [], so we need to use [ and ] instead.
18817  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18818  if test "x$has_forbidden_chars" != x; then
18819    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18820    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18821    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18822    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18823      # Going to short mode and back again did indeed matter. Since short mode is
18824      # case insensitive, let's make it lowercase to improve readability.
18825      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18826      # Now convert it back to Unix-stile (cygpath)
18827      input_path=`$CYGPATH -u "$shortmode_path"`
18828      new_path="$input_path"
18829    fi
18830  fi
18831
18832  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18833  if test "x$test_cygdrive_prefix" = x; then
18834    # As a simple fix, exclude /usr/bin since it's not a real path.
18835    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18836      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18837      # a path prefixed by /cygdrive for fixpath to work.
18838      new_path="$CYGWIN_ROOT_PATH$input_path"
18839    fi
18840  fi
18841
18842  # remove trailing .exe if any
18843  new_path="${new_path/%.exe/}"
18844
18845  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18846
18847  # First separate the path from the arguments. This will split at the first
18848  # space.
18849  complete="$BUILD_LD"
18850  path="${complete%% *}"
18851  tmp="$complete EOL"
18852  arguments="${tmp#* }"
18853
18854  # Input might be given as Windows format, start by converting to
18855  # unix format.
18856  new_path="$path"
18857
18858  windows_path="$new_path"
18859  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18860    unix_path=`$CYGPATH -u "$windows_path"`
18861    new_path="$unix_path"
18862  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18863    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18864    new_path="$unix_path"
18865  fi
18866
18867
18868  # Now try to locate executable using which
18869  new_path=`$WHICH "$new_path" 2> /dev/null`
18870
18871  if test "x$new_path" = x; then
18872    # Oops. Which didn't find the executable.
18873    # The splitting of arguments from the executable at a space might have been incorrect,
18874    # since paths with space are more likely in Windows. Give it another try with the whole
18875    # argument.
18876    path="$complete"
18877    arguments="EOL"
18878    new_path="$path"
18879
18880  windows_path="$new_path"
18881  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18882    unix_path=`$CYGPATH -u "$windows_path"`
18883    new_path="$unix_path"
18884  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18885    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18886    new_path="$unix_path"
18887  fi
18888
18889
18890    new_path=`$WHICH "$new_path" 2> /dev/null`
18891
18892    if test "x$new_path" = x; then
18893      # It's still not found. Now this is an unrecoverable error.
18894      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18895$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18896      has_space=`$ECHO "$complete" | $GREP " "`
18897      if test "x$has_space" != x; then
18898        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18899$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18900      fi
18901      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18902    fi
18903  fi
18904
18905  # Now new_path has a complete unix path to the binary
18906  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18907    # Keep paths in /bin as-is, but remove trailing .exe if any
18908    new_path="${new_path/%.exe/}"
18909    # Do not save /bin paths to all_fixpath_prefixes!
18910  else
18911    # Not in mixed or Windows style, start by that.
18912    new_path=`cmd //c echo $new_path`
18913
18914  input_path="$new_path"
18915  # Check if we need to convert this using DOS-style short mode. If the path
18916  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18917  # take no chances and rewrite it.
18918  # Note: m4 eats our [], so we need to use [ and ] instead.
18919  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18920  if test "x$has_forbidden_chars" != x; then
18921    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18922    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18923  fi
18924
18925    # Output is in $new_path
18926
18927  windows_path="$new_path"
18928  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18929    unix_path=`$CYGPATH -u "$windows_path"`
18930    new_path="$unix_path"
18931  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18932    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18933    new_path="$unix_path"
18934  fi
18935
18936    # remove trailing .exe if any
18937    new_path="${new_path/%.exe/}"
18938
18939    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18940    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18941  fi
18942
18943  else
18944    # We're on a posix platform. Hooray! :)
18945    # First separate the path from the arguments. This will split at the first
18946    # space.
18947    complete="$BUILD_LD"
18948    path="${complete%% *}"
18949    tmp="$complete EOL"
18950    arguments="${tmp#* }"
18951
18952    # Cannot rely on the command "which" here since it doesn't always work.
18953    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18954    if test -z "$is_absolute_path"; then
18955      # Path to executable is not absolute. Find it.
18956      IFS_save="$IFS"
18957      IFS=:
18958      for p in $PATH; do
18959        if test -f "$p/$path" && test -x "$p/$path"; then
18960          new_path="$p/$path"
18961          break
18962        fi
18963      done
18964      IFS="$IFS_save"
18965    else
18966      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
18967$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
18968      new_path="$path"
18969    fi
18970
18971    if test "x$new_path" = x; then
18972        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18973$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18974        has_space=`$ECHO "$complete" | $GREP " "`
18975        if test "x$has_space" != x; then
18976          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18977$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18978        fi
18979        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18980      fi
18981  fi
18982
18983      # Now join together the path and the arguments once again
18984      if test "x$arguments" != xEOL; then
18985        new_complete="$new_path ${arguments% *}"
18986      else
18987        new_complete="$new_path"
18988      fi
18989
18990  if test "x$complete" != "x$new_complete"; then
18991      BUILD_LD="$new_complete"
18992      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
18993$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
18994    fi
18995
18996fi
18997
18998
18999
19000
19001# If a devkit is found on the builddeps server, then prepend its path to the
19002# PATH variable. If there are cross compilers available in the devkit, these
19003# will be found by AC_PROG_CC et al.
19004DEVKIT=
19005
19006
19007    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19008        # Source the builddeps file again, to make sure it uses the latest variables!
19009        . $builddepsfile
19010        # Look for a target and build machine specific resource!
19011        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
19012        if test "x$resource" = x; then
19013            # Ok, lets instead look for a target specific resource
19014            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
19015        fi
19016        if test "x$resource" = x; then
19017            # Ok, lets instead look for a build specific resource
19018            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
19019        fi
19020        if test "x$resource" = x; then
19021            # Ok, lets instead look for a generic resource
19022            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
19023            resource=${builddep_devkit}
19024        fi
19025        if test "x$resource" != x; then
19026            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
19027$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
19028	    # If the resource in the builddeps.conf file is an existing directory,
19029	    # for example /java/linux/cups
19030	    if test -d ${resource}; then
19031	       depdir=${resource}
19032	    else
19033
19034# devkit is for example mymodule
19035# $resource is for example libs/general/libmymod_1_2_3.zip
19036# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
19037# $with_builddeps_dir is for example /localhome/builddeps
19038# depdir is the name of the variable into which we store the depdir, eg MYMOD
19039# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
19040# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
19041    filename=`basename $resource`
19042    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
19043    filebase=${filename%%.*}
19044    extension=${filename#*.}
19045    installdir=$with_builddeps_dir/$filebase
19046    if test ! -f $installdir/$filename.unpacked; then
19047        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
19048$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
19049        if test ! -d $installdir; then
19050            mkdir -p $installdir
19051        fi
19052        if test ! -d $installdir; then
19053            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
19054        fi
19055        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
19056        touch $tmpfile
19057        if test ! -f $tmpfile; then
19058            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
19059        fi
19060
19061    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
19062    # $tmpfile is the local file name for the downloaded file.
19063    VALID_TOOL=no
19064    if test "x$BDEPS_FTP" = xwget; then
19065       VALID_TOOL=yes
19066       wget -O $tmpfile $with_builddeps_server/$resource
19067    fi
19068    if test "x$BDEPS_FTP" = xlftp; then
19069       VALID_TOOL=yes
19070       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
19071    fi
19072    if test "x$BDEPS_FTP" = xftp; then
19073        VALID_TOOL=yes
19074        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
19075        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
19076        FTPUSERPWD=${FTPSERVER%%@*}
19077        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
19078            FTPUSER=${userpwd%%:*}
19079            FTPPWD=${userpwd#*@}
19080            FTPSERVER=${FTPSERVER#*@}
19081        else
19082            FTPUSER=ftp
19083            FTPPWD=ftp
19084        fi
19085        # the "pass" command does not work on some
19086        # ftp clients (read ftp.exe) but if it works,
19087        # passive mode is better!
19088        (\
19089            echo "user $FTPUSER $FTPPWD"        ;\
19090            echo "pass"                         ;\
19091            echo "bin"                          ;\
19092            echo "get $FTPPATH $tmpfile"              ;\
19093        ) | ftp -in $FTPSERVER
19094    fi
19095    if test "x$VALID_TOOL" != xyes; then
19096       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
19097    fi
19098
19099        mv $tmpfile $installdir/$filename
19100        if test ! -s $installdir/$filename; then
19101            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
19102        fi
19103        case "$extension" in
19104            zip)  echo "Unzipping $installdir/$filename..."
19105               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
19106            ;;
19107            tar.gz) echo "Untaring $installdir/$filename..."
19108               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19109            ;;
19110            tgz) echo "Untaring $installdir/$filename..."
19111               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19112            ;;
19113            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
19114            ;;
19115        esac
19116    fi
19117    if test -f $installdir/$filename.unpacked; then
19118        depdir=$installdir
19119    fi
19120
19121	    fi
19122            # Source the builddeps file again, because in the previous command, the depdir
19123            # was updated to point at the current build dependency install directory.
19124            . $builddepsfile
19125            # Now extract variables from the builddeps.conf files.
19126            theroot=${builddep_devkit_ROOT}
19127            thecflags=${builddep_devkit_CFLAGS}
19128            thelibs=${builddep_devkit_LIBS}
19129            if test "x$depdir" = x; then
19130                as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
19131            fi
19132            DEVKIT=$depdir
19133            if test "x$theroot" != x; then
19134               DEVKIT="$theroot"
19135            fi
19136            if test "x$thecflags" != x; then
19137               DEVKIT_CFLAGS="$thecflags"
19138            fi
19139            if test "x$thelibs" != x; then
19140               DEVKIT_LIBS="$thelibs"
19141            fi
19142            # Found devkit
19143                     PATH="$DEVKIT/bin:$PATH"
19144                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
19145                     if test "x$x_includes" = "xNONE"; then
19146                         x_includes="$SYS_ROOT/usr/include/X11"
19147                     fi
19148                     if test "x$x_libraries" = "xNONE"; then
19149                         x_libraries="$SYS_ROOT/usr/lib"
19150                     fi
19151
19152
19153        fi
19154
19155    fi
19156
19157
19158# Store the CFLAGS etal passed to the configure script.
19159ORG_CFLAGS="$CFLAGS"
19160ORG_CXXFLAGS="$CXXFLAGS"
19161ORG_OBJCFLAGS="$OBJCFLAGS"
19162
19163# autoconf magic only relies on PATH, so update it if tools dir is specified
19164OLD_PATH="$PATH"
19165if test "x$TOOLS_DIR" != x; then
19166  PATH=$TOOLS_DIR:$PATH
19167fi
19168
19169
19170### Locate C compiler (CC)
19171
19172# On windows, only cl.exe is supported.
19173# On Solaris, cc is preferred to gcc.
19174# Elsewhere, gcc is preferred to cc.
19175
19176if test "x$CC" != x; then
19177  COMPILER_CHECK_LIST="$CC"
19178elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
19179  COMPILER_CHECK_LIST="cl"
19180elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
19181  COMPILER_CHECK_LIST="cc gcc"
19182elif test "x$OPENJDK_TARGET_OS" = "xaix"; then
19183  # Do not probe for cc on AIX.
19184  COMPILER_CHECK_LIST="xlc_r"
19185else
19186  COMPILER_CHECK_LIST="gcc cc"
19187fi
19188
19189
19190  COMPILER_NAME=C
19191
19192  CC=
19193  # If TOOLS_DIR is set, check for all compiler names in there first
19194  # before checking the rest of the PATH.
19195  if test -n "$TOOLS_DIR"; then
19196    PATH_save="$PATH"
19197    PATH="$TOOLS_DIR"
19198    for ac_prog in $COMPILER_CHECK_LIST
19199do
19200  # Extract the first word of "$ac_prog", so it can be a program name with args.
19201set dummy $ac_prog; ac_word=$2
19202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19203$as_echo_n "checking for $ac_word... " >&6; }
19204if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
19205  $as_echo_n "(cached) " >&6
19206else
19207  case $TOOLS_DIR_CC in
19208  [\\/]* | ?:[\\/]*)
19209  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
19210  ;;
19211  *)
19212  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19213for as_dir in $PATH
19214do
19215  IFS=$as_save_IFS
19216  test -z "$as_dir" && as_dir=.
19217    for ac_exec_ext in '' $ac_executable_extensions; do
19218  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19219    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
19220    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19221    break 2
19222  fi
19223done
19224  done
19225IFS=$as_save_IFS
19226
19227  ;;
19228esac
19229fi
19230TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
19231if test -n "$TOOLS_DIR_CC"; then
19232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
19233$as_echo "$TOOLS_DIR_CC" >&6; }
19234else
19235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19236$as_echo "no" >&6; }
19237fi
19238
19239
19240  test -n "$TOOLS_DIR_CC" && break
19241done
19242
19243    CC=$TOOLS_DIR_CC
19244    PATH="$PATH_save"
19245  fi
19246
19247  # AC_PATH_PROGS can't be run multiple times with the same variable,
19248  # so create a new name for this run.
19249  if test "x$CC" = x; then
19250    for ac_prog in $COMPILER_CHECK_LIST
19251do
19252  # Extract the first word of "$ac_prog", so it can be a program name with args.
19253set dummy $ac_prog; ac_word=$2
19254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19255$as_echo_n "checking for $ac_word... " >&6; }
19256if ${ac_cv_path_POTENTIAL_CC+:} false; then :
19257  $as_echo_n "(cached) " >&6
19258else
19259  case $POTENTIAL_CC in
19260  [\\/]* | ?:[\\/]*)
19261  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
19262  ;;
19263  *)
19264  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19265for as_dir in $PATH
19266do
19267  IFS=$as_save_IFS
19268  test -z "$as_dir" && as_dir=.
19269    for ac_exec_ext in '' $ac_executable_extensions; do
19270  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19271    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
19272    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19273    break 2
19274  fi
19275done
19276  done
19277IFS=$as_save_IFS
19278
19279  ;;
19280esac
19281fi
19282POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
19283if test -n "$POTENTIAL_CC"; then
19284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
19285$as_echo "$POTENTIAL_CC" >&6; }
19286else
19287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19288$as_echo "no" >&6; }
19289fi
19290
19291
19292  test -n "$POTENTIAL_CC" && break
19293done
19294
19295    CC=$POTENTIAL_CC
19296  fi
19297
19298  if test "x$CC" = x; then
19299
19300    # Print a helpful message on how to acquire the necessary build dependency.
19301    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
19302    MISSING_DEPENDENCY=devkit
19303    PKGHANDLER_COMMAND=
19304
19305    case $PKGHANDLER in
19306	apt-get)
19307                apt_help     $MISSING_DEPENDENCY ;;
19308	yum)
19309                yum_help     $MISSING_DEPENDENCY ;;
19310	port)
19311                port_help    $MISSING_DEPENDENCY ;;
19312	pkgutil)
19313                pkgutil_help $MISSING_DEPENDENCY ;;
19314	pkgadd)
19315                pkgadd_help  $MISSING_DEPENDENCY ;;
19316    esac
19317
19318    if test "x$PKGHANDLER_COMMAND" != x; then
19319        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19320    fi
19321
19322      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19323  fi
19324
19325  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19326
19327  # First separate the path from the arguments. This will split at the first
19328  # space.
19329  complete="$CC"
19330  path="${complete%% *}"
19331  tmp="$complete EOL"
19332  arguments="${tmp#* }"
19333
19334  # Input might be given as Windows format, start by converting to
19335  # unix format.
19336  new_path=`$CYGPATH -u "$path"`
19337
19338  # Now try to locate executable using which
19339  new_path=`$WHICH "$new_path" 2> /dev/null`
19340  # bat and cmd files are not always considered executable in cygwin causing which
19341  # to not find them
19342  if test "x$new_path" = x \
19343           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19344           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19345    new_path=`$CYGPATH -u "$path"`
19346  fi
19347  if test "x$new_path" = x; then
19348    # Oops. Which didn't find the executable.
19349    # The splitting of arguments from the executable at a space might have been incorrect,
19350    # since paths with space are more likely in Windows. Give it another try with the whole
19351    # argument.
19352    path="$complete"
19353    arguments="EOL"
19354    new_path=`$CYGPATH -u "$path"`
19355    new_path=`$WHICH "$new_path" 2> /dev/null`
19356    # bat and cmd files are not always considered executable in cygwin causing which
19357    # to not find them
19358    if test "x$new_path" = x \
19359             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19360             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19361      new_path=`$CYGPATH -u "$path"`
19362    fi
19363    if test "x$new_path" = x; then
19364      # It's still not found. Now this is an unrecoverable error.
19365      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19366$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19367      has_space=`$ECHO "$complete" | $GREP " "`
19368      if test "x$has_space" != x; then
19369        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19370$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19371      fi
19372      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19373    fi
19374  fi
19375
19376  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19377  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19378  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19379  # "foo.exe" is OK but "foo" is an error.
19380  #
19381  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19382  # It is also a way to make sure we got the proper file name for the real test later on.
19383  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19384  if test "x$test_shortpath" = x; then
19385    # Short path failed, file does not exist as specified.
19386    # Try adding .exe or .cmd
19387    if test -f "${new_path}.exe"; then
19388       input_to_shortpath="${new_path}.exe"
19389    elif test -f "${new_path}.cmd"; then
19390       input_to_shortpath="${new_path}.cmd"
19391    else
19392      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
19393$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
19394      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19395$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19396      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19397    fi
19398  else
19399    input_to_shortpath="$new_path"
19400  fi
19401
19402  # Call helper function which possibly converts this using DOS-style short mode.
19403  # If so, the updated path is stored in $new_path.
19404  new_path="$input_to_shortpath"
19405
19406  input_path="$input_to_shortpath"
19407  # Check if we need to convert this using DOS-style short mode. If the path
19408  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19409  # take no chances and rewrite it.
19410  # Note: m4 eats our [], so we need to use [ and ] instead.
19411  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19412  if test "x$has_forbidden_chars" != x; then
19413    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19414    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19415    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19416    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19417      # Going to short mode and back again did indeed matter. Since short mode is
19418      # case insensitive, let's make it lowercase to improve readability.
19419      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19420      # Now convert it back to Unix-stile (cygpath)
19421      input_path=`$CYGPATH -u "$shortmode_path"`
19422      new_path="$input_path"
19423    fi
19424  fi
19425
19426  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19427  if test "x$test_cygdrive_prefix" = x; then
19428    # As a simple fix, exclude /usr/bin since it's not a real path.
19429    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19430      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19431      # a path prefixed by /cygdrive for fixpath to work.
19432      new_path="$CYGWIN_ROOT_PATH$input_path"
19433    fi
19434  fi
19435
19436  # remove trailing .exe if any
19437  new_path="${new_path/%.exe/}"
19438
19439  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19440
19441  # First separate the path from the arguments. This will split at the first
19442  # space.
19443  complete="$CC"
19444  path="${complete%% *}"
19445  tmp="$complete EOL"
19446  arguments="${tmp#* }"
19447
19448  # Input might be given as Windows format, start by converting to
19449  # unix format.
19450  new_path="$path"
19451
19452  windows_path="$new_path"
19453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19454    unix_path=`$CYGPATH -u "$windows_path"`
19455    new_path="$unix_path"
19456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19457    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19458    new_path="$unix_path"
19459  fi
19460
19461
19462  # Now try to locate executable using which
19463  new_path=`$WHICH "$new_path" 2> /dev/null`
19464
19465  if test "x$new_path" = x; then
19466    # Oops. Which didn't find the executable.
19467    # The splitting of arguments from the executable at a space might have been incorrect,
19468    # since paths with space are more likely in Windows. Give it another try with the whole
19469    # argument.
19470    path="$complete"
19471    arguments="EOL"
19472    new_path="$path"
19473
19474  windows_path="$new_path"
19475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19476    unix_path=`$CYGPATH -u "$windows_path"`
19477    new_path="$unix_path"
19478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19479    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19480    new_path="$unix_path"
19481  fi
19482
19483
19484    new_path=`$WHICH "$new_path" 2> /dev/null`
19485
19486    if test "x$new_path" = x; then
19487      # It's still not found. Now this is an unrecoverable error.
19488      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19489$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19490      has_space=`$ECHO "$complete" | $GREP " "`
19491      if test "x$has_space" != x; then
19492        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19493$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19494      fi
19495      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19496    fi
19497  fi
19498
19499  # Now new_path has a complete unix path to the binary
19500  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19501    # Keep paths in /bin as-is, but remove trailing .exe if any
19502    new_path="${new_path/%.exe/}"
19503    # Do not save /bin paths to all_fixpath_prefixes!
19504  else
19505    # Not in mixed or Windows style, start by that.
19506    new_path=`cmd //c echo $new_path`
19507
19508  input_path="$new_path"
19509  # Check if we need to convert this using DOS-style short mode. If the path
19510  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19511  # take no chances and rewrite it.
19512  # Note: m4 eats our [], so we need to use [ and ] instead.
19513  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19514  if test "x$has_forbidden_chars" != x; then
19515    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19516    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19517  fi
19518
19519    # Output is in $new_path
19520
19521  windows_path="$new_path"
19522  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19523    unix_path=`$CYGPATH -u "$windows_path"`
19524    new_path="$unix_path"
19525  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19526    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19527    new_path="$unix_path"
19528  fi
19529
19530    # remove trailing .exe if any
19531    new_path="${new_path/%.exe/}"
19532
19533    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19534    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19535  fi
19536
19537  else
19538    # We're on a posix platform. Hooray! :)
19539    # First separate the path from the arguments. This will split at the first
19540    # space.
19541    complete="$CC"
19542    path="${complete%% *}"
19543    tmp="$complete EOL"
19544    arguments="${tmp#* }"
19545
19546    # Cannot rely on the command "which" here since it doesn't always work.
19547    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19548    if test -z "$is_absolute_path"; then
19549      # Path to executable is not absolute. Find it.
19550      IFS_save="$IFS"
19551      IFS=:
19552      for p in $PATH; do
19553        if test -f "$p/$path" && test -x "$p/$path"; then
19554          new_path="$p/$path"
19555          break
19556        fi
19557      done
19558      IFS="$IFS_save"
19559    else
19560      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
19561$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
19562      new_path="$path"
19563    fi
19564
19565    if test "x$new_path" = x; then
19566        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19567$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19568        has_space=`$ECHO "$complete" | $GREP " "`
19569        if test "x$has_space" != x; then
19570          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19571$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19572        fi
19573        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19574      fi
19575  fi
19576
19577      # Now join together the path and the arguments once again
19578      if test "x$arguments" != xEOL; then
19579        new_complete="$new_path ${arguments% *}"
19580      else
19581        new_complete="$new_path"
19582      fi
19583
19584  if test "x$complete" != "x$new_complete"; then
19585      CC="$new_complete"
19586      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
19587$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
19588    fi
19589
19590  TEST_COMPILER="$CC"
19591  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
19592  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
19593  if test "x$OPENJDK_BUILD_OS" != xaix; then
19594    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
19595$as_echo_n "checking resolved symbolic links for CC... " >&6; }
19596
19597    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19598        # Follow a chain of symbolic links. Use readlink
19599        # where it exists, else fall back to horribly
19600        # complicated shell code.
19601        if test "x$READLINK_TESTED" != yes; then
19602            # On MacOSX there is a readlink tool with a different
19603            # purpose than the GNU readlink tool. Check the found readlink.
19604            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19605            if test "x$ISGNU" = x; then
19606                 # A readlink that we do not know how to use.
19607                 # Are there other non-GNU readlinks out there?
19608                 READLINK_TESTED=yes
19609                 READLINK=
19610            fi
19611        fi
19612
19613        if test "x$READLINK" != x; then
19614            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19615        else
19616            # Save the current directory for restoring afterwards
19617            STARTDIR=$PWD
19618            COUNTER=0
19619            sym_link_dir=`$DIRNAME $TEST_COMPILER`
19620            sym_link_file=`$BASENAME $TEST_COMPILER`
19621            cd $sym_link_dir
19622            # Use -P flag to resolve symlinks in directories.
19623            cd `$THEPWDCMD -P`
19624            sym_link_dir=`$THEPWDCMD -P`
19625            # Resolve file symlinks
19626            while test $COUNTER -lt 20; do
19627                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19628                if test "x$ISLINK" == x; then
19629                    # This is not a symbolic link! We are done!
19630                    break
19631                fi
19632                # Again resolve directory symlinks since the target of the just found
19633                # link could be in a different directory
19634                cd `$DIRNAME $ISLINK`
19635                sym_link_dir=`$THEPWDCMD -P`
19636                sym_link_file=`$BASENAME $ISLINK`
19637                let COUNTER=COUNTER+1
19638            done
19639            cd $STARTDIR
19640            TEST_COMPILER=$sym_link_dir/$sym_link_file
19641        fi
19642    fi
19643
19644    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19645$as_echo "$TEST_COMPILER" >&6; }
19646  fi
19647  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19648$as_echo_n "checking if CC is disguised ccache... " >&6; }
19649
19650  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19651  if test "x$COMPILER_BASENAME" = "xccache"; then
19652    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19653$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19654    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19655    # We want to control ccache invocation ourselves, so ignore this cc and try
19656    # searching again.
19657
19658    # Remove the path to the fake ccache cc from the PATH
19659    RETRY_COMPILER_SAVED_PATH="$PATH"
19660    COMPILER_DIRNAME=`$DIRNAME $CC`
19661    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19662
19663    # Try again looking for our compiler
19664    if test -n "$ac_tool_prefix"; then
19665  for ac_prog in $COMPILER_CHECK_LIST
19666  do
19667    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19668set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19670$as_echo_n "checking for $ac_word... " >&6; }
19671if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
19672  $as_echo_n "(cached) " >&6
19673else
19674  if test -n "$PROPER_COMPILER_CC"; then
19675  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19676else
19677as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19678for as_dir in $PATH
19679do
19680  IFS=$as_save_IFS
19681  test -z "$as_dir" && as_dir=.
19682    for ac_exec_ext in '' $ac_executable_extensions; do
19683  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19684    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19685    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19686    break 2
19687  fi
19688done
19689  done
19690IFS=$as_save_IFS
19691
19692fi
19693fi
19694PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19695if test -n "$PROPER_COMPILER_CC"; then
19696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19697$as_echo "$PROPER_COMPILER_CC" >&6; }
19698else
19699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19700$as_echo "no" >&6; }
19701fi
19702
19703
19704    test -n "$PROPER_COMPILER_CC" && break
19705  done
19706fi
19707if test -z "$PROPER_COMPILER_CC"; then
19708  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19709  for ac_prog in $COMPILER_CHECK_LIST
19710do
19711  # Extract the first word of "$ac_prog", so it can be a program name with args.
19712set dummy $ac_prog; ac_word=$2
19713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19714$as_echo_n "checking for $ac_word... " >&6; }
19715if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
19716  $as_echo_n "(cached) " >&6
19717else
19718  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19719  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19720else
19721as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19722for as_dir in $PATH
19723do
19724  IFS=$as_save_IFS
19725  test -z "$as_dir" && as_dir=.
19726    for ac_exec_ext in '' $ac_executable_extensions; do
19727  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19728    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19729    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19730    break 2
19731  fi
19732done
19733  done
19734IFS=$as_save_IFS
19735
19736fi
19737fi
19738ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19739if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19741$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19742else
19743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19744$as_echo "no" >&6; }
19745fi
19746
19747
19748  test -n "$ac_ct_PROPER_COMPILER_CC" && break
19749done
19750
19751  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19752    PROPER_COMPILER_CC=""
19753  else
19754    case $cross_compiling:$ac_tool_warned in
19755yes:)
19756{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19757$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19758ac_tool_warned=yes ;;
19759esac
19760    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19761  fi
19762fi
19763
19764
19765  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19766
19767  # First separate the path from the arguments. This will split at the first
19768  # space.
19769  complete="$PROPER_COMPILER_CC"
19770  path="${complete%% *}"
19771  tmp="$complete EOL"
19772  arguments="${tmp#* }"
19773
19774  # Input might be given as Windows format, start by converting to
19775  # unix format.
19776  new_path=`$CYGPATH -u "$path"`
19777
19778  # Now try to locate executable using which
19779  new_path=`$WHICH "$new_path" 2> /dev/null`
19780  # bat and cmd files are not always considered executable in cygwin causing which
19781  # to not find them
19782  if test "x$new_path" = x \
19783           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19784           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19785    new_path=`$CYGPATH -u "$path"`
19786  fi
19787  if test "x$new_path" = x; then
19788    # Oops. Which didn't find the executable.
19789    # The splitting of arguments from the executable at a space might have been incorrect,
19790    # since paths with space are more likely in Windows. Give it another try with the whole
19791    # argument.
19792    path="$complete"
19793    arguments="EOL"
19794    new_path=`$CYGPATH -u "$path"`
19795    new_path=`$WHICH "$new_path" 2> /dev/null`
19796    # bat and cmd files are not always considered executable in cygwin causing which
19797    # to not find them
19798    if test "x$new_path" = x \
19799             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19800             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19801      new_path=`$CYGPATH -u "$path"`
19802    fi
19803    if test "x$new_path" = x; then
19804      # It's still not found. Now this is an unrecoverable error.
19805      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19806$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19807      has_space=`$ECHO "$complete" | $GREP " "`
19808      if test "x$has_space" != x; then
19809        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19810$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19811      fi
19812      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19813    fi
19814  fi
19815
19816  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19817  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19818  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19819  # "foo.exe" is OK but "foo" is an error.
19820  #
19821  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19822  # It is also a way to make sure we got the proper file name for the real test later on.
19823  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19824  if test "x$test_shortpath" = x; then
19825    # Short path failed, file does not exist as specified.
19826    # Try adding .exe or .cmd
19827    if test -f "${new_path}.exe"; then
19828       input_to_shortpath="${new_path}.exe"
19829    elif test -f "${new_path}.cmd"; then
19830       input_to_shortpath="${new_path}.cmd"
19831    else
19832      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
19833$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
19834      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19835$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19836      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19837    fi
19838  else
19839    input_to_shortpath="$new_path"
19840  fi
19841
19842  # Call helper function which possibly converts this using DOS-style short mode.
19843  # If so, the updated path is stored in $new_path.
19844  new_path="$input_to_shortpath"
19845
19846  input_path="$input_to_shortpath"
19847  # Check if we need to convert this using DOS-style short mode. If the path
19848  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19849  # take no chances and rewrite it.
19850  # Note: m4 eats our [], so we need to use [ and ] instead.
19851  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19852  if test "x$has_forbidden_chars" != x; then
19853    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19854    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19855    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19856    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19857      # Going to short mode and back again did indeed matter. Since short mode is
19858      # case insensitive, let's make it lowercase to improve readability.
19859      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19860      # Now convert it back to Unix-stile (cygpath)
19861      input_path=`$CYGPATH -u "$shortmode_path"`
19862      new_path="$input_path"
19863    fi
19864  fi
19865
19866  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19867  if test "x$test_cygdrive_prefix" = x; then
19868    # As a simple fix, exclude /usr/bin since it's not a real path.
19869    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19870      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19871      # a path prefixed by /cygdrive for fixpath to work.
19872      new_path="$CYGWIN_ROOT_PATH$input_path"
19873    fi
19874  fi
19875
19876  # remove trailing .exe if any
19877  new_path="${new_path/%.exe/}"
19878
19879  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19880
19881  # First separate the path from the arguments. This will split at the first
19882  # space.
19883  complete="$PROPER_COMPILER_CC"
19884  path="${complete%% *}"
19885  tmp="$complete EOL"
19886  arguments="${tmp#* }"
19887
19888  # Input might be given as Windows format, start by converting to
19889  # unix format.
19890  new_path="$path"
19891
19892  windows_path="$new_path"
19893  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19894    unix_path=`$CYGPATH -u "$windows_path"`
19895    new_path="$unix_path"
19896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19897    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19898    new_path="$unix_path"
19899  fi
19900
19901
19902  # Now try to locate executable using which
19903  new_path=`$WHICH "$new_path" 2> /dev/null`
19904
19905  if test "x$new_path" = x; then
19906    # Oops. Which didn't find the executable.
19907    # The splitting of arguments from the executable at a space might have been incorrect,
19908    # since paths with space are more likely in Windows. Give it another try with the whole
19909    # argument.
19910    path="$complete"
19911    arguments="EOL"
19912    new_path="$path"
19913
19914  windows_path="$new_path"
19915  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19916    unix_path=`$CYGPATH -u "$windows_path"`
19917    new_path="$unix_path"
19918  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19919    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19920    new_path="$unix_path"
19921  fi
19922
19923
19924    new_path=`$WHICH "$new_path" 2> /dev/null`
19925
19926    if test "x$new_path" = x; then
19927      # It's still not found. Now this is an unrecoverable error.
19928      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19929$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19930      has_space=`$ECHO "$complete" | $GREP " "`
19931      if test "x$has_space" != x; then
19932        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19933$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19934      fi
19935      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19936    fi
19937  fi
19938
19939  # Now new_path has a complete unix path to the binary
19940  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19941    # Keep paths in /bin as-is, but remove trailing .exe if any
19942    new_path="${new_path/%.exe/}"
19943    # Do not save /bin paths to all_fixpath_prefixes!
19944  else
19945    # Not in mixed or Windows style, start by that.
19946    new_path=`cmd //c echo $new_path`
19947
19948  input_path="$new_path"
19949  # Check if we need to convert this using DOS-style short mode. If the path
19950  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19951  # take no chances and rewrite it.
19952  # Note: m4 eats our [], so we need to use [ and ] instead.
19953  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19954  if test "x$has_forbidden_chars" != x; then
19955    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19956    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19957  fi
19958
19959    # Output is in $new_path
19960
19961  windows_path="$new_path"
19962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19963    unix_path=`$CYGPATH -u "$windows_path"`
19964    new_path="$unix_path"
19965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19966    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19967    new_path="$unix_path"
19968  fi
19969
19970    # remove trailing .exe if any
19971    new_path="${new_path/%.exe/}"
19972
19973    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19974    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19975  fi
19976
19977  else
19978    # We're on a posix platform. Hooray! :)
19979    # First separate the path from the arguments. This will split at the first
19980    # space.
19981    complete="$PROPER_COMPILER_CC"
19982    path="${complete%% *}"
19983    tmp="$complete EOL"
19984    arguments="${tmp#* }"
19985
19986    # Cannot rely on the command "which" here since it doesn't always work.
19987    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19988    if test -z "$is_absolute_path"; then
19989      # Path to executable is not absolute. Find it.
19990      IFS_save="$IFS"
19991      IFS=:
19992      for p in $PATH; do
19993        if test -f "$p/$path" && test -x "$p/$path"; then
19994          new_path="$p/$path"
19995          break
19996        fi
19997      done
19998      IFS="$IFS_save"
19999    else
20000      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
20001$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
20002      new_path="$path"
20003    fi
20004
20005    if test "x$new_path" = x; then
20006        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
20007$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
20008        has_space=`$ECHO "$complete" | $GREP " "`
20009        if test "x$has_space" != x; then
20010          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20011$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20012        fi
20013        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
20014      fi
20015  fi
20016
20017      # Now join together the path and the arguments once again
20018      if test "x$arguments" != xEOL; then
20019        new_complete="$new_path ${arguments% *}"
20020      else
20021        new_complete="$new_path"
20022      fi
20023
20024  if test "x$complete" != "x$new_complete"; then
20025      PROPER_COMPILER_CC="$new_complete"
20026      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
20027$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
20028    fi
20029
20030    PATH="$RETRY_COMPILER_SAVED_PATH"
20031
20032    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
20033$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
20034
20035    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20036        # Follow a chain of symbolic links. Use readlink
20037        # where it exists, else fall back to horribly
20038        # complicated shell code.
20039        if test "x$READLINK_TESTED" != yes; then
20040            # On MacOSX there is a readlink tool with a different
20041            # purpose than the GNU readlink tool. Check the found readlink.
20042            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20043            if test "x$ISGNU" = x; then
20044                 # A readlink that we do not know how to use.
20045                 # Are there other non-GNU readlinks out there?
20046                 READLINK_TESTED=yes
20047                 READLINK=
20048            fi
20049        fi
20050
20051        if test "x$READLINK" != x; then
20052            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
20053        else
20054            # Save the current directory for restoring afterwards
20055            STARTDIR=$PWD
20056            COUNTER=0
20057            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
20058            sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
20059            cd $sym_link_dir
20060            # Use -P flag to resolve symlinks in directories.
20061            cd `$THEPWDCMD -P`
20062            sym_link_dir=`$THEPWDCMD -P`
20063            # Resolve file symlinks
20064            while test $COUNTER -lt 20; do
20065                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20066                if test "x$ISLINK" == x; then
20067                    # This is not a symbolic link! We are done!
20068                    break
20069                fi
20070                # Again resolve directory symlinks since the target of the just found
20071                # link could be in a different directory
20072                cd `$DIRNAME $ISLINK`
20073                sym_link_dir=`$THEPWDCMD -P`
20074                sym_link_file=`$BASENAME $ISLINK`
20075                let COUNTER=COUNTER+1
20076            done
20077            cd $STARTDIR
20078            PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
20079        fi
20080    fi
20081
20082    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
20083$as_echo "$PROPER_COMPILER_CC" >&6; }
20084    CC="$PROPER_COMPILER_CC"
20085  else
20086    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
20087$as_echo "no, keeping CC" >&6; }
20088    CC="$TEST_COMPILER"
20089  fi
20090
20091  COMPILER=$CC
20092  COMPILER_NAME=$COMPILER_NAME
20093
20094  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
20095    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
20096    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
20097    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
20098    if test $? -ne 0; then
20099      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20100
20101      { $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
20102$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
20103      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
20104$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
20105      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20106    else
20107      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
20108      COMPILER_VENDOR="Sun Studio"
20109    fi
20110  elif test  "x$OPENJDK_TARGET_OS" = xaix; then
20111      COMPILER_VERSION_TEST=`$COMPILER -qversion  2>&1 | $TAIL -n 1`
20112      $ECHO $COMPILER_VERSION_TEST | $GREP "^Version: " > /dev/null
20113      if test $? -ne 0; then
20114        as_fn_error $? "Failed to detect the compiler version of $COMPILER ...." "$LINENO" 5
20115      else
20116        COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n 's/Version: \(0-90-9\.0-90-9*\).*/\1/p'`
20117        COMPILER_VENDOR='IBM'
20118      fi
20119  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
20120    # First line typically looks something like:
20121    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
20122    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
20123    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
20124    COMPILER_VENDOR="Microsoft CL.EXE"
20125    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
20126    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
20127      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
20128        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
20129      fi
20130    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
20131      if test "x$COMPILER_CPU_TEST" != "xx64"; then
20132        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
20133      fi
20134    fi
20135  else
20136    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20137    # Check that this is likely to be GCC.
20138    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
20139    if test $? -ne 0; then
20140      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
20141$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
20142      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
20143$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
20144      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20145    fi
20146
20147    # First line typically looks something like:
20148    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
20149    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
20150    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
20151  fi
20152  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
20153  CC_VERSION="$COMPILER_VERSION"
20154  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
20155  CC_VENDOR="$COMPILER_VENDOR"
20156
20157  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
20158$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
20159
20160
20161# Now that we have resolved CC ourself, let autoconf have its go at it
20162ac_ext=c
20163ac_cpp='$CPP $CPPFLAGS'
20164ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20165ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20166ac_compiler_gnu=$ac_cv_c_compiler_gnu
20167if test -n "$ac_tool_prefix"; then
20168  for ac_prog in $CC
20169  do
20170    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20171set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20173$as_echo_n "checking for $ac_word... " >&6; }
20174if ${ac_cv_prog_CC+:} false; then :
20175  $as_echo_n "(cached) " >&6
20176else
20177  if test -n "$CC"; then
20178  ac_cv_prog_CC="$CC" # Let the user override the test.
20179else
20180as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20181for as_dir in $PATH
20182do
20183  IFS=$as_save_IFS
20184  test -z "$as_dir" && as_dir=.
20185    for ac_exec_ext in '' $ac_executable_extensions; do
20186  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20187    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
20188    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20189    break 2
20190  fi
20191done
20192  done
20193IFS=$as_save_IFS
20194
20195fi
20196fi
20197CC=$ac_cv_prog_CC
20198if test -n "$CC"; then
20199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
20200$as_echo "$CC" >&6; }
20201else
20202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20203$as_echo "no" >&6; }
20204fi
20205
20206
20207    test -n "$CC" && break
20208  done
20209fi
20210if test -z "$CC"; then
20211  ac_ct_CC=$CC
20212  for ac_prog in $CC
20213do
20214  # Extract the first word of "$ac_prog", so it can be a program name with args.
20215set dummy $ac_prog; ac_word=$2
20216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20217$as_echo_n "checking for $ac_word... " >&6; }
20218if ${ac_cv_prog_ac_ct_CC+:} false; then :
20219  $as_echo_n "(cached) " >&6
20220else
20221  if test -n "$ac_ct_CC"; then
20222  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
20223else
20224as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20225for as_dir in $PATH
20226do
20227  IFS=$as_save_IFS
20228  test -z "$as_dir" && as_dir=.
20229    for ac_exec_ext in '' $ac_executable_extensions; do
20230  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20231    ac_cv_prog_ac_ct_CC="$ac_prog"
20232    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20233    break 2
20234  fi
20235done
20236  done
20237IFS=$as_save_IFS
20238
20239fi
20240fi
20241ac_ct_CC=$ac_cv_prog_ac_ct_CC
20242if test -n "$ac_ct_CC"; then
20243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
20244$as_echo "$ac_ct_CC" >&6; }
20245else
20246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20247$as_echo "no" >&6; }
20248fi
20249
20250
20251  test -n "$ac_ct_CC" && break
20252done
20253
20254  if test "x$ac_ct_CC" = x; then
20255    CC=""
20256  else
20257    case $cross_compiling:$ac_tool_warned in
20258yes:)
20259{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20260$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20261ac_tool_warned=yes ;;
20262esac
20263    CC=$ac_ct_CC
20264  fi
20265fi
20266
20267
20268test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20269$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20270as_fn_error $? "no acceptable C compiler found in \$PATH
20271See \`config.log' for more details" "$LINENO" 5; }
20272
20273# Provide some information about the compiler.
20274$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
20275set X $ac_compile
20276ac_compiler=$2
20277for ac_option in --version -v -V -qversion; do
20278  { { ac_try="$ac_compiler $ac_option >&5"
20279case "(($ac_try" in
20280  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20281  *) ac_try_echo=$ac_try;;
20282esac
20283eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20284$as_echo "$ac_try_echo"; } >&5
20285  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20286  ac_status=$?
20287  if test -s conftest.err; then
20288    sed '10a\
20289... rest of stderr output deleted ...
20290         10q' conftest.err >conftest.er1
20291    cat conftest.er1 >&5
20292  fi
20293  rm -f conftest.er1 conftest.err
20294  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20295  test $ac_status = 0; }
20296done
20297
20298cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20299/* end confdefs.h.  */
20300
20301int
20302main ()
20303{
20304
20305  ;
20306  return 0;
20307}
20308_ACEOF
20309ac_clean_files_save=$ac_clean_files
20310ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
20311# Try to create an executable without -o first, disregard a.out.
20312# It will help us diagnose broken compilers, and finding out an intuition
20313# of exeext.
20314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
20315$as_echo_n "checking whether the C compiler works... " >&6; }
20316ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
20317
20318# The possible output files:
20319ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
20320
20321ac_rmfiles=
20322for ac_file in $ac_files
20323do
20324  case $ac_file in
20325    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20326    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
20327  esac
20328done
20329rm -f $ac_rmfiles
20330
20331if { { ac_try="$ac_link_default"
20332case "(($ac_try" in
20333  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20334  *) ac_try_echo=$ac_try;;
20335esac
20336eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20337$as_echo "$ac_try_echo"; } >&5
20338  (eval "$ac_link_default") 2>&5
20339  ac_status=$?
20340  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20341  test $ac_status = 0; }; then :
20342  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
20343# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
20344# in a Makefile.  We should not override ac_cv_exeext if it was cached,
20345# so that the user can short-circuit this test for compilers unknown to
20346# Autoconf.
20347for ac_file in $ac_files ''
20348do
20349  test -f "$ac_file" || continue
20350  case $ac_file in
20351    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
20352	;;
20353    [ab].out )
20354	# We found the default executable, but exeext='' is most
20355	# certainly right.
20356	break;;
20357    *.* )
20358	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
20359	then :; else
20360	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20361	fi
20362	# We set ac_cv_exeext here because the later test for it is not
20363	# safe: cross compilers may not add the suffix if given an `-o'
20364	# argument, so we may need to know it at that point already.
20365	# Even if this section looks crufty: it has the advantage of
20366	# actually working.
20367	break;;
20368    * )
20369	break;;
20370  esac
20371done
20372test "$ac_cv_exeext" = no && ac_cv_exeext=
20373
20374else
20375  ac_file=''
20376fi
20377if test -z "$ac_file"; then :
20378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20379$as_echo "no" >&6; }
20380$as_echo "$as_me: failed program was:" >&5
20381sed 's/^/| /' conftest.$ac_ext >&5
20382
20383{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20384$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20385as_fn_error 77 "C compiler cannot create executables
20386See \`config.log' for more details" "$LINENO" 5; }
20387else
20388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20389$as_echo "yes" >&6; }
20390fi
20391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
20392$as_echo_n "checking for C compiler default output file name... " >&6; }
20393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
20394$as_echo "$ac_file" >&6; }
20395ac_exeext=$ac_cv_exeext
20396
20397rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
20398ac_clean_files=$ac_clean_files_save
20399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
20400$as_echo_n "checking for suffix of executables... " >&6; }
20401if { { ac_try="$ac_link"
20402case "(($ac_try" in
20403  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20404  *) ac_try_echo=$ac_try;;
20405esac
20406eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20407$as_echo "$ac_try_echo"; } >&5
20408  (eval "$ac_link") 2>&5
20409  ac_status=$?
20410  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20411  test $ac_status = 0; }; then :
20412  # If both `conftest.exe' and `conftest' are `present' (well, observable)
20413# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
20414# work properly (i.e., refer to `conftest.exe'), while it won't with
20415# `rm'.
20416for ac_file in conftest.exe conftest conftest.*; do
20417  test -f "$ac_file" || continue
20418  case $ac_file in
20419    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20420    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20421	  break;;
20422    * ) break;;
20423  esac
20424done
20425else
20426  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20427$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20428as_fn_error $? "cannot compute suffix of executables: cannot compile and link
20429See \`config.log' for more details" "$LINENO" 5; }
20430fi
20431rm -f conftest conftest$ac_cv_exeext
20432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
20433$as_echo "$ac_cv_exeext" >&6; }
20434
20435rm -f conftest.$ac_ext
20436EXEEXT=$ac_cv_exeext
20437ac_exeext=$EXEEXT
20438cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20439/* end confdefs.h.  */
20440#include <stdio.h>
20441int
20442main ()
20443{
20444FILE *f = fopen ("conftest.out", "w");
20445 return ferror (f) || fclose (f) != 0;
20446
20447  ;
20448  return 0;
20449}
20450_ACEOF
20451ac_clean_files="$ac_clean_files conftest.out"
20452# Check that the compiler produces executables we can run.  If not, either
20453# the compiler is broken, or we cross compile.
20454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
20455$as_echo_n "checking whether we are cross compiling... " >&6; }
20456if test "$cross_compiling" != yes; then
20457  { { ac_try="$ac_link"
20458case "(($ac_try" in
20459  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20460  *) ac_try_echo=$ac_try;;
20461esac
20462eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20463$as_echo "$ac_try_echo"; } >&5
20464  (eval "$ac_link") 2>&5
20465  ac_status=$?
20466  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20467  test $ac_status = 0; }
20468  if { ac_try='./conftest$ac_cv_exeext'
20469  { { case "(($ac_try" in
20470  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20471  *) ac_try_echo=$ac_try;;
20472esac
20473eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20474$as_echo "$ac_try_echo"; } >&5
20475  (eval "$ac_try") 2>&5
20476  ac_status=$?
20477  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20478  test $ac_status = 0; }; }; then
20479    cross_compiling=no
20480  else
20481    if test "$cross_compiling" = maybe; then
20482	cross_compiling=yes
20483    else
20484	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20485$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20486as_fn_error $? "cannot run C compiled programs.
20487If you meant to cross compile, use \`--host'.
20488See \`config.log' for more details" "$LINENO" 5; }
20489    fi
20490  fi
20491fi
20492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
20493$as_echo "$cross_compiling" >&6; }
20494
20495rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
20496ac_clean_files=$ac_clean_files_save
20497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
20498$as_echo_n "checking for suffix of object files... " >&6; }
20499if ${ac_cv_objext+:} false; then :
20500  $as_echo_n "(cached) " >&6
20501else
20502  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20503/* end confdefs.h.  */
20504
20505int
20506main ()
20507{
20508
20509  ;
20510  return 0;
20511}
20512_ACEOF
20513rm -f conftest.o conftest.obj
20514if { { ac_try="$ac_compile"
20515case "(($ac_try" in
20516  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20517  *) ac_try_echo=$ac_try;;
20518esac
20519eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20520$as_echo "$ac_try_echo"; } >&5
20521  (eval "$ac_compile") 2>&5
20522  ac_status=$?
20523  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20524  test $ac_status = 0; }; then :
20525  for ac_file in conftest.o conftest.obj conftest.*; do
20526  test -f "$ac_file" || continue;
20527  case $ac_file in
20528    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
20529    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
20530       break;;
20531  esac
20532done
20533else
20534  $as_echo "$as_me: failed program was:" >&5
20535sed 's/^/| /' conftest.$ac_ext >&5
20536
20537{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20538$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20539as_fn_error $? "cannot compute suffix of object files: cannot compile
20540See \`config.log' for more details" "$LINENO" 5; }
20541fi
20542rm -f conftest.$ac_cv_objext conftest.$ac_ext
20543fi
20544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
20545$as_echo "$ac_cv_objext" >&6; }
20546OBJEXT=$ac_cv_objext
20547ac_objext=$OBJEXT
20548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
20549$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
20550if ${ac_cv_c_compiler_gnu+:} false; then :
20551  $as_echo_n "(cached) " >&6
20552else
20553  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20554/* end confdefs.h.  */
20555
20556int
20557main ()
20558{
20559#ifndef __GNUC__
20560       choke me
20561#endif
20562
20563  ;
20564  return 0;
20565}
20566_ACEOF
20567if ac_fn_c_try_compile "$LINENO"; then :
20568  ac_compiler_gnu=yes
20569else
20570  ac_compiler_gnu=no
20571fi
20572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20573ac_cv_c_compiler_gnu=$ac_compiler_gnu
20574
20575fi
20576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
20577$as_echo "$ac_cv_c_compiler_gnu" >&6; }
20578if test $ac_compiler_gnu = yes; then
20579  GCC=yes
20580else
20581  GCC=
20582fi
20583ac_test_CFLAGS=${CFLAGS+set}
20584ac_save_CFLAGS=$CFLAGS
20585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
20586$as_echo_n "checking whether $CC accepts -g... " >&6; }
20587if ${ac_cv_prog_cc_g+:} false; then :
20588  $as_echo_n "(cached) " >&6
20589else
20590  ac_save_c_werror_flag=$ac_c_werror_flag
20591   ac_c_werror_flag=yes
20592   ac_cv_prog_cc_g=no
20593   CFLAGS="-g"
20594   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20595/* end confdefs.h.  */
20596
20597int
20598main ()
20599{
20600
20601  ;
20602  return 0;
20603}
20604_ACEOF
20605if ac_fn_c_try_compile "$LINENO"; then :
20606  ac_cv_prog_cc_g=yes
20607else
20608  CFLAGS=""
20609      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20610/* end confdefs.h.  */
20611
20612int
20613main ()
20614{
20615
20616  ;
20617  return 0;
20618}
20619_ACEOF
20620if ac_fn_c_try_compile "$LINENO"; then :
20621
20622else
20623  ac_c_werror_flag=$ac_save_c_werror_flag
20624	 CFLAGS="-g"
20625	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20626/* end confdefs.h.  */
20627
20628int
20629main ()
20630{
20631
20632  ;
20633  return 0;
20634}
20635_ACEOF
20636if ac_fn_c_try_compile "$LINENO"; then :
20637  ac_cv_prog_cc_g=yes
20638fi
20639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20640fi
20641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20642fi
20643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20644   ac_c_werror_flag=$ac_save_c_werror_flag
20645fi
20646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20647$as_echo "$ac_cv_prog_cc_g" >&6; }
20648if test "$ac_test_CFLAGS" = set; then
20649  CFLAGS=$ac_save_CFLAGS
20650elif test $ac_cv_prog_cc_g = yes; then
20651  if test "$GCC" = yes; then
20652    CFLAGS="-g -O2"
20653  else
20654    CFLAGS="-g"
20655  fi
20656else
20657  if test "$GCC" = yes; then
20658    CFLAGS="-O2"
20659  else
20660    CFLAGS=
20661  fi
20662fi
20663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20664$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20665if ${ac_cv_prog_cc_c89+:} false; then :
20666  $as_echo_n "(cached) " >&6
20667else
20668  ac_cv_prog_cc_c89=no
20669ac_save_CC=$CC
20670cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20671/* end confdefs.h.  */
20672#include <stdarg.h>
20673#include <stdio.h>
20674struct stat;
20675/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20676struct buf { int x; };
20677FILE * (*rcsopen) (struct buf *, struct stat *, int);
20678static char *e (p, i)
20679     char **p;
20680     int i;
20681{
20682  return p[i];
20683}
20684static char *f (char * (*g) (char **, int), char **p, ...)
20685{
20686  char *s;
20687  va_list v;
20688  va_start (v,p);
20689  s = g (p, va_arg (v,int));
20690  va_end (v);
20691  return s;
20692}
20693
20694/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20695   function prototypes and stuff, but not '\xHH' hex character constants.
20696   These don't provoke an error unfortunately, instead are silently treated
20697   as 'x'.  The following induces an error, until -std is added to get
20698   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20699   array size at least.  It's necessary to write '\x00'==0 to get something
20700   that's true only with -std.  */
20701int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20702
20703/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20704   inside strings and character constants.  */
20705#define FOO(x) 'x'
20706int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20707
20708int test (int i, double x);
20709struct s1 {int (*f) (int a);};
20710struct s2 {int (*f) (double a);};
20711int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20712int argc;
20713char **argv;
20714int
20715main ()
20716{
20717return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20718  ;
20719  return 0;
20720}
20721_ACEOF
20722for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20723	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20724do
20725  CC="$ac_save_CC $ac_arg"
20726  if ac_fn_c_try_compile "$LINENO"; then :
20727  ac_cv_prog_cc_c89=$ac_arg
20728fi
20729rm -f core conftest.err conftest.$ac_objext
20730  test "x$ac_cv_prog_cc_c89" != "xno" && break
20731done
20732rm -f conftest.$ac_ext
20733CC=$ac_save_CC
20734
20735fi
20736# AC_CACHE_VAL
20737case "x$ac_cv_prog_cc_c89" in
20738  x)
20739    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20740$as_echo "none needed" >&6; } ;;
20741  xno)
20742    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20743$as_echo "unsupported" >&6; } ;;
20744  *)
20745    CC="$CC $ac_cv_prog_cc_c89"
20746    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20747$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20748esac
20749if test "x$ac_cv_prog_cc_c89" != xno; then :
20750
20751fi
20752
20753ac_ext=cpp
20754ac_cpp='$CXXCPP $CPPFLAGS'
20755ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20756ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20757ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20758
20759
20760# Option used to tell the compiler whether to create 32- or 64-bit executables
20761# Notice that CC contains the full compiler path at this point.
20762case $CC in
20763  *xlc_r) COMPILER_TARGET_BITS_FLAG="-q";;
20764  *)      COMPILER_TARGET_BITS_FLAG="-m";;
20765esac
20766
20767
20768### Locate C++ compiler (CXX)
20769
20770if test "x$CXX" != x; then
20771  COMPILER_CHECK_LIST="$CXX"
20772elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20773  COMPILER_CHECK_LIST="cl"
20774elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20775  COMPILER_CHECK_LIST="CC g++"
20776elif test "x$OPENJDK_TARGET_OS" = "xaix"; then
20777  # Do not probe for CC on AIX .
20778  COMPILER_CHECK_LIST="xlC_r"
20779else
20780  COMPILER_CHECK_LIST="g++ CC"
20781fi
20782
20783
20784  COMPILER_NAME=C++
20785
20786  CXX=
20787  # If TOOLS_DIR is set, check for all compiler names in there first
20788  # before checking the rest of the PATH.
20789  if test -n "$TOOLS_DIR"; then
20790    PATH_save="$PATH"
20791    PATH="$TOOLS_DIR"
20792    for ac_prog in $COMPILER_CHECK_LIST
20793do
20794  # Extract the first word of "$ac_prog", so it can be a program name with args.
20795set dummy $ac_prog; ac_word=$2
20796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20797$as_echo_n "checking for $ac_word... " >&6; }
20798if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
20799  $as_echo_n "(cached) " >&6
20800else
20801  case $TOOLS_DIR_CXX in
20802  [\\/]* | ?:[\\/]*)
20803  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20804  ;;
20805  *)
20806  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20807for as_dir in $PATH
20808do
20809  IFS=$as_save_IFS
20810  test -z "$as_dir" && as_dir=.
20811    for ac_exec_ext in '' $ac_executable_extensions; do
20812  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20813    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20814    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20815    break 2
20816  fi
20817done
20818  done
20819IFS=$as_save_IFS
20820
20821  ;;
20822esac
20823fi
20824TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
20825if test -n "$TOOLS_DIR_CXX"; then
20826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
20827$as_echo "$TOOLS_DIR_CXX" >&6; }
20828else
20829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20830$as_echo "no" >&6; }
20831fi
20832
20833
20834  test -n "$TOOLS_DIR_CXX" && break
20835done
20836
20837    CXX=$TOOLS_DIR_CXX
20838    PATH="$PATH_save"
20839  fi
20840
20841  # AC_PATH_PROGS can't be run multiple times with the same variable,
20842  # so create a new name for this run.
20843  if test "x$CXX" = x; then
20844    for ac_prog in $COMPILER_CHECK_LIST
20845do
20846  # Extract the first word of "$ac_prog", so it can be a program name with args.
20847set dummy $ac_prog; ac_word=$2
20848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20849$as_echo_n "checking for $ac_word... " >&6; }
20850if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
20851  $as_echo_n "(cached) " >&6
20852else
20853  case $POTENTIAL_CXX in
20854  [\\/]* | ?:[\\/]*)
20855  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20856  ;;
20857  *)
20858  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20859for as_dir in $PATH
20860do
20861  IFS=$as_save_IFS
20862  test -z "$as_dir" && as_dir=.
20863    for ac_exec_ext in '' $ac_executable_extensions; do
20864  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20865    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20866    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20867    break 2
20868  fi
20869done
20870  done
20871IFS=$as_save_IFS
20872
20873  ;;
20874esac
20875fi
20876POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20877if test -n "$POTENTIAL_CXX"; then
20878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20879$as_echo "$POTENTIAL_CXX" >&6; }
20880else
20881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20882$as_echo "no" >&6; }
20883fi
20884
20885
20886  test -n "$POTENTIAL_CXX" && break
20887done
20888
20889    CXX=$POTENTIAL_CXX
20890  fi
20891
20892  if test "x$CXX" = x; then
20893
20894    # Print a helpful message on how to acquire the necessary build dependency.
20895    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
20896    MISSING_DEPENDENCY=devkit
20897    PKGHANDLER_COMMAND=
20898
20899    case $PKGHANDLER in
20900	apt-get)
20901                apt_help     $MISSING_DEPENDENCY ;;
20902	yum)
20903                yum_help     $MISSING_DEPENDENCY ;;
20904	port)
20905                port_help    $MISSING_DEPENDENCY ;;
20906	pkgutil)
20907                pkgutil_help $MISSING_DEPENDENCY ;;
20908	pkgadd)
20909                pkgadd_help  $MISSING_DEPENDENCY ;;
20910    esac
20911
20912    if test "x$PKGHANDLER_COMMAND" != x; then
20913        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
20914    fi
20915
20916      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
20917  fi
20918
20919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20920
20921  # First separate the path from the arguments. This will split at the first
20922  # space.
20923  complete="$CXX"
20924  path="${complete%% *}"
20925  tmp="$complete EOL"
20926  arguments="${tmp#* }"
20927
20928  # Input might be given as Windows format, start by converting to
20929  # unix format.
20930  new_path=`$CYGPATH -u "$path"`
20931
20932  # Now try to locate executable using which
20933  new_path=`$WHICH "$new_path" 2> /dev/null`
20934  # bat and cmd files are not always considered executable in cygwin causing which
20935  # to not find them
20936  if test "x$new_path" = x \
20937           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20938           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20939    new_path=`$CYGPATH -u "$path"`
20940  fi
20941  if test "x$new_path" = x; then
20942    # Oops. Which didn't find the executable.
20943    # The splitting of arguments from the executable at a space might have been incorrect,
20944    # since paths with space are more likely in Windows. Give it another try with the whole
20945    # argument.
20946    path="$complete"
20947    arguments="EOL"
20948    new_path=`$CYGPATH -u "$path"`
20949    new_path=`$WHICH "$new_path" 2> /dev/null`
20950    # bat and cmd files are not always considered executable in cygwin causing which
20951    # to not find them
20952    if test "x$new_path" = x \
20953             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20954             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20955      new_path=`$CYGPATH -u "$path"`
20956    fi
20957    if test "x$new_path" = x; then
20958      # It's still not found. Now this is an unrecoverable error.
20959      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20960$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20961      has_space=`$ECHO "$complete" | $GREP " "`
20962      if test "x$has_space" != x; then
20963        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20964$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20965      fi
20966      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20967    fi
20968  fi
20969
20970  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20971  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20972  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20973  # "foo.exe" is OK but "foo" is an error.
20974  #
20975  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20976  # It is also a way to make sure we got the proper file name for the real test later on.
20977  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20978  if test "x$test_shortpath" = x; then
20979    # Short path failed, file does not exist as specified.
20980    # Try adding .exe or .cmd
20981    if test -f "${new_path}.exe"; then
20982       input_to_shortpath="${new_path}.exe"
20983    elif test -f "${new_path}.cmd"; then
20984       input_to_shortpath="${new_path}.cmd"
20985    else
20986      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
20987$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
20988      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20989$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20990      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20991    fi
20992  else
20993    input_to_shortpath="$new_path"
20994  fi
20995
20996  # Call helper function which possibly converts this using DOS-style short mode.
20997  # If so, the updated path is stored in $new_path.
20998  new_path="$input_to_shortpath"
20999
21000  input_path="$input_to_shortpath"
21001  # Check if we need to convert this using DOS-style short mode. If the path
21002  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21003  # take no chances and rewrite it.
21004  # Note: m4 eats our [], so we need to use [ and ] instead.
21005  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21006  if test "x$has_forbidden_chars" != x; then
21007    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21008    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21009    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21010    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21011      # Going to short mode and back again did indeed matter. Since short mode is
21012      # case insensitive, let's make it lowercase to improve readability.
21013      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21014      # Now convert it back to Unix-stile (cygpath)
21015      input_path=`$CYGPATH -u "$shortmode_path"`
21016      new_path="$input_path"
21017    fi
21018  fi
21019
21020  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21021  if test "x$test_cygdrive_prefix" = x; then
21022    # As a simple fix, exclude /usr/bin since it's not a real path.
21023    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21024      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21025      # a path prefixed by /cygdrive for fixpath to work.
21026      new_path="$CYGWIN_ROOT_PATH$input_path"
21027    fi
21028  fi
21029
21030  # remove trailing .exe if any
21031  new_path="${new_path/%.exe/}"
21032
21033  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21034
21035  # First separate the path from the arguments. This will split at the first
21036  # space.
21037  complete="$CXX"
21038  path="${complete%% *}"
21039  tmp="$complete EOL"
21040  arguments="${tmp#* }"
21041
21042  # Input might be given as Windows format, start by converting to
21043  # unix format.
21044  new_path="$path"
21045
21046  windows_path="$new_path"
21047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21048    unix_path=`$CYGPATH -u "$windows_path"`
21049    new_path="$unix_path"
21050  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21051    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21052    new_path="$unix_path"
21053  fi
21054
21055
21056  # Now try to locate executable using which
21057  new_path=`$WHICH "$new_path" 2> /dev/null`
21058
21059  if test "x$new_path" = x; then
21060    # Oops. Which didn't find the executable.
21061    # The splitting of arguments from the executable at a space might have been incorrect,
21062    # since paths with space are more likely in Windows. Give it another try with the whole
21063    # argument.
21064    path="$complete"
21065    arguments="EOL"
21066    new_path="$path"
21067
21068  windows_path="$new_path"
21069  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21070    unix_path=`$CYGPATH -u "$windows_path"`
21071    new_path="$unix_path"
21072  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21073    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21074    new_path="$unix_path"
21075  fi
21076
21077
21078    new_path=`$WHICH "$new_path" 2> /dev/null`
21079
21080    if test "x$new_path" = x; then
21081      # It's still not found. Now this is an unrecoverable error.
21082      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21083$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21084      has_space=`$ECHO "$complete" | $GREP " "`
21085      if test "x$has_space" != x; then
21086        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21087$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21088      fi
21089      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21090    fi
21091  fi
21092
21093  # Now new_path has a complete unix path to the binary
21094  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21095    # Keep paths in /bin as-is, but remove trailing .exe if any
21096    new_path="${new_path/%.exe/}"
21097    # Do not save /bin paths to all_fixpath_prefixes!
21098  else
21099    # Not in mixed or Windows style, start by that.
21100    new_path=`cmd //c echo $new_path`
21101
21102  input_path="$new_path"
21103  # Check if we need to convert this using DOS-style short mode. If the path
21104  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21105  # take no chances and rewrite it.
21106  # Note: m4 eats our [], so we need to use [ and ] instead.
21107  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21108  if test "x$has_forbidden_chars" != x; then
21109    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21110    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21111  fi
21112
21113    # Output is in $new_path
21114
21115  windows_path="$new_path"
21116  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21117    unix_path=`$CYGPATH -u "$windows_path"`
21118    new_path="$unix_path"
21119  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21120    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21121    new_path="$unix_path"
21122  fi
21123
21124    # remove trailing .exe if any
21125    new_path="${new_path/%.exe/}"
21126
21127    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21128    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21129  fi
21130
21131  else
21132    # We're on a posix platform. Hooray! :)
21133    # First separate the path from the arguments. This will split at the first
21134    # space.
21135    complete="$CXX"
21136    path="${complete%% *}"
21137    tmp="$complete EOL"
21138    arguments="${tmp#* }"
21139
21140    # Cannot rely on the command "which" here since it doesn't always work.
21141    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21142    if test -z "$is_absolute_path"; then
21143      # Path to executable is not absolute. Find it.
21144      IFS_save="$IFS"
21145      IFS=:
21146      for p in $PATH; do
21147        if test -f "$p/$path" && test -x "$p/$path"; then
21148          new_path="$p/$path"
21149          break
21150        fi
21151      done
21152      IFS="$IFS_save"
21153    else
21154      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
21155$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
21156      new_path="$path"
21157    fi
21158
21159    if test "x$new_path" = x; then
21160        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21161$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21162        has_space=`$ECHO "$complete" | $GREP " "`
21163        if test "x$has_space" != x; then
21164          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21165$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21166        fi
21167        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21168      fi
21169  fi
21170
21171      # Now join together the path and the arguments once again
21172      if test "x$arguments" != xEOL; then
21173        new_complete="$new_path ${arguments% *}"
21174      else
21175        new_complete="$new_path"
21176      fi
21177
21178  if test "x$complete" != "x$new_complete"; then
21179      CXX="$new_complete"
21180      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
21181$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
21182    fi
21183
21184  TEST_COMPILER="$CXX"
21185  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
21186  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
21187  if test "x$OPENJDK_BUILD_OS" != xaix; then
21188    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
21189$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
21190
21191    if test "x$OPENJDK_BUILD_OS" != xwindows; then
21192        # Follow a chain of symbolic links. Use readlink
21193        # where it exists, else fall back to horribly
21194        # complicated shell code.
21195        if test "x$READLINK_TESTED" != yes; then
21196            # On MacOSX there is a readlink tool with a different
21197            # purpose than the GNU readlink tool. Check the found readlink.
21198            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21199            if test "x$ISGNU" = x; then
21200                 # A readlink that we do not know how to use.
21201                 # Are there other non-GNU readlinks out there?
21202                 READLINK_TESTED=yes
21203                 READLINK=
21204            fi
21205        fi
21206
21207        if test "x$READLINK" != x; then
21208            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
21209        else
21210            # Save the current directory for restoring afterwards
21211            STARTDIR=$PWD
21212            COUNTER=0
21213            sym_link_dir=`$DIRNAME $TEST_COMPILER`
21214            sym_link_file=`$BASENAME $TEST_COMPILER`
21215            cd $sym_link_dir
21216            # Use -P flag to resolve symlinks in directories.
21217            cd `$THEPWDCMD -P`
21218            sym_link_dir=`$THEPWDCMD -P`
21219            # Resolve file symlinks
21220            while test $COUNTER -lt 20; do
21221                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21222                if test "x$ISLINK" == x; then
21223                    # This is not a symbolic link! We are done!
21224                    break
21225                fi
21226                # Again resolve directory symlinks since the target of the just found
21227                # link could be in a different directory
21228                cd `$DIRNAME $ISLINK`
21229                sym_link_dir=`$THEPWDCMD -P`
21230                sym_link_file=`$BASENAME $ISLINK`
21231                let COUNTER=COUNTER+1
21232            done
21233            cd $STARTDIR
21234            TEST_COMPILER=$sym_link_dir/$sym_link_file
21235        fi
21236    fi
21237
21238    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
21239$as_echo "$TEST_COMPILER" >&6; }
21240  fi
21241  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
21242$as_echo_n "checking if CXX is disguised ccache... " >&6; }
21243
21244  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
21245  if test "x$COMPILER_BASENAME" = "xccache"; then
21246    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
21247$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
21248    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
21249    # We want to control ccache invocation ourselves, so ignore this cc and try
21250    # searching again.
21251
21252    # Remove the path to the fake ccache cc from the PATH
21253    RETRY_COMPILER_SAVED_PATH="$PATH"
21254    COMPILER_DIRNAME=`$DIRNAME $CXX`
21255    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
21256
21257    # Try again looking for our compiler
21258    if test -n "$ac_tool_prefix"; then
21259  for ac_prog in $COMPILER_CHECK_LIST
21260  do
21261    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21262set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21264$as_echo_n "checking for $ac_word... " >&6; }
21265if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
21266  $as_echo_n "(cached) " >&6
21267else
21268  if test -n "$PROPER_COMPILER_CXX"; then
21269  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
21270else
21271as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21272for as_dir in $PATH
21273do
21274  IFS=$as_save_IFS
21275  test -z "$as_dir" && as_dir=.
21276    for ac_exec_ext in '' $ac_executable_extensions; do
21277  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21278    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
21279    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21280    break 2
21281  fi
21282done
21283  done
21284IFS=$as_save_IFS
21285
21286fi
21287fi
21288PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
21289if test -n "$PROPER_COMPILER_CXX"; then
21290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21291$as_echo "$PROPER_COMPILER_CXX" >&6; }
21292else
21293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21294$as_echo "no" >&6; }
21295fi
21296
21297
21298    test -n "$PROPER_COMPILER_CXX" && break
21299  done
21300fi
21301if test -z "$PROPER_COMPILER_CXX"; then
21302  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
21303  for ac_prog in $COMPILER_CHECK_LIST
21304do
21305  # Extract the first word of "$ac_prog", so it can be a program name with args.
21306set dummy $ac_prog; ac_word=$2
21307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21308$as_echo_n "checking for $ac_word... " >&6; }
21309if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
21310  $as_echo_n "(cached) " >&6
21311else
21312  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21313  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
21314else
21315as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21316for as_dir in $PATH
21317do
21318  IFS=$as_save_IFS
21319  test -z "$as_dir" && as_dir=.
21320    for ac_exec_ext in '' $ac_executable_extensions; do
21321  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21322    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
21323    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21324    break 2
21325  fi
21326done
21327  done
21328IFS=$as_save_IFS
21329
21330fi
21331fi
21332ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
21333if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
21335$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
21336else
21337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21338$as_echo "no" >&6; }
21339fi
21340
21341
21342  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
21343done
21344
21345  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
21346    PROPER_COMPILER_CXX=""
21347  else
21348    case $cross_compiling:$ac_tool_warned in
21349yes:)
21350{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21351$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21352ac_tool_warned=yes ;;
21353esac
21354    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
21355  fi
21356fi
21357
21358
21359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21360
21361  # First separate the path from the arguments. This will split at the first
21362  # space.
21363  complete="$PROPER_COMPILER_CXX"
21364  path="${complete%% *}"
21365  tmp="$complete EOL"
21366  arguments="${tmp#* }"
21367
21368  # Input might be given as Windows format, start by converting to
21369  # unix format.
21370  new_path=`$CYGPATH -u "$path"`
21371
21372  # Now try to locate executable using which
21373  new_path=`$WHICH "$new_path" 2> /dev/null`
21374  # bat and cmd files are not always considered executable in cygwin causing which
21375  # to not find them
21376  if test "x$new_path" = x \
21377           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21378           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21379    new_path=`$CYGPATH -u "$path"`
21380  fi
21381  if test "x$new_path" = x; then
21382    # Oops. Which didn't find the executable.
21383    # The splitting of arguments from the executable at a space might have been incorrect,
21384    # since paths with space are more likely in Windows. Give it another try with the whole
21385    # argument.
21386    path="$complete"
21387    arguments="EOL"
21388    new_path=`$CYGPATH -u "$path"`
21389    new_path=`$WHICH "$new_path" 2> /dev/null`
21390    # bat and cmd files are not always considered executable in cygwin causing which
21391    # to not find them
21392    if test "x$new_path" = x \
21393             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21394             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21395      new_path=`$CYGPATH -u "$path"`
21396    fi
21397    if test "x$new_path" = x; then
21398      # It's still not found. Now this is an unrecoverable error.
21399      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21400$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21401      has_space=`$ECHO "$complete" | $GREP " "`
21402      if test "x$has_space" != x; then
21403        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21404$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21405      fi
21406      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21407    fi
21408  fi
21409
21410  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21411  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21412  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21413  # "foo.exe" is OK but "foo" is an error.
21414  #
21415  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21416  # It is also a way to make sure we got the proper file name for the real test later on.
21417  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21418  if test "x$test_shortpath" = x; then
21419    # Short path failed, file does not exist as specified.
21420    # Try adding .exe or .cmd
21421    if test -f "${new_path}.exe"; then
21422       input_to_shortpath="${new_path}.exe"
21423    elif test -f "${new_path}.cmd"; then
21424       input_to_shortpath="${new_path}.cmd"
21425    else
21426      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
21427$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
21428      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21429$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21430      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21431    fi
21432  else
21433    input_to_shortpath="$new_path"
21434  fi
21435
21436  # Call helper function which possibly converts this using DOS-style short mode.
21437  # If so, the updated path is stored in $new_path.
21438  new_path="$input_to_shortpath"
21439
21440  input_path="$input_to_shortpath"
21441  # Check if we need to convert this using DOS-style short mode. If the path
21442  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21443  # take no chances and rewrite it.
21444  # Note: m4 eats our [], so we need to use [ and ] instead.
21445  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21446  if test "x$has_forbidden_chars" != x; then
21447    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21448    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21449    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21450    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21451      # Going to short mode and back again did indeed matter. Since short mode is
21452      # case insensitive, let's make it lowercase to improve readability.
21453      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21454      # Now convert it back to Unix-stile (cygpath)
21455      input_path=`$CYGPATH -u "$shortmode_path"`
21456      new_path="$input_path"
21457    fi
21458  fi
21459
21460  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21461  if test "x$test_cygdrive_prefix" = x; then
21462    # As a simple fix, exclude /usr/bin since it's not a real path.
21463    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21464      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21465      # a path prefixed by /cygdrive for fixpath to work.
21466      new_path="$CYGWIN_ROOT_PATH$input_path"
21467    fi
21468  fi
21469
21470  # remove trailing .exe if any
21471  new_path="${new_path/%.exe/}"
21472
21473  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21474
21475  # First separate the path from the arguments. This will split at the first
21476  # space.
21477  complete="$PROPER_COMPILER_CXX"
21478  path="${complete%% *}"
21479  tmp="$complete EOL"
21480  arguments="${tmp#* }"
21481
21482  # Input might be given as Windows format, start by converting to
21483  # unix format.
21484  new_path="$path"
21485
21486  windows_path="$new_path"
21487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21488    unix_path=`$CYGPATH -u "$windows_path"`
21489    new_path="$unix_path"
21490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21491    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21492    new_path="$unix_path"
21493  fi
21494
21495
21496  # Now try to locate executable using which
21497  new_path=`$WHICH "$new_path" 2> /dev/null`
21498
21499  if test "x$new_path" = x; then
21500    # Oops. Which didn't find the executable.
21501    # The splitting of arguments from the executable at a space might have been incorrect,
21502    # since paths with space are more likely in Windows. Give it another try with the whole
21503    # argument.
21504    path="$complete"
21505    arguments="EOL"
21506    new_path="$path"
21507
21508  windows_path="$new_path"
21509  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21510    unix_path=`$CYGPATH -u "$windows_path"`
21511    new_path="$unix_path"
21512  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21513    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21514    new_path="$unix_path"
21515  fi
21516
21517
21518    new_path=`$WHICH "$new_path" 2> /dev/null`
21519
21520    if test "x$new_path" = x; then
21521      # It's still not found. Now this is an unrecoverable error.
21522      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21523$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21524      has_space=`$ECHO "$complete" | $GREP " "`
21525      if test "x$has_space" != x; then
21526        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21527$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21528      fi
21529      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21530    fi
21531  fi
21532
21533  # Now new_path has a complete unix path to the binary
21534  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21535    # Keep paths in /bin as-is, but remove trailing .exe if any
21536    new_path="${new_path/%.exe/}"
21537    # Do not save /bin paths to all_fixpath_prefixes!
21538  else
21539    # Not in mixed or Windows style, start by that.
21540    new_path=`cmd //c echo $new_path`
21541
21542  input_path="$new_path"
21543  # Check if we need to convert this using DOS-style short mode. If the path
21544  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21545  # take no chances and rewrite it.
21546  # Note: m4 eats our [], so we need to use [ and ] instead.
21547  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21548  if test "x$has_forbidden_chars" != x; then
21549    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21550    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21551  fi
21552
21553    # Output is in $new_path
21554
21555  windows_path="$new_path"
21556  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21557    unix_path=`$CYGPATH -u "$windows_path"`
21558    new_path="$unix_path"
21559  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21560    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21561    new_path="$unix_path"
21562  fi
21563
21564    # remove trailing .exe if any
21565    new_path="${new_path/%.exe/}"
21566
21567    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21568    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21569  fi
21570
21571  else
21572    # We're on a posix platform. Hooray! :)
21573    # First separate the path from the arguments. This will split at the first
21574    # space.
21575    complete="$PROPER_COMPILER_CXX"
21576    path="${complete%% *}"
21577    tmp="$complete EOL"
21578    arguments="${tmp#* }"
21579
21580    # Cannot rely on the command "which" here since it doesn't always work.
21581    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21582    if test -z "$is_absolute_path"; then
21583      # Path to executable is not absolute. Find it.
21584      IFS_save="$IFS"
21585      IFS=:
21586      for p in $PATH; do
21587        if test -f "$p/$path" && test -x "$p/$path"; then
21588          new_path="$p/$path"
21589          break
21590        fi
21591      done
21592      IFS="$IFS_save"
21593    else
21594      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
21595$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
21596      new_path="$path"
21597    fi
21598
21599    if test "x$new_path" = x; then
21600        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21601$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21602        has_space=`$ECHO "$complete" | $GREP " "`
21603        if test "x$has_space" != x; then
21604          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21605$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21606        fi
21607        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21608      fi
21609  fi
21610
21611      # Now join together the path and the arguments once again
21612      if test "x$arguments" != xEOL; then
21613        new_complete="$new_path ${arguments% *}"
21614      else
21615        new_complete="$new_path"
21616      fi
21617
21618  if test "x$complete" != "x$new_complete"; then
21619      PROPER_COMPILER_CXX="$new_complete"
21620      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
21621$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
21622    fi
21623
21624    PATH="$RETRY_COMPILER_SAVED_PATH"
21625
21626    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
21627$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
21628
21629    if test "x$OPENJDK_BUILD_OS" != xwindows; then
21630        # Follow a chain of symbolic links. Use readlink
21631        # where it exists, else fall back to horribly
21632        # complicated shell code.
21633        if test "x$READLINK_TESTED" != yes; then
21634            # On MacOSX there is a readlink tool with a different
21635            # purpose than the GNU readlink tool. Check the found readlink.
21636            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21637            if test "x$ISGNU" = x; then
21638                 # A readlink that we do not know how to use.
21639                 # Are there other non-GNU readlinks out there?
21640                 READLINK_TESTED=yes
21641                 READLINK=
21642            fi
21643        fi
21644
21645        if test "x$READLINK" != x; then
21646            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21647        else
21648            # Save the current directory for restoring afterwards
21649            STARTDIR=$PWD
21650            COUNTER=0
21651            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21652            sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21653            cd $sym_link_dir
21654            # Use -P flag to resolve symlinks in directories.
21655            cd `$THEPWDCMD -P`
21656            sym_link_dir=`$THEPWDCMD -P`
21657            # Resolve file symlinks
21658            while test $COUNTER -lt 20; do
21659                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21660                if test "x$ISLINK" == x; then
21661                    # This is not a symbolic link! We are done!
21662                    break
21663                fi
21664                # Again resolve directory symlinks since the target of the just found
21665                # link could be in a different directory
21666                cd `$DIRNAME $ISLINK`
21667                sym_link_dir=`$THEPWDCMD -P`
21668                sym_link_file=`$BASENAME $ISLINK`
21669                let COUNTER=COUNTER+1
21670            done
21671            cd $STARTDIR
21672            PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21673        fi
21674    fi
21675
21676    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21677$as_echo "$PROPER_COMPILER_CXX" >&6; }
21678    CXX="$PROPER_COMPILER_CXX"
21679  else
21680    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21681$as_echo "no, keeping CXX" >&6; }
21682    CXX="$TEST_COMPILER"
21683  fi
21684
21685  COMPILER=$CXX
21686  COMPILER_NAME=$COMPILER_NAME
21687
21688  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21689    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21690    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21691    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21692    if test $? -ne 0; then
21693      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21694
21695      { $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
21696$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21697      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21698$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21699      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21700    else
21701      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21702      COMPILER_VENDOR="Sun Studio"
21703    fi
21704  elif test  "x$OPENJDK_TARGET_OS" = xaix; then
21705      COMPILER_VERSION_TEST=`$COMPILER -qversion  2>&1 | $TAIL -n 1`
21706      $ECHO $COMPILER_VERSION_TEST | $GREP "^Version: " > /dev/null
21707      if test $? -ne 0; then
21708        as_fn_error $? "Failed to detect the compiler version of $COMPILER ...." "$LINENO" 5
21709      else
21710        COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n 's/Version: \(0-90-9\.0-90-9*\).*/\1/p'`
21711        COMPILER_VENDOR='IBM'
21712      fi
21713  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21714    # First line typically looks something like:
21715    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
21716    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
21717    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21718    COMPILER_VENDOR="Microsoft CL.EXE"
21719    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21720    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21721      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21722        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21723      fi
21724    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21725      if test "x$COMPILER_CPU_TEST" != "xx64"; then
21726        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21727      fi
21728    fi
21729  else
21730    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21731    # Check that this is likely to be GCC.
21732    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21733    if test $? -ne 0; then
21734      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21735$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21736      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21737$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21738      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21739    fi
21740
21741    # First line typically looks something like:
21742    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21743    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21744    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21745  fi
21746  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21747  CXX_VERSION="$COMPILER_VERSION"
21748  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21749  CXX_VENDOR="$COMPILER_VENDOR"
21750
21751  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21752$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21753
21754
21755# Now that we have resolved CXX ourself, let autoconf have its go at it
21756ac_ext=cpp
21757ac_cpp='$CXXCPP $CPPFLAGS'
21758ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21759ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21760ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21761if test -z "$CXX"; then
21762  if test -n "$CCC"; then
21763    CXX=$CCC
21764  else
21765    if test -n "$ac_tool_prefix"; then
21766  for ac_prog in $CXX
21767  do
21768    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21769set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21771$as_echo_n "checking for $ac_word... " >&6; }
21772if ${ac_cv_prog_CXX+:} false; then :
21773  $as_echo_n "(cached) " >&6
21774else
21775  if test -n "$CXX"; then
21776  ac_cv_prog_CXX="$CXX" # Let the user override the test.
21777else
21778as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21779for as_dir in $PATH
21780do
21781  IFS=$as_save_IFS
21782  test -z "$as_dir" && as_dir=.
21783    for ac_exec_ext in '' $ac_executable_extensions; do
21784  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21785    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21786    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21787    break 2
21788  fi
21789done
21790  done
21791IFS=$as_save_IFS
21792
21793fi
21794fi
21795CXX=$ac_cv_prog_CXX
21796if test -n "$CXX"; then
21797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21798$as_echo "$CXX" >&6; }
21799else
21800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21801$as_echo "no" >&6; }
21802fi
21803
21804
21805    test -n "$CXX" && break
21806  done
21807fi
21808if test -z "$CXX"; then
21809  ac_ct_CXX=$CXX
21810  for ac_prog in $CXX
21811do
21812  # Extract the first word of "$ac_prog", so it can be a program name with args.
21813set dummy $ac_prog; ac_word=$2
21814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21815$as_echo_n "checking for $ac_word... " >&6; }
21816if ${ac_cv_prog_ac_ct_CXX+:} false; then :
21817  $as_echo_n "(cached) " >&6
21818else
21819  if test -n "$ac_ct_CXX"; then
21820  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
21821else
21822as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21823for as_dir in $PATH
21824do
21825  IFS=$as_save_IFS
21826  test -z "$as_dir" && as_dir=.
21827    for ac_exec_ext in '' $ac_executable_extensions; do
21828  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21829    ac_cv_prog_ac_ct_CXX="$ac_prog"
21830    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21831    break 2
21832  fi
21833done
21834  done
21835IFS=$as_save_IFS
21836
21837fi
21838fi
21839ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
21840if test -n "$ac_ct_CXX"; then
21841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
21842$as_echo "$ac_ct_CXX" >&6; }
21843else
21844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21845$as_echo "no" >&6; }
21846fi
21847
21848
21849  test -n "$ac_ct_CXX" && break
21850done
21851
21852  if test "x$ac_ct_CXX" = x; then
21853    CXX="g++"
21854  else
21855    case $cross_compiling:$ac_tool_warned in
21856yes:)
21857{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21858$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21859ac_tool_warned=yes ;;
21860esac
21861    CXX=$ac_ct_CXX
21862  fi
21863fi
21864
21865  fi
21866fi
21867# Provide some information about the compiler.
21868$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
21869set X $ac_compile
21870ac_compiler=$2
21871for ac_option in --version -v -V -qversion; do
21872  { { ac_try="$ac_compiler $ac_option >&5"
21873case "(($ac_try" in
21874  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21875  *) ac_try_echo=$ac_try;;
21876esac
21877eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21878$as_echo "$ac_try_echo"; } >&5
21879  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21880  ac_status=$?
21881  if test -s conftest.err; then
21882    sed '10a\
21883... rest of stderr output deleted ...
21884         10q' conftest.err >conftest.er1
21885    cat conftest.er1 >&5
21886  fi
21887  rm -f conftest.er1 conftest.err
21888  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21889  test $ac_status = 0; }
21890done
21891
21892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
21893$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
21894if ${ac_cv_cxx_compiler_gnu+:} false; then :
21895  $as_echo_n "(cached) " >&6
21896else
21897  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21898/* end confdefs.h.  */
21899
21900int
21901main ()
21902{
21903#ifndef __GNUC__
21904       choke me
21905#endif
21906
21907  ;
21908  return 0;
21909}
21910_ACEOF
21911if ac_fn_cxx_try_compile "$LINENO"; then :
21912  ac_compiler_gnu=yes
21913else
21914  ac_compiler_gnu=no
21915fi
21916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21917ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
21918
21919fi
21920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
21921$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
21922if test $ac_compiler_gnu = yes; then
21923  GXX=yes
21924else
21925  GXX=
21926fi
21927ac_test_CXXFLAGS=${CXXFLAGS+set}
21928ac_save_CXXFLAGS=$CXXFLAGS
21929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
21930$as_echo_n "checking whether $CXX accepts -g... " >&6; }
21931if ${ac_cv_prog_cxx_g+:} false; then :
21932  $as_echo_n "(cached) " >&6
21933else
21934  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
21935   ac_cxx_werror_flag=yes
21936   ac_cv_prog_cxx_g=no
21937   CXXFLAGS="-g"
21938   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21939/* end confdefs.h.  */
21940
21941int
21942main ()
21943{
21944
21945  ;
21946  return 0;
21947}
21948_ACEOF
21949if ac_fn_cxx_try_compile "$LINENO"; then :
21950  ac_cv_prog_cxx_g=yes
21951else
21952  CXXFLAGS=""
21953      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21954/* end confdefs.h.  */
21955
21956int
21957main ()
21958{
21959
21960  ;
21961  return 0;
21962}
21963_ACEOF
21964if ac_fn_cxx_try_compile "$LINENO"; then :
21965
21966else
21967  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21968	 CXXFLAGS="-g"
21969	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21970/* end confdefs.h.  */
21971
21972int
21973main ()
21974{
21975
21976  ;
21977  return 0;
21978}
21979_ACEOF
21980if ac_fn_cxx_try_compile "$LINENO"; then :
21981  ac_cv_prog_cxx_g=yes
21982fi
21983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21984fi
21985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21986fi
21987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21988   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21989fi
21990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
21991$as_echo "$ac_cv_prog_cxx_g" >&6; }
21992if test "$ac_test_CXXFLAGS" = set; then
21993  CXXFLAGS=$ac_save_CXXFLAGS
21994elif test $ac_cv_prog_cxx_g = yes; then
21995  if test "$GXX" = yes; then
21996    CXXFLAGS="-g -O2"
21997  else
21998    CXXFLAGS="-g"
21999  fi
22000else
22001  if test "$GXX" = yes; then
22002    CXXFLAGS="-O2"
22003  else
22004    CXXFLAGS=
22005  fi
22006fi
22007ac_ext=cpp
22008ac_cpp='$CXXCPP $CPPFLAGS'
22009ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22010ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22011ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22012
22013
22014### Locate other tools
22015
22016if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22017    ac_ext=m
22018ac_cpp='$OBJCPP $CPPFLAGS'
22019ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22020ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22021ac_compiler_gnu=$ac_cv_objc_compiler_gnu
22022if test -n "$ac_tool_prefix"; then
22023  for ac_prog in gcc objcc objc cc CC
22024  do
22025    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
22026set dummy $ac_tool_prefix$ac_prog; ac_word=$2
22027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22028$as_echo_n "checking for $ac_word... " >&6; }
22029if ${ac_cv_prog_OBJC+:} false; then :
22030  $as_echo_n "(cached) " >&6
22031else
22032  if test -n "$OBJC"; then
22033  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
22034else
22035as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22036for as_dir in $PATH
22037do
22038  IFS=$as_save_IFS
22039  test -z "$as_dir" && as_dir=.
22040    for ac_exec_ext in '' $ac_executable_extensions; do
22041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22042    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
22043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22044    break 2
22045  fi
22046done
22047  done
22048IFS=$as_save_IFS
22049
22050fi
22051fi
22052OBJC=$ac_cv_prog_OBJC
22053if test -n "$OBJC"; then
22054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
22055$as_echo "$OBJC" >&6; }
22056else
22057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22058$as_echo "no" >&6; }
22059fi
22060
22061
22062    test -n "$OBJC" && break
22063  done
22064fi
22065if test -z "$OBJC"; then
22066  ac_ct_OBJC=$OBJC
22067  for ac_prog in gcc objcc objc cc CC
22068do
22069  # Extract the first word of "$ac_prog", so it can be a program name with args.
22070set dummy $ac_prog; ac_word=$2
22071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22072$as_echo_n "checking for $ac_word... " >&6; }
22073if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
22074  $as_echo_n "(cached) " >&6
22075else
22076  if test -n "$ac_ct_OBJC"; then
22077  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
22078else
22079as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22080for as_dir in $PATH
22081do
22082  IFS=$as_save_IFS
22083  test -z "$as_dir" && as_dir=.
22084    for ac_exec_ext in '' $ac_executable_extensions; do
22085  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22086    ac_cv_prog_ac_ct_OBJC="$ac_prog"
22087    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22088    break 2
22089  fi
22090done
22091  done
22092IFS=$as_save_IFS
22093
22094fi
22095fi
22096ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
22097if test -n "$ac_ct_OBJC"; then
22098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
22099$as_echo "$ac_ct_OBJC" >&6; }
22100else
22101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22102$as_echo "no" >&6; }
22103fi
22104
22105
22106  test -n "$ac_ct_OBJC" && break
22107done
22108
22109  if test "x$ac_ct_OBJC" = x; then
22110    OBJC="gcc"
22111  else
22112    case $cross_compiling:$ac_tool_warned in
22113yes:)
22114{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22115$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22116ac_tool_warned=yes ;;
22117esac
22118    OBJC=$ac_ct_OBJC
22119  fi
22120fi
22121
22122# Provide some information about the compiler.
22123$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
22124set X $ac_compile
22125ac_compiler=$2
22126for ac_option in --version -v -V -qversion; do
22127  { { ac_try="$ac_compiler $ac_option >&5"
22128case "(($ac_try" in
22129  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22130  *) ac_try_echo=$ac_try;;
22131esac
22132eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
22133$as_echo "$ac_try_echo"; } >&5
22134  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
22135  ac_status=$?
22136  if test -s conftest.err; then
22137    sed '10a\
22138... rest of stderr output deleted ...
22139         10q' conftest.err >conftest.er1
22140    cat conftest.er1 >&5
22141  fi
22142  rm -f conftest.er1 conftest.err
22143  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22144  test $ac_status = 0; }
22145done
22146
22147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
22148$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
22149if ${ac_cv_objc_compiler_gnu+:} false; then :
22150  $as_echo_n "(cached) " >&6
22151else
22152  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22153/* end confdefs.h.  */
22154
22155int
22156main ()
22157{
22158#ifndef __GNUC__
22159       choke me
22160#endif
22161
22162  ;
22163  return 0;
22164}
22165_ACEOF
22166if ac_fn_objc_try_compile "$LINENO"; then :
22167  ac_compiler_gnu=yes
22168else
22169  ac_compiler_gnu=no
22170fi
22171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22172ac_cv_objc_compiler_gnu=$ac_compiler_gnu
22173
22174fi
22175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
22176$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
22177if test $ac_compiler_gnu = yes; then
22178  GOBJC=yes
22179else
22180  GOBJC=
22181fi
22182ac_test_OBJCFLAGS=${OBJCFLAGS+set}
22183ac_save_OBJCFLAGS=$OBJCFLAGS
22184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
22185$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
22186if ${ac_cv_prog_objc_g+:} false; then :
22187  $as_echo_n "(cached) " >&6
22188else
22189  ac_save_objc_werror_flag=$ac_objc_werror_flag
22190   ac_objc_werror_flag=yes
22191   ac_cv_prog_objc_g=no
22192   OBJCFLAGS="-g"
22193   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22194/* end confdefs.h.  */
22195
22196int
22197main ()
22198{
22199
22200  ;
22201  return 0;
22202}
22203_ACEOF
22204if ac_fn_objc_try_compile "$LINENO"; then :
22205  ac_cv_prog_objc_g=yes
22206else
22207  OBJCFLAGS=""
22208      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22209/* end confdefs.h.  */
22210
22211int
22212main ()
22213{
22214
22215  ;
22216  return 0;
22217}
22218_ACEOF
22219if ac_fn_objc_try_compile "$LINENO"; then :
22220
22221else
22222  ac_objc_werror_flag=$ac_save_objc_werror_flag
22223	 OBJCFLAGS="-g"
22224	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22225/* end confdefs.h.  */
22226
22227int
22228main ()
22229{
22230
22231  ;
22232  return 0;
22233}
22234_ACEOF
22235if ac_fn_objc_try_compile "$LINENO"; then :
22236  ac_cv_prog_objc_g=yes
22237fi
22238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22239fi
22240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22241fi
22242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22243   ac_objc_werror_flag=$ac_save_objc_werror_flag
22244fi
22245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
22246$as_echo "$ac_cv_prog_objc_g" >&6; }
22247if test "$ac_test_OBJCFLAGS" = set; then
22248  OBJCFLAGS=$ac_save_OBJCFLAGS
22249elif test $ac_cv_prog_objc_g = yes; then
22250  if test "$GOBJC" = yes; then
22251    OBJCFLAGS="-g -O2"
22252  else
22253    OBJCFLAGS="-g"
22254  fi
22255else
22256  if test "$GOBJC" = yes; then
22257    OBJCFLAGS="-O2"
22258  else
22259    OBJCFLAGS=
22260  fi
22261fi
22262ac_ext=cpp
22263ac_cpp='$CXXCPP $CPPFLAGS'
22264ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22265ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22266ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22267
22268
22269  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22270
22271  # First separate the path from the arguments. This will split at the first
22272  # space.
22273  complete="$OBJC"
22274  path="${complete%% *}"
22275  tmp="$complete EOL"
22276  arguments="${tmp#* }"
22277
22278  # Input might be given as Windows format, start by converting to
22279  # unix format.
22280  new_path=`$CYGPATH -u "$path"`
22281
22282  # Now try to locate executable using which
22283  new_path=`$WHICH "$new_path" 2> /dev/null`
22284  # bat and cmd files are not always considered executable in cygwin causing which
22285  # to not find them
22286  if test "x$new_path" = x \
22287           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22288           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22289    new_path=`$CYGPATH -u "$path"`
22290  fi
22291  if test "x$new_path" = x; then
22292    # Oops. Which didn't find the executable.
22293    # The splitting of arguments from the executable at a space might have been incorrect,
22294    # since paths with space are more likely in Windows. Give it another try with the whole
22295    # argument.
22296    path="$complete"
22297    arguments="EOL"
22298    new_path=`$CYGPATH -u "$path"`
22299    new_path=`$WHICH "$new_path" 2> /dev/null`
22300    # bat and cmd files are not always considered executable in cygwin causing which
22301    # to not find them
22302    if test "x$new_path" = x \
22303             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22304             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22305      new_path=`$CYGPATH -u "$path"`
22306    fi
22307    if test "x$new_path" = x; then
22308      # It's still not found. Now this is an unrecoverable error.
22309      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22310$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22311      has_space=`$ECHO "$complete" | $GREP " "`
22312      if test "x$has_space" != x; then
22313        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22314$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22315      fi
22316      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22317    fi
22318  fi
22319
22320  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22321  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22322  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22323  # "foo.exe" is OK but "foo" is an error.
22324  #
22325  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22326  # It is also a way to make sure we got the proper file name for the real test later on.
22327  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22328  if test "x$test_shortpath" = x; then
22329    # Short path failed, file does not exist as specified.
22330    # Try adding .exe or .cmd
22331    if test -f "${new_path}.exe"; then
22332       input_to_shortpath="${new_path}.exe"
22333    elif test -f "${new_path}.cmd"; then
22334       input_to_shortpath="${new_path}.cmd"
22335    else
22336      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
22337$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
22338      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22339$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22340      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22341    fi
22342  else
22343    input_to_shortpath="$new_path"
22344  fi
22345
22346  # Call helper function which possibly converts this using DOS-style short mode.
22347  # If so, the updated path is stored in $new_path.
22348  new_path="$input_to_shortpath"
22349
22350  input_path="$input_to_shortpath"
22351  # Check if we need to convert this using DOS-style short mode. If the path
22352  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22353  # take no chances and rewrite it.
22354  # Note: m4 eats our [], so we need to use [ and ] instead.
22355  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22356  if test "x$has_forbidden_chars" != x; then
22357    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22358    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22359    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22360    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22361      # Going to short mode and back again did indeed matter. Since short mode is
22362      # case insensitive, let's make it lowercase to improve readability.
22363      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22364      # Now convert it back to Unix-stile (cygpath)
22365      input_path=`$CYGPATH -u "$shortmode_path"`
22366      new_path="$input_path"
22367    fi
22368  fi
22369
22370  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22371  if test "x$test_cygdrive_prefix" = x; then
22372    # As a simple fix, exclude /usr/bin since it's not a real path.
22373    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22374      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22375      # a path prefixed by /cygdrive for fixpath to work.
22376      new_path="$CYGWIN_ROOT_PATH$input_path"
22377    fi
22378  fi
22379
22380  # remove trailing .exe if any
22381  new_path="${new_path/%.exe/}"
22382
22383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22384
22385  # First separate the path from the arguments. This will split at the first
22386  # space.
22387  complete="$OBJC"
22388  path="${complete%% *}"
22389  tmp="$complete EOL"
22390  arguments="${tmp#* }"
22391
22392  # Input might be given as Windows format, start by converting to
22393  # unix format.
22394  new_path="$path"
22395
22396  windows_path="$new_path"
22397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22398    unix_path=`$CYGPATH -u "$windows_path"`
22399    new_path="$unix_path"
22400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22401    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22402    new_path="$unix_path"
22403  fi
22404
22405
22406  # Now try to locate executable using which
22407  new_path=`$WHICH "$new_path" 2> /dev/null`
22408
22409  if test "x$new_path" = x; then
22410    # Oops. Which didn't find the executable.
22411    # The splitting of arguments from the executable at a space might have been incorrect,
22412    # since paths with space are more likely in Windows. Give it another try with the whole
22413    # argument.
22414    path="$complete"
22415    arguments="EOL"
22416    new_path="$path"
22417
22418  windows_path="$new_path"
22419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22420    unix_path=`$CYGPATH -u "$windows_path"`
22421    new_path="$unix_path"
22422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22423    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22424    new_path="$unix_path"
22425  fi
22426
22427
22428    new_path=`$WHICH "$new_path" 2> /dev/null`
22429
22430    if test "x$new_path" = x; then
22431      # It's still not found. Now this is an unrecoverable error.
22432      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22433$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22434      has_space=`$ECHO "$complete" | $GREP " "`
22435      if test "x$has_space" != x; then
22436        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22437$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22438      fi
22439      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22440    fi
22441  fi
22442
22443  # Now new_path has a complete unix path to the binary
22444  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22445    # Keep paths in /bin as-is, but remove trailing .exe if any
22446    new_path="${new_path/%.exe/}"
22447    # Do not save /bin paths to all_fixpath_prefixes!
22448  else
22449    # Not in mixed or Windows style, start by that.
22450    new_path=`cmd //c echo $new_path`
22451
22452  input_path="$new_path"
22453  # Check if we need to convert this using DOS-style short mode. If the path
22454  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22455  # take no chances and rewrite it.
22456  # Note: m4 eats our [], so we need to use [ and ] instead.
22457  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22458  if test "x$has_forbidden_chars" != x; then
22459    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22460    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22461  fi
22462
22463    # Output is in $new_path
22464
22465  windows_path="$new_path"
22466  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22467    unix_path=`$CYGPATH -u "$windows_path"`
22468    new_path="$unix_path"
22469  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22470    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22471    new_path="$unix_path"
22472  fi
22473
22474    # remove trailing .exe if any
22475    new_path="${new_path/%.exe/}"
22476
22477    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22478    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22479  fi
22480
22481  else
22482    # We're on a posix platform. Hooray! :)
22483    # First separate the path from the arguments. This will split at the first
22484    # space.
22485    complete="$OBJC"
22486    path="${complete%% *}"
22487    tmp="$complete EOL"
22488    arguments="${tmp#* }"
22489
22490    # Cannot rely on the command "which" here since it doesn't always work.
22491    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22492    if test -z "$is_absolute_path"; then
22493      # Path to executable is not absolute. Find it.
22494      IFS_save="$IFS"
22495      IFS=:
22496      for p in $PATH; do
22497        if test -f "$p/$path" && test -x "$p/$path"; then
22498          new_path="$p/$path"
22499          break
22500        fi
22501      done
22502      IFS="$IFS_save"
22503    else
22504      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
22505$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
22506      new_path="$path"
22507    fi
22508
22509    if test "x$new_path" = x; then
22510        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22511$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22512        has_space=`$ECHO "$complete" | $GREP " "`
22513        if test "x$has_space" != x; then
22514          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22515$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22516        fi
22517        as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22518      fi
22519  fi
22520
22521      # Now join together the path and the arguments once again
22522      if test "x$arguments" != xEOL; then
22523        new_complete="$new_path ${arguments% *}"
22524      else
22525        new_complete="$new_path"
22526      fi
22527
22528  if test "x$complete" != "x$new_complete"; then
22529      OBJC="$new_complete"
22530      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
22531$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
22532    fi
22533
22534else
22535    OBJC=
22536fi
22537
22538# Restore the flags to the user specified values.
22539# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
22540CFLAGS="$ORG_CFLAGS"
22541CXXFLAGS="$ORG_CXXFLAGS"
22542OBJCFLAGS="$ORG_OBJCFLAGS"
22543
22544LD="$CC"
22545LDEXE="$CC"
22546LDCXX="$CXX"
22547LDEXECXX="$CXX"
22548
22549# LDEXE is the linker to use, when creating executables.
22550
22551# Linking C++ libraries.
22552
22553# Linking C++ executables.
22554
22555
22556if test "x$OPENJDK_TARGET_OS" != xwindows; then
22557    if test -n "$ac_tool_prefix"; then
22558  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
22559set dummy ${ac_tool_prefix}ar; ac_word=$2
22560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22561$as_echo_n "checking for $ac_word... " >&6; }
22562if ${ac_cv_prog_AR+:} false; then :
22563  $as_echo_n "(cached) " >&6
22564else
22565  if test -n "$AR"; then
22566  ac_cv_prog_AR="$AR" # Let the user override the test.
22567else
22568as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22569for as_dir in $PATH
22570do
22571  IFS=$as_save_IFS
22572  test -z "$as_dir" && as_dir=.
22573    for ac_exec_ext in '' $ac_executable_extensions; do
22574  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22575    ac_cv_prog_AR="${ac_tool_prefix}ar"
22576    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22577    break 2
22578  fi
22579done
22580  done
22581IFS=$as_save_IFS
22582
22583fi
22584fi
22585AR=$ac_cv_prog_AR
22586if test -n "$AR"; then
22587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
22588$as_echo "$AR" >&6; }
22589else
22590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22591$as_echo "no" >&6; }
22592fi
22593
22594
22595fi
22596if test -z "$ac_cv_prog_AR"; then
22597  ac_ct_AR=$AR
22598  # Extract the first word of "ar", so it can be a program name with args.
22599set dummy ar; ac_word=$2
22600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22601$as_echo_n "checking for $ac_word... " >&6; }
22602if ${ac_cv_prog_ac_ct_AR+:} false; then :
22603  $as_echo_n "(cached) " >&6
22604else
22605  if test -n "$ac_ct_AR"; then
22606  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
22607else
22608as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22609for as_dir in $PATH
22610do
22611  IFS=$as_save_IFS
22612  test -z "$as_dir" && as_dir=.
22613    for ac_exec_ext in '' $ac_executable_extensions; do
22614  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22615    ac_cv_prog_ac_ct_AR="ar"
22616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22617    break 2
22618  fi
22619done
22620  done
22621IFS=$as_save_IFS
22622
22623fi
22624fi
22625ac_ct_AR=$ac_cv_prog_ac_ct_AR
22626if test -n "$ac_ct_AR"; then
22627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
22628$as_echo "$ac_ct_AR" >&6; }
22629else
22630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22631$as_echo "no" >&6; }
22632fi
22633
22634  if test "x$ac_ct_AR" = x; then
22635    AR=""
22636  else
22637    case $cross_compiling:$ac_tool_warned in
22638yes:)
22639{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22640$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22641ac_tool_warned=yes ;;
22642esac
22643    AR=$ac_ct_AR
22644  fi
22645else
22646  AR="$ac_cv_prog_AR"
22647fi
22648
22649
22650  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22651
22652  # First separate the path from the arguments. This will split at the first
22653  # space.
22654  complete="$AR"
22655  path="${complete%% *}"
22656  tmp="$complete EOL"
22657  arguments="${tmp#* }"
22658
22659  # Input might be given as Windows format, start by converting to
22660  # unix format.
22661  new_path=`$CYGPATH -u "$path"`
22662
22663  # Now try to locate executable using which
22664  new_path=`$WHICH "$new_path" 2> /dev/null`
22665  # bat and cmd files are not always considered executable in cygwin causing which
22666  # to not find them
22667  if test "x$new_path" = x \
22668           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22669           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22670    new_path=`$CYGPATH -u "$path"`
22671  fi
22672  if test "x$new_path" = x; then
22673    # Oops. Which didn't find the executable.
22674    # The splitting of arguments from the executable at a space might have been incorrect,
22675    # since paths with space are more likely in Windows. Give it another try with the whole
22676    # argument.
22677    path="$complete"
22678    arguments="EOL"
22679    new_path=`$CYGPATH -u "$path"`
22680    new_path=`$WHICH "$new_path" 2> /dev/null`
22681    # bat and cmd files are not always considered executable in cygwin causing which
22682    # to not find them
22683    if test "x$new_path" = x \
22684             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22685             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22686      new_path=`$CYGPATH -u "$path"`
22687    fi
22688    if test "x$new_path" = x; then
22689      # It's still not found. Now this is an unrecoverable error.
22690      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22691$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22692      has_space=`$ECHO "$complete" | $GREP " "`
22693      if test "x$has_space" != x; then
22694        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22695$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22696      fi
22697      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22698    fi
22699  fi
22700
22701  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22702  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22703  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22704  # "foo.exe" is OK but "foo" is an error.
22705  #
22706  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22707  # It is also a way to make sure we got the proper file name for the real test later on.
22708  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22709  if test "x$test_shortpath" = x; then
22710    # Short path failed, file does not exist as specified.
22711    # Try adding .exe or .cmd
22712    if test -f "${new_path}.exe"; then
22713       input_to_shortpath="${new_path}.exe"
22714    elif test -f "${new_path}.cmd"; then
22715       input_to_shortpath="${new_path}.cmd"
22716    else
22717      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22718$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22719      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22720$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22721      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22722    fi
22723  else
22724    input_to_shortpath="$new_path"
22725  fi
22726
22727  # Call helper function which possibly converts this using DOS-style short mode.
22728  # If so, the updated path is stored in $new_path.
22729  new_path="$input_to_shortpath"
22730
22731  input_path="$input_to_shortpath"
22732  # Check if we need to convert this using DOS-style short mode. If the path
22733  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22734  # take no chances and rewrite it.
22735  # Note: m4 eats our [], so we need to use [ and ] instead.
22736  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22737  if test "x$has_forbidden_chars" != x; then
22738    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22739    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22740    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22741    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22742      # Going to short mode and back again did indeed matter. Since short mode is
22743      # case insensitive, let's make it lowercase to improve readability.
22744      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22745      # Now convert it back to Unix-stile (cygpath)
22746      input_path=`$CYGPATH -u "$shortmode_path"`
22747      new_path="$input_path"
22748    fi
22749  fi
22750
22751  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22752  if test "x$test_cygdrive_prefix" = x; then
22753    # As a simple fix, exclude /usr/bin since it's not a real path.
22754    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22755      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22756      # a path prefixed by /cygdrive for fixpath to work.
22757      new_path="$CYGWIN_ROOT_PATH$input_path"
22758    fi
22759  fi
22760
22761  # remove trailing .exe if any
22762  new_path="${new_path/%.exe/}"
22763
22764  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22765
22766  # First separate the path from the arguments. This will split at the first
22767  # space.
22768  complete="$AR"
22769  path="${complete%% *}"
22770  tmp="$complete EOL"
22771  arguments="${tmp#* }"
22772
22773  # Input might be given as Windows format, start by converting to
22774  # unix format.
22775  new_path="$path"
22776
22777  windows_path="$new_path"
22778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22779    unix_path=`$CYGPATH -u "$windows_path"`
22780    new_path="$unix_path"
22781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22782    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22783    new_path="$unix_path"
22784  fi
22785
22786
22787  # Now try to locate executable using which
22788  new_path=`$WHICH "$new_path" 2> /dev/null`
22789
22790  if test "x$new_path" = x; then
22791    # Oops. Which didn't find the executable.
22792    # The splitting of arguments from the executable at a space might have been incorrect,
22793    # since paths with space are more likely in Windows. Give it another try with the whole
22794    # argument.
22795    path="$complete"
22796    arguments="EOL"
22797    new_path="$path"
22798
22799  windows_path="$new_path"
22800  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22801    unix_path=`$CYGPATH -u "$windows_path"`
22802    new_path="$unix_path"
22803  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22804    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22805    new_path="$unix_path"
22806  fi
22807
22808
22809    new_path=`$WHICH "$new_path" 2> /dev/null`
22810
22811    if test "x$new_path" = x; then
22812      # It's still not found. Now this is an unrecoverable error.
22813      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22814$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22815      has_space=`$ECHO "$complete" | $GREP " "`
22816      if test "x$has_space" != x; then
22817        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22818$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22819      fi
22820      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22821    fi
22822  fi
22823
22824  # Now new_path has a complete unix path to the binary
22825  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22826    # Keep paths in /bin as-is, but remove trailing .exe if any
22827    new_path="${new_path/%.exe/}"
22828    # Do not save /bin paths to all_fixpath_prefixes!
22829  else
22830    # Not in mixed or Windows style, start by that.
22831    new_path=`cmd //c echo $new_path`
22832
22833  input_path="$new_path"
22834  # Check if we need to convert this using DOS-style short mode. If the path
22835  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22836  # take no chances and rewrite it.
22837  # Note: m4 eats our [], so we need to use [ and ] instead.
22838  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22839  if test "x$has_forbidden_chars" != x; then
22840    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22841    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22842  fi
22843
22844    # Output is in $new_path
22845
22846  windows_path="$new_path"
22847  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22848    unix_path=`$CYGPATH -u "$windows_path"`
22849    new_path="$unix_path"
22850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22851    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22852    new_path="$unix_path"
22853  fi
22854
22855    # remove trailing .exe if any
22856    new_path="${new_path/%.exe/}"
22857
22858    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22859    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22860  fi
22861
22862  else
22863    # We're on a posix platform. Hooray! :)
22864    # First separate the path from the arguments. This will split at the first
22865    # space.
22866    complete="$AR"
22867    path="${complete%% *}"
22868    tmp="$complete EOL"
22869    arguments="${tmp#* }"
22870
22871    # Cannot rely on the command "which" here since it doesn't always work.
22872    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22873    if test -z "$is_absolute_path"; then
22874      # Path to executable is not absolute. Find it.
22875      IFS_save="$IFS"
22876      IFS=:
22877      for p in $PATH; do
22878        if test -f "$p/$path" && test -x "$p/$path"; then
22879          new_path="$p/$path"
22880          break
22881        fi
22882      done
22883      IFS="$IFS_save"
22884    else
22885      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
22886$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
22887      new_path="$path"
22888    fi
22889
22890    if test "x$new_path" = x; then
22891        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22892$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22893        has_space=`$ECHO "$complete" | $GREP " "`
22894        if test "x$has_space" != x; then
22895          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22896$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22897        fi
22898        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22899      fi
22900  fi
22901
22902      # Now join together the path and the arguments once again
22903      if test "x$arguments" != xEOL; then
22904        new_complete="$new_path ${arguments% *}"
22905      else
22906        new_complete="$new_path"
22907      fi
22908
22909  if test "x$complete" != "x$new_complete"; then
22910      AR="$new_complete"
22911      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
22912$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
22913    fi
22914
22915fi
22916if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22917    ARFLAGS="-r"
22918elif test "x$OPENJDK_TARGET_OS" = xaix; then
22919    ARFLAGS="-X64"
22920else
22921    ARFLAGS=""
22922fi
22923
22924
22925# For hotspot, we need these in Windows mixed path; other platforms keep them the same
22926HOTSPOT_CXX="$CXX"
22927HOTSPOT_LD="$LD"
22928
22929
22930
22931COMPILER_NAME=gcc
22932COMPILER_TYPE=CC
22933if test "x$OPENJDK_TARGET_OS" = xwindows; then :
22934
22935    # For now, assume that we are always compiling using cl.exe.
22936    CC_OUT_OPTION=-Fo
22937    EXE_OUT_OPTION=-out:
22938    LD_OUT_OPTION=-out:
22939    AR_OUT_OPTION=-out:
22940    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
22941    # program for something completely different.
22942    # Extract the first word of "link", so it can be a program name with args.
22943set dummy link; ac_word=$2
22944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22945$as_echo_n "checking for $ac_word... " >&6; }
22946if ${ac_cv_prog_WINLD+:} false; then :
22947  $as_echo_n "(cached) " >&6
22948else
22949  if test -n "$WINLD"; then
22950  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
22951else
22952  ac_prog_rejected=no
22953as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22954for as_dir in $PATH
22955do
22956  IFS=$as_save_IFS
22957  test -z "$as_dir" && as_dir=.
22958    for ac_exec_ext in '' $ac_executable_extensions; do
22959  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22960    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
22961       ac_prog_rejected=yes
22962       continue
22963     fi
22964    ac_cv_prog_WINLD="link"
22965    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22966    break 2
22967  fi
22968done
22969  done
22970IFS=$as_save_IFS
22971
22972if test $ac_prog_rejected = yes; then
22973  # We found a bogon in the path, so make sure we never use it.
22974  set dummy $ac_cv_prog_WINLD
22975  shift
22976  if test $# != 0; then
22977    # We chose a different compiler from the bogus one.
22978    # However, it has the same basename, so the bogon will be chosen
22979    # first if we set WINLD to just the basename; use the full file name.
22980    shift
22981    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
22982  fi
22983fi
22984fi
22985fi
22986WINLD=$ac_cv_prog_WINLD
22987if test -n "$WINLD"; then
22988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
22989$as_echo "$WINLD" >&6; }
22990else
22991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22992$as_echo "no" >&6; }
22993fi
22994
22995
22996    # Since we must ignore the first found link, WINLD will contain
22997    # the full path to the link.exe program.
22998
22999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23000
23001  # First separate the path from the arguments. This will split at the first
23002  # space.
23003  complete="$WINLD"
23004  path="${complete%% *}"
23005  tmp="$complete EOL"
23006  arguments="${tmp#* }"
23007
23008  # Input might be given as Windows format, start by converting to
23009  # unix format.
23010  new_path=`$CYGPATH -u "$path"`
23011
23012  # Now try to locate executable using which
23013  new_path=`$WHICH "$new_path" 2> /dev/null`
23014  # bat and cmd files are not always considered executable in cygwin causing which
23015  # to not find them
23016  if test "x$new_path" = x \
23017           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23018           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23019    new_path=`$CYGPATH -u "$path"`
23020  fi
23021  if test "x$new_path" = x; then
23022    # Oops. Which didn't find the executable.
23023    # The splitting of arguments from the executable at a space might have been incorrect,
23024    # since paths with space are more likely in Windows. Give it another try with the whole
23025    # argument.
23026    path="$complete"
23027    arguments="EOL"
23028    new_path=`$CYGPATH -u "$path"`
23029    new_path=`$WHICH "$new_path" 2> /dev/null`
23030    # bat and cmd files are not always considered executable in cygwin causing which
23031    # to not find them
23032    if test "x$new_path" = x \
23033             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23034             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23035      new_path=`$CYGPATH -u "$path"`
23036    fi
23037    if test "x$new_path" = x; then
23038      # It's still not found. Now this is an unrecoverable error.
23039      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23040$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23041      has_space=`$ECHO "$complete" | $GREP " "`
23042      if test "x$has_space" != x; then
23043        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23044$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23045      fi
23046      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23047    fi
23048  fi
23049
23050  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23051  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23052  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23053  # "foo.exe" is OK but "foo" is an error.
23054  #
23055  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23056  # It is also a way to make sure we got the proper file name for the real test later on.
23057  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23058  if test "x$test_shortpath" = x; then
23059    # Short path failed, file does not exist as specified.
23060    # Try adding .exe or .cmd
23061    if test -f "${new_path}.exe"; then
23062       input_to_shortpath="${new_path}.exe"
23063    elif test -f "${new_path}.cmd"; then
23064       input_to_shortpath="${new_path}.cmd"
23065    else
23066      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
23067$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
23068      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23069$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23070      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23071    fi
23072  else
23073    input_to_shortpath="$new_path"
23074  fi
23075
23076  # Call helper function which possibly converts this using DOS-style short mode.
23077  # If so, the updated path is stored in $new_path.
23078  new_path="$input_to_shortpath"
23079
23080  input_path="$input_to_shortpath"
23081  # Check if we need to convert this using DOS-style short mode. If the path
23082  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23083  # take no chances and rewrite it.
23084  # Note: m4 eats our [], so we need to use [ and ] instead.
23085  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23086  if test "x$has_forbidden_chars" != x; then
23087    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23088    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23089    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23090    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23091      # Going to short mode and back again did indeed matter. Since short mode is
23092      # case insensitive, let's make it lowercase to improve readability.
23093      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23094      # Now convert it back to Unix-stile (cygpath)
23095      input_path=`$CYGPATH -u "$shortmode_path"`
23096      new_path="$input_path"
23097    fi
23098  fi
23099
23100  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23101  if test "x$test_cygdrive_prefix" = x; then
23102    # As a simple fix, exclude /usr/bin since it's not a real path.
23103    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23104      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23105      # a path prefixed by /cygdrive for fixpath to work.
23106      new_path="$CYGWIN_ROOT_PATH$input_path"
23107    fi
23108  fi
23109
23110  # remove trailing .exe if any
23111  new_path="${new_path/%.exe/}"
23112
23113  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23114
23115  # First separate the path from the arguments. This will split at the first
23116  # space.
23117  complete="$WINLD"
23118  path="${complete%% *}"
23119  tmp="$complete EOL"
23120  arguments="${tmp#* }"
23121
23122  # Input might be given as Windows format, start by converting to
23123  # unix format.
23124  new_path="$path"
23125
23126  windows_path="$new_path"
23127  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23128    unix_path=`$CYGPATH -u "$windows_path"`
23129    new_path="$unix_path"
23130  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23131    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23132    new_path="$unix_path"
23133  fi
23134
23135
23136  # Now try to locate executable using which
23137  new_path=`$WHICH "$new_path" 2> /dev/null`
23138
23139  if test "x$new_path" = x; then
23140    # Oops. Which didn't find the executable.
23141    # The splitting of arguments from the executable at a space might have been incorrect,
23142    # since paths with space are more likely in Windows. Give it another try with the whole
23143    # argument.
23144    path="$complete"
23145    arguments="EOL"
23146    new_path="$path"
23147
23148  windows_path="$new_path"
23149  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23150    unix_path=`$CYGPATH -u "$windows_path"`
23151    new_path="$unix_path"
23152  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23153    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23154    new_path="$unix_path"
23155  fi
23156
23157
23158    new_path=`$WHICH "$new_path" 2> /dev/null`
23159
23160    if test "x$new_path" = x; then
23161      # It's still not found. Now this is an unrecoverable error.
23162      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23163$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23164      has_space=`$ECHO "$complete" | $GREP " "`
23165      if test "x$has_space" != x; then
23166        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23167$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23168      fi
23169      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23170    fi
23171  fi
23172
23173  # Now new_path has a complete unix path to the binary
23174  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23175    # Keep paths in /bin as-is, but remove trailing .exe if any
23176    new_path="${new_path/%.exe/}"
23177    # Do not save /bin paths to all_fixpath_prefixes!
23178  else
23179    # Not in mixed or Windows style, start by that.
23180    new_path=`cmd //c echo $new_path`
23181
23182  input_path="$new_path"
23183  # Check if we need to convert this using DOS-style short mode. If the path
23184  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23185  # take no chances and rewrite it.
23186  # Note: m4 eats our [], so we need to use [ and ] instead.
23187  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23188  if test "x$has_forbidden_chars" != x; then
23189    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23190    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23191  fi
23192
23193    # Output is in $new_path
23194
23195  windows_path="$new_path"
23196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23197    unix_path=`$CYGPATH -u "$windows_path"`
23198    new_path="$unix_path"
23199  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23200    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23201    new_path="$unix_path"
23202  fi
23203
23204    # remove trailing .exe if any
23205    new_path="${new_path/%.exe/}"
23206
23207    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23208    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23209  fi
23210
23211  else
23212    # We're on a posix platform. Hooray! :)
23213    # First separate the path from the arguments. This will split at the first
23214    # space.
23215    complete="$WINLD"
23216    path="${complete%% *}"
23217    tmp="$complete EOL"
23218    arguments="${tmp#* }"
23219
23220    # Cannot rely on the command "which" here since it doesn't always work.
23221    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23222    if test -z "$is_absolute_path"; then
23223      # Path to executable is not absolute. Find it.
23224      IFS_save="$IFS"
23225      IFS=:
23226      for p in $PATH; do
23227        if test -f "$p/$path" && test -x "$p/$path"; then
23228          new_path="$p/$path"
23229          break
23230        fi
23231      done
23232      IFS="$IFS_save"
23233    else
23234      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
23235$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
23236      new_path="$path"
23237    fi
23238
23239    if test "x$new_path" = x; then
23240        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23241$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23242        has_space=`$ECHO "$complete" | $GREP " "`
23243        if test "x$has_space" != x; then
23244          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23245$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23246        fi
23247        as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23248      fi
23249  fi
23250
23251      # Now join together the path and the arguments once again
23252      if test "x$arguments" != xEOL; then
23253        new_complete="$new_path ${arguments% *}"
23254      else
23255        new_complete="$new_path"
23256      fi
23257
23258  if test "x$complete" != "x$new_complete"; then
23259      WINLD="$new_complete"
23260      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
23261$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
23262    fi
23263
23264    printf "Windows linker was found at $WINLD\n"
23265    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
23266$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
23267    "$WINLD" --version > /dev/null
23268    if test $? -eq 0 ; then
23269      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23270$as_echo "no" >&6; }
23271      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
23272    else
23273      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23274$as_echo "yes" >&6; }
23275    fi
23276    LD="$WINLD"
23277    LDEXE="$WINLD"
23278    LDCXX="$WINLD"
23279    LDEXECXX="$WINLD"
23280
23281    # Extract the first word of "mt", so it can be a program name with args.
23282set dummy mt; ac_word=$2
23283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23284$as_echo_n "checking for $ac_word... " >&6; }
23285if ${ac_cv_prog_MT+:} false; then :
23286  $as_echo_n "(cached) " >&6
23287else
23288  if test -n "$MT"; then
23289  ac_cv_prog_MT="$MT" # Let the user override the test.
23290else
23291  ac_prog_rejected=no
23292as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23293for as_dir in $PATH
23294do
23295  IFS=$as_save_IFS
23296  test -z "$as_dir" && as_dir=.
23297    for ac_exec_ext in '' $ac_executable_extensions; do
23298  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23299    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
23300       ac_prog_rejected=yes
23301       continue
23302     fi
23303    ac_cv_prog_MT="mt"
23304    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23305    break 2
23306  fi
23307done
23308  done
23309IFS=$as_save_IFS
23310
23311if test $ac_prog_rejected = yes; then
23312  # We found a bogon in the path, so make sure we never use it.
23313  set dummy $ac_cv_prog_MT
23314  shift
23315  if test $# != 0; then
23316    # We chose a different compiler from the bogus one.
23317    # However, it has the same basename, so the bogon will be chosen
23318    # first if we set MT to just the basename; use the full file name.
23319    shift
23320    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
23321  fi
23322fi
23323fi
23324fi
23325MT=$ac_cv_prog_MT
23326if test -n "$MT"; then
23327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
23328$as_echo "$MT" >&6; }
23329else
23330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23331$as_echo "no" >&6; }
23332fi
23333
23334
23335
23336  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23337
23338  # First separate the path from the arguments. This will split at the first
23339  # space.
23340  complete="$MT"
23341  path="${complete%% *}"
23342  tmp="$complete EOL"
23343  arguments="${tmp#* }"
23344
23345  # Input might be given as Windows format, start by converting to
23346  # unix format.
23347  new_path=`$CYGPATH -u "$path"`
23348
23349  # Now try to locate executable using which
23350  new_path=`$WHICH "$new_path" 2> /dev/null`
23351  # bat and cmd files are not always considered executable in cygwin causing which
23352  # to not find them
23353  if test "x$new_path" = x \
23354           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23355           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23356    new_path=`$CYGPATH -u "$path"`
23357  fi
23358  if test "x$new_path" = x; then
23359    # Oops. Which didn't find the executable.
23360    # The splitting of arguments from the executable at a space might have been incorrect,
23361    # since paths with space are more likely in Windows. Give it another try with the whole
23362    # argument.
23363    path="$complete"
23364    arguments="EOL"
23365    new_path=`$CYGPATH -u "$path"`
23366    new_path=`$WHICH "$new_path" 2> /dev/null`
23367    # bat and cmd files are not always considered executable in cygwin causing which
23368    # to not find them
23369    if test "x$new_path" = x \
23370             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23371             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23372      new_path=`$CYGPATH -u "$path"`
23373    fi
23374    if test "x$new_path" = x; then
23375      # It's still not found. Now this is an unrecoverable error.
23376      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23377$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23378      has_space=`$ECHO "$complete" | $GREP " "`
23379      if test "x$has_space" != x; then
23380        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23381$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23382      fi
23383      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23384    fi
23385  fi
23386
23387  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23388  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23389  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23390  # "foo.exe" is OK but "foo" is an error.
23391  #
23392  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23393  # It is also a way to make sure we got the proper file name for the real test later on.
23394  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23395  if test "x$test_shortpath" = x; then
23396    # Short path failed, file does not exist as specified.
23397    # Try adding .exe or .cmd
23398    if test -f "${new_path}.exe"; then
23399       input_to_shortpath="${new_path}.exe"
23400    elif test -f "${new_path}.cmd"; then
23401       input_to_shortpath="${new_path}.cmd"
23402    else
23403      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
23404$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
23405      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23406$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23407      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23408    fi
23409  else
23410    input_to_shortpath="$new_path"
23411  fi
23412
23413  # Call helper function which possibly converts this using DOS-style short mode.
23414  # If so, the updated path is stored in $new_path.
23415  new_path="$input_to_shortpath"
23416
23417  input_path="$input_to_shortpath"
23418  # Check if we need to convert this using DOS-style short mode. If the path
23419  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23420  # take no chances and rewrite it.
23421  # Note: m4 eats our [], so we need to use [ and ] instead.
23422  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23423  if test "x$has_forbidden_chars" != x; then
23424    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23425    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23426    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23427    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23428      # Going to short mode and back again did indeed matter. Since short mode is
23429      # case insensitive, let's make it lowercase to improve readability.
23430      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23431      # Now convert it back to Unix-stile (cygpath)
23432      input_path=`$CYGPATH -u "$shortmode_path"`
23433      new_path="$input_path"
23434    fi
23435  fi
23436
23437  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23438  if test "x$test_cygdrive_prefix" = x; then
23439    # As a simple fix, exclude /usr/bin since it's not a real path.
23440    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23441      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23442      # a path prefixed by /cygdrive for fixpath to work.
23443      new_path="$CYGWIN_ROOT_PATH$input_path"
23444    fi
23445  fi
23446
23447  # remove trailing .exe if any
23448  new_path="${new_path/%.exe/}"
23449
23450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23451
23452  # First separate the path from the arguments. This will split at the first
23453  # space.
23454  complete="$MT"
23455  path="${complete%% *}"
23456  tmp="$complete EOL"
23457  arguments="${tmp#* }"
23458
23459  # Input might be given as Windows format, start by converting to
23460  # unix format.
23461  new_path="$path"
23462
23463  windows_path="$new_path"
23464  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23465    unix_path=`$CYGPATH -u "$windows_path"`
23466    new_path="$unix_path"
23467  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23468    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23469    new_path="$unix_path"
23470  fi
23471
23472
23473  # Now try to locate executable using which
23474  new_path=`$WHICH "$new_path" 2> /dev/null`
23475
23476  if test "x$new_path" = x; then
23477    # Oops. Which didn't find the executable.
23478    # The splitting of arguments from the executable at a space might have been incorrect,
23479    # since paths with space are more likely in Windows. Give it another try with the whole
23480    # argument.
23481    path="$complete"
23482    arguments="EOL"
23483    new_path="$path"
23484
23485  windows_path="$new_path"
23486  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23487    unix_path=`$CYGPATH -u "$windows_path"`
23488    new_path="$unix_path"
23489  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23490    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23491    new_path="$unix_path"
23492  fi
23493
23494
23495    new_path=`$WHICH "$new_path" 2> /dev/null`
23496
23497    if test "x$new_path" = x; then
23498      # It's still not found. Now this is an unrecoverable error.
23499      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23500$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23501      has_space=`$ECHO "$complete" | $GREP " "`
23502      if test "x$has_space" != x; then
23503        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23504$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23505      fi
23506      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23507    fi
23508  fi
23509
23510  # Now new_path has a complete unix path to the binary
23511  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23512    # Keep paths in /bin as-is, but remove trailing .exe if any
23513    new_path="${new_path/%.exe/}"
23514    # Do not save /bin paths to all_fixpath_prefixes!
23515  else
23516    # Not in mixed or Windows style, start by that.
23517    new_path=`cmd //c echo $new_path`
23518
23519  input_path="$new_path"
23520  # Check if we need to convert this using DOS-style short mode. If the path
23521  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23522  # take no chances and rewrite it.
23523  # Note: m4 eats our [], so we need to use [ and ] instead.
23524  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23525  if test "x$has_forbidden_chars" != x; then
23526    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23527    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23528  fi
23529
23530    # Output is in $new_path
23531
23532  windows_path="$new_path"
23533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23534    unix_path=`$CYGPATH -u "$windows_path"`
23535    new_path="$unix_path"
23536  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23537    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23538    new_path="$unix_path"
23539  fi
23540
23541    # remove trailing .exe if any
23542    new_path="${new_path/%.exe/}"
23543
23544    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23545    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23546  fi
23547
23548  else
23549    # We're on a posix platform. Hooray! :)
23550    # First separate the path from the arguments. This will split at the first
23551    # space.
23552    complete="$MT"
23553    path="${complete%% *}"
23554    tmp="$complete EOL"
23555    arguments="${tmp#* }"
23556
23557    # Cannot rely on the command "which" here since it doesn't always work.
23558    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23559    if test -z "$is_absolute_path"; then
23560      # Path to executable is not absolute. Find it.
23561      IFS_save="$IFS"
23562      IFS=:
23563      for p in $PATH; do
23564        if test -f "$p/$path" && test -x "$p/$path"; then
23565          new_path="$p/$path"
23566          break
23567        fi
23568      done
23569      IFS="$IFS_save"
23570    else
23571      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
23572$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
23573      new_path="$path"
23574    fi
23575
23576    if test "x$new_path" = x; then
23577        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23578$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23579        has_space=`$ECHO "$complete" | $GREP " "`
23580        if test "x$has_space" != x; then
23581          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23582$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23583        fi
23584        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23585      fi
23586  fi
23587
23588      # Now join together the path and the arguments once again
23589      if test "x$arguments" != xEOL; then
23590        new_complete="$new_path ${arguments% *}"
23591      else
23592        new_complete="$new_path"
23593      fi
23594
23595  if test "x$complete" != "x$new_complete"; then
23596      MT="$new_complete"
23597      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
23598$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
23599    fi
23600
23601    # The resource compiler
23602    # Extract the first word of "rc", so it can be a program name with args.
23603set dummy rc; ac_word=$2
23604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23605$as_echo_n "checking for $ac_word... " >&6; }
23606if ${ac_cv_prog_RC+:} false; then :
23607  $as_echo_n "(cached) " >&6
23608else
23609  if test -n "$RC"; then
23610  ac_cv_prog_RC="$RC" # Let the user override the test.
23611else
23612  ac_prog_rejected=no
23613as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23614for as_dir in $PATH
23615do
23616  IFS=$as_save_IFS
23617  test -z "$as_dir" && as_dir=.
23618    for ac_exec_ext in '' $ac_executable_extensions; do
23619  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23620    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
23621       ac_prog_rejected=yes
23622       continue
23623     fi
23624    ac_cv_prog_RC="rc"
23625    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23626    break 2
23627  fi
23628done
23629  done
23630IFS=$as_save_IFS
23631
23632if test $ac_prog_rejected = yes; then
23633  # We found a bogon in the path, so make sure we never use it.
23634  set dummy $ac_cv_prog_RC
23635  shift
23636  if test $# != 0; then
23637    # We chose a different compiler from the bogus one.
23638    # However, it has the same basename, so the bogon will be chosen
23639    # first if we set RC to just the basename; use the full file name.
23640    shift
23641    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
23642  fi
23643fi
23644fi
23645fi
23646RC=$ac_cv_prog_RC
23647if test -n "$RC"; then
23648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23649$as_echo "$RC" >&6; }
23650else
23651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23652$as_echo "no" >&6; }
23653fi
23654
23655
23656
23657  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23658
23659  # First separate the path from the arguments. This will split at the first
23660  # space.
23661  complete="$RC"
23662  path="${complete%% *}"
23663  tmp="$complete EOL"
23664  arguments="${tmp#* }"
23665
23666  # Input might be given as Windows format, start by converting to
23667  # unix format.
23668  new_path=`$CYGPATH -u "$path"`
23669
23670  # Now try to locate executable using which
23671  new_path=`$WHICH "$new_path" 2> /dev/null`
23672  # bat and cmd files are not always considered executable in cygwin causing which
23673  # to not find them
23674  if test "x$new_path" = x \
23675           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23676           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23677    new_path=`$CYGPATH -u "$path"`
23678  fi
23679  if test "x$new_path" = x; then
23680    # Oops. Which didn't find the executable.
23681    # The splitting of arguments from the executable at a space might have been incorrect,
23682    # since paths with space are more likely in Windows. Give it another try with the whole
23683    # argument.
23684    path="$complete"
23685    arguments="EOL"
23686    new_path=`$CYGPATH -u "$path"`
23687    new_path=`$WHICH "$new_path" 2> /dev/null`
23688    # bat and cmd files are not always considered executable in cygwin causing which
23689    # to not find them
23690    if test "x$new_path" = x \
23691             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23692             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23693      new_path=`$CYGPATH -u "$path"`
23694    fi
23695    if test "x$new_path" = x; then
23696      # It's still not found. Now this is an unrecoverable error.
23697      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23698$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23699      has_space=`$ECHO "$complete" | $GREP " "`
23700      if test "x$has_space" != x; then
23701        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23702$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23703      fi
23704      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23705    fi
23706  fi
23707
23708  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23709  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23710  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23711  # "foo.exe" is OK but "foo" is an error.
23712  #
23713  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23714  # It is also a way to make sure we got the proper file name for the real test later on.
23715  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23716  if test "x$test_shortpath" = x; then
23717    # Short path failed, file does not exist as specified.
23718    # Try adding .exe or .cmd
23719    if test -f "${new_path}.exe"; then
23720       input_to_shortpath="${new_path}.exe"
23721    elif test -f "${new_path}.cmd"; then
23722       input_to_shortpath="${new_path}.cmd"
23723    else
23724      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23725$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23726      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23727$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23728      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23729    fi
23730  else
23731    input_to_shortpath="$new_path"
23732  fi
23733
23734  # Call helper function which possibly converts this using DOS-style short mode.
23735  # If so, the updated path is stored in $new_path.
23736  new_path="$input_to_shortpath"
23737
23738  input_path="$input_to_shortpath"
23739  # Check if we need to convert this using DOS-style short mode. If the path
23740  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23741  # take no chances and rewrite it.
23742  # Note: m4 eats our [], so we need to use [ and ] instead.
23743  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23744  if test "x$has_forbidden_chars" != x; then
23745    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23746    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23747    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23748    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23749      # Going to short mode and back again did indeed matter. Since short mode is
23750      # case insensitive, let's make it lowercase to improve readability.
23751      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23752      # Now convert it back to Unix-stile (cygpath)
23753      input_path=`$CYGPATH -u "$shortmode_path"`
23754      new_path="$input_path"
23755    fi
23756  fi
23757
23758  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23759  if test "x$test_cygdrive_prefix" = x; then
23760    # As a simple fix, exclude /usr/bin since it's not a real path.
23761    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23762      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23763      # a path prefixed by /cygdrive for fixpath to work.
23764      new_path="$CYGWIN_ROOT_PATH$input_path"
23765    fi
23766  fi
23767
23768  # remove trailing .exe if any
23769  new_path="${new_path/%.exe/}"
23770
23771  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23772
23773  # First separate the path from the arguments. This will split at the first
23774  # space.
23775  complete="$RC"
23776  path="${complete%% *}"
23777  tmp="$complete EOL"
23778  arguments="${tmp#* }"
23779
23780  # Input might be given as Windows format, start by converting to
23781  # unix format.
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  # Now try to locate executable using which
23795  new_path=`$WHICH "$new_path" 2> /dev/null`
23796
23797  if test "x$new_path" = x; then
23798    # Oops. Which didn't find the executable.
23799    # The splitting of arguments from the executable at a space might have been incorrect,
23800    # since paths with space are more likely in Windows. Give it another try with the whole
23801    # argument.
23802    path="$complete"
23803    arguments="EOL"
23804    new_path="$path"
23805
23806  windows_path="$new_path"
23807  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23808    unix_path=`$CYGPATH -u "$windows_path"`
23809    new_path="$unix_path"
23810  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23811    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23812    new_path="$unix_path"
23813  fi
23814
23815
23816    new_path=`$WHICH "$new_path" 2> /dev/null`
23817
23818    if test "x$new_path" = x; then
23819      # It's still not found. Now this is an unrecoverable error.
23820      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23821$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23822      has_space=`$ECHO "$complete" | $GREP " "`
23823      if test "x$has_space" != x; then
23824        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23825$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23826      fi
23827      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23828    fi
23829  fi
23830
23831  # Now new_path has a complete unix path to the binary
23832  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23833    # Keep paths in /bin as-is, but remove trailing .exe if any
23834    new_path="${new_path/%.exe/}"
23835    # Do not save /bin paths to all_fixpath_prefixes!
23836  else
23837    # Not in mixed or Windows style, start by that.
23838    new_path=`cmd //c echo $new_path`
23839
23840  input_path="$new_path"
23841  # Check if we need to convert this using DOS-style short mode. If the path
23842  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23843  # take no chances and rewrite it.
23844  # Note: m4 eats our [], so we need to use [ and ] instead.
23845  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23846  if test "x$has_forbidden_chars" != x; then
23847    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23848    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23849  fi
23850
23851    # Output is in $new_path
23852
23853  windows_path="$new_path"
23854  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23855    unix_path=`$CYGPATH -u "$windows_path"`
23856    new_path="$unix_path"
23857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23858    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23859    new_path="$unix_path"
23860  fi
23861
23862    # remove trailing .exe if any
23863    new_path="${new_path/%.exe/}"
23864
23865    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23866    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23867  fi
23868
23869  else
23870    # We're on a posix platform. Hooray! :)
23871    # First separate the path from the arguments. This will split at the first
23872    # space.
23873    complete="$RC"
23874    path="${complete%% *}"
23875    tmp="$complete EOL"
23876    arguments="${tmp#* }"
23877
23878    # Cannot rely on the command "which" here since it doesn't always work.
23879    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23880    if test -z "$is_absolute_path"; then
23881      # Path to executable is not absolute. Find it.
23882      IFS_save="$IFS"
23883      IFS=:
23884      for p in $PATH; do
23885        if test -f "$p/$path" && test -x "$p/$path"; then
23886          new_path="$p/$path"
23887          break
23888        fi
23889      done
23890      IFS="$IFS_save"
23891    else
23892      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
23893$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
23894      new_path="$path"
23895    fi
23896
23897    if test "x$new_path" = x; then
23898        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23899$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23900        has_space=`$ECHO "$complete" | $GREP " "`
23901        if test "x$has_space" != x; then
23902          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23903$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23904        fi
23905        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23906      fi
23907  fi
23908
23909      # Now join together the path and the arguments once again
23910      if test "x$arguments" != xEOL; then
23911        new_complete="$new_path ${arguments% *}"
23912      else
23913        new_complete="$new_path"
23914      fi
23915
23916  if test "x$complete" != "x$new_complete"; then
23917      RC="$new_complete"
23918      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
23919$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
23920    fi
23921
23922
23923    # For hotspot, we need these in Windows mixed path,
23924    # so rewrite them all. Need added .exe suffix.
23925    HOTSPOT_CXX="$CXX.exe"
23926    HOTSPOT_LD="$LD.exe"
23927    HOTSPOT_MT="$MT.exe"
23928    HOTSPOT_RC="$RC.exe"
23929
23930  unix_path="$HOTSPOT_CXX"
23931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23932    windows_path=`$CYGPATH -m "$unix_path"`
23933    HOTSPOT_CXX="$windows_path"
23934  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23935    windows_path=`cmd //c echo $unix_path`
23936    HOTSPOT_CXX="$windows_path"
23937  fi
23938
23939
23940  unix_path="$HOTSPOT_LD"
23941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23942    windows_path=`$CYGPATH -m "$unix_path"`
23943    HOTSPOT_LD="$windows_path"
23944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23945    windows_path=`cmd //c echo $unix_path`
23946    HOTSPOT_LD="$windows_path"
23947  fi
23948
23949
23950  unix_path="$HOTSPOT_MT"
23951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23952    windows_path=`$CYGPATH -m "$unix_path"`
23953    HOTSPOT_MT="$windows_path"
23954  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23955    windows_path=`cmd //c echo $unix_path`
23956    HOTSPOT_MT="$windows_path"
23957  fi
23958
23959
23960  unix_path="$HOTSPOT_RC"
23961  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23962    windows_path=`$CYGPATH -m "$unix_path"`
23963    HOTSPOT_RC="$windows_path"
23964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23965    windows_path=`cmd //c echo $unix_path`
23966    HOTSPOT_RC="$windows_path"
23967  fi
23968
23969
23970
23971
23972    RC_FLAGS="-nologo -l 0x409 -r"
23973    if test "x$VARIANT" = xOPT; then :
23974
23975        RC_FLAGS="$RC_FLAGS -d NDEBUG"
23976
23977fi
23978
23979    # The version variables used to create RC_FLAGS may be overridden
23980    # in a custom configure script, or possibly the command line.
23981    # Let those variables be expanded at make time in spec.gmk.
23982    # The \$ are escaped to the shell, and the $(...) variables
23983    # are evaluated by make.
23984    RC_FLAGS="$RC_FLAGS \
23985        -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
23986        -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
23987        -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
23988        -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
23989        -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
23990        -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
23991        -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
23992
23993    # lib.exe is used to create static libraries.
23994    # Extract the first word of "lib", so it can be a program name with args.
23995set dummy lib; ac_word=$2
23996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23997$as_echo_n "checking for $ac_word... " >&6; }
23998if ${ac_cv_prog_WINAR+:} false; then :
23999  $as_echo_n "(cached) " >&6
24000else
24001  if test -n "$WINAR"; then
24002  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
24003else
24004as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24005for as_dir in $PATH
24006do
24007  IFS=$as_save_IFS
24008  test -z "$as_dir" && as_dir=.
24009    for ac_exec_ext in '' $ac_executable_extensions; do
24010  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24011    ac_cv_prog_WINAR="lib"
24012    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24013    break 2
24014  fi
24015done
24016  done
24017IFS=$as_save_IFS
24018
24019fi
24020fi
24021WINAR=$ac_cv_prog_WINAR
24022if test -n "$WINAR"; then
24023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
24024$as_echo "$WINAR" >&6; }
24025else
24026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24027$as_echo "no" >&6; }
24028fi
24029
24030
24031
24032  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24033
24034  # First separate the path from the arguments. This will split at the first
24035  # space.
24036  complete="$WINAR"
24037  path="${complete%% *}"
24038  tmp="$complete EOL"
24039  arguments="${tmp#* }"
24040
24041  # Input might be given as Windows format, start by converting to
24042  # unix format.
24043  new_path=`$CYGPATH -u "$path"`
24044
24045  # Now try to locate executable using which
24046  new_path=`$WHICH "$new_path" 2> /dev/null`
24047  # bat and cmd files are not always considered executable in cygwin causing which
24048  # to not find them
24049  if test "x$new_path" = x \
24050           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24051           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24052    new_path=`$CYGPATH -u "$path"`
24053  fi
24054  if test "x$new_path" = x; then
24055    # Oops. Which didn't find the executable.
24056    # The splitting of arguments from the executable at a space might have been incorrect,
24057    # since paths with space are more likely in Windows. Give it another try with the whole
24058    # argument.
24059    path="$complete"
24060    arguments="EOL"
24061    new_path=`$CYGPATH -u "$path"`
24062    new_path=`$WHICH "$new_path" 2> /dev/null`
24063    # bat and cmd files are not always considered executable in cygwin causing which
24064    # to not find them
24065    if test "x$new_path" = x \
24066             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24067             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24068      new_path=`$CYGPATH -u "$path"`
24069    fi
24070    if test "x$new_path" = x; then
24071      # It's still not found. Now this is an unrecoverable error.
24072      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24073$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24074      has_space=`$ECHO "$complete" | $GREP " "`
24075      if test "x$has_space" != x; then
24076        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24077$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24078      fi
24079      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24080    fi
24081  fi
24082
24083  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24084  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24085  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24086  # "foo.exe" is OK but "foo" is an error.
24087  #
24088  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24089  # It is also a way to make sure we got the proper file name for the real test later on.
24090  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24091  if test "x$test_shortpath" = x; then
24092    # Short path failed, file does not exist as specified.
24093    # Try adding .exe or .cmd
24094    if test -f "${new_path}.exe"; then
24095       input_to_shortpath="${new_path}.exe"
24096    elif test -f "${new_path}.cmd"; then
24097       input_to_shortpath="${new_path}.cmd"
24098    else
24099      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
24100$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
24101      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24102$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24103      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24104    fi
24105  else
24106    input_to_shortpath="$new_path"
24107  fi
24108
24109  # Call helper function which possibly converts this using DOS-style short mode.
24110  # If so, the updated path is stored in $new_path.
24111  new_path="$input_to_shortpath"
24112
24113  input_path="$input_to_shortpath"
24114  # Check if we need to convert this using DOS-style short mode. If the path
24115  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24116  # take no chances and rewrite it.
24117  # Note: m4 eats our [], so we need to use [ and ] instead.
24118  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24119  if test "x$has_forbidden_chars" != x; then
24120    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24121    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24122    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24123    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24124      # Going to short mode and back again did indeed matter. Since short mode is
24125      # case insensitive, let's make it lowercase to improve readability.
24126      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24127      # Now convert it back to Unix-stile (cygpath)
24128      input_path=`$CYGPATH -u "$shortmode_path"`
24129      new_path="$input_path"
24130    fi
24131  fi
24132
24133  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24134  if test "x$test_cygdrive_prefix" = x; then
24135    # As a simple fix, exclude /usr/bin since it's not a real path.
24136    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24137      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24138      # a path prefixed by /cygdrive for fixpath to work.
24139      new_path="$CYGWIN_ROOT_PATH$input_path"
24140    fi
24141  fi
24142
24143  # remove trailing .exe if any
24144  new_path="${new_path/%.exe/}"
24145
24146  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24147
24148  # First separate the path from the arguments. This will split at the first
24149  # space.
24150  complete="$WINAR"
24151  path="${complete%% *}"
24152  tmp="$complete EOL"
24153  arguments="${tmp#* }"
24154
24155  # Input might be given as Windows format, start by converting to
24156  # unix format.
24157  new_path="$path"
24158
24159  windows_path="$new_path"
24160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24161    unix_path=`$CYGPATH -u "$windows_path"`
24162    new_path="$unix_path"
24163  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24164    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24165    new_path="$unix_path"
24166  fi
24167
24168
24169  # Now try to locate executable using which
24170  new_path=`$WHICH "$new_path" 2> /dev/null`
24171
24172  if test "x$new_path" = x; then
24173    # Oops. Which didn't find the executable.
24174    # The splitting of arguments from the executable at a space might have been incorrect,
24175    # since paths with space are more likely in Windows. Give it another try with the whole
24176    # argument.
24177    path="$complete"
24178    arguments="EOL"
24179    new_path="$path"
24180
24181  windows_path="$new_path"
24182  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24183    unix_path=`$CYGPATH -u "$windows_path"`
24184    new_path="$unix_path"
24185  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24186    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24187    new_path="$unix_path"
24188  fi
24189
24190
24191    new_path=`$WHICH "$new_path" 2> /dev/null`
24192
24193    if test "x$new_path" = x; then
24194      # It's still not found. Now this is an unrecoverable error.
24195      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24196$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24197      has_space=`$ECHO "$complete" | $GREP " "`
24198      if test "x$has_space" != x; then
24199        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24200$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24201      fi
24202      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24203    fi
24204  fi
24205
24206  # Now new_path has a complete unix path to the binary
24207  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24208    # Keep paths in /bin as-is, but remove trailing .exe if any
24209    new_path="${new_path/%.exe/}"
24210    # Do not save /bin paths to all_fixpath_prefixes!
24211  else
24212    # Not in mixed or Windows style, start by that.
24213    new_path=`cmd //c echo $new_path`
24214
24215  input_path="$new_path"
24216  # Check if we need to convert this using DOS-style short mode. If the path
24217  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24218  # take no chances and rewrite it.
24219  # Note: m4 eats our [], so we need to use [ and ] instead.
24220  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24221  if test "x$has_forbidden_chars" != x; then
24222    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24223    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24224  fi
24225
24226    # Output is in $new_path
24227
24228  windows_path="$new_path"
24229  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24230    unix_path=`$CYGPATH -u "$windows_path"`
24231    new_path="$unix_path"
24232  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24233    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24234    new_path="$unix_path"
24235  fi
24236
24237    # remove trailing .exe if any
24238    new_path="${new_path/%.exe/}"
24239
24240    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24241    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24242  fi
24243
24244  else
24245    # We're on a posix platform. Hooray! :)
24246    # First separate the path from the arguments. This will split at the first
24247    # space.
24248    complete="$WINAR"
24249    path="${complete%% *}"
24250    tmp="$complete EOL"
24251    arguments="${tmp#* }"
24252
24253    # Cannot rely on the command "which" here since it doesn't always work.
24254    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24255    if test -z "$is_absolute_path"; then
24256      # Path to executable is not absolute. Find it.
24257      IFS_save="$IFS"
24258      IFS=:
24259      for p in $PATH; do
24260        if test -f "$p/$path" && test -x "$p/$path"; then
24261          new_path="$p/$path"
24262          break
24263        fi
24264      done
24265      IFS="$IFS_save"
24266    else
24267      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
24268$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
24269      new_path="$path"
24270    fi
24271
24272    if test "x$new_path" = x; then
24273        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24274$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24275        has_space=`$ECHO "$complete" | $GREP " "`
24276        if test "x$has_space" != x; then
24277          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24278$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24279        fi
24280        as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24281      fi
24282  fi
24283
24284      # Now join together the path and the arguments once again
24285      if test "x$arguments" != xEOL; then
24286        new_complete="$new_path ${arguments% *}"
24287      else
24288        new_complete="$new_path"
24289      fi
24290
24291  if test "x$complete" != "x$new_complete"; then
24292      WINAR="$new_complete"
24293      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
24294$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
24295    fi
24296
24297    AR="$WINAR"
24298    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
24299
24300    # Extract the first word of "dumpbin", so it can be a program name with args.
24301set dummy dumpbin; ac_word=$2
24302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24303$as_echo_n "checking for $ac_word... " >&6; }
24304if ${ac_cv_prog_DUMPBIN+:} false; then :
24305  $as_echo_n "(cached) " >&6
24306else
24307  if test -n "$DUMPBIN"; then
24308  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
24309else
24310as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24311for as_dir in $PATH
24312do
24313  IFS=$as_save_IFS
24314  test -z "$as_dir" && as_dir=.
24315    for ac_exec_ext in '' $ac_executable_extensions; do
24316  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24317    ac_cv_prog_DUMPBIN="dumpbin"
24318    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24319    break 2
24320  fi
24321done
24322  done
24323IFS=$as_save_IFS
24324
24325fi
24326fi
24327DUMPBIN=$ac_cv_prog_DUMPBIN
24328if test -n "$DUMPBIN"; then
24329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
24330$as_echo "$DUMPBIN" >&6; }
24331else
24332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24333$as_echo "no" >&6; }
24334fi
24335
24336
24337
24338  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24339
24340  # First separate the path from the arguments. This will split at the first
24341  # space.
24342  complete="$DUMPBIN"
24343  path="${complete%% *}"
24344  tmp="$complete EOL"
24345  arguments="${tmp#* }"
24346
24347  # Input might be given as Windows format, start by converting to
24348  # unix format.
24349  new_path=`$CYGPATH -u "$path"`
24350
24351  # Now try to locate executable using which
24352  new_path=`$WHICH "$new_path" 2> /dev/null`
24353  # bat and cmd files are not always considered executable in cygwin causing which
24354  # to not find them
24355  if test "x$new_path" = x \
24356           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24357           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24358    new_path=`$CYGPATH -u "$path"`
24359  fi
24360  if test "x$new_path" = x; then
24361    # Oops. Which didn't find the executable.
24362    # The splitting of arguments from the executable at a space might have been incorrect,
24363    # since paths with space are more likely in Windows. Give it another try with the whole
24364    # argument.
24365    path="$complete"
24366    arguments="EOL"
24367    new_path=`$CYGPATH -u "$path"`
24368    new_path=`$WHICH "$new_path" 2> /dev/null`
24369    # bat and cmd files are not always considered executable in cygwin causing which
24370    # to not find them
24371    if test "x$new_path" = x \
24372             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24373             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24374      new_path=`$CYGPATH -u "$path"`
24375    fi
24376    if test "x$new_path" = x; then
24377      # It's still not found. Now this is an unrecoverable error.
24378      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24379$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24380      has_space=`$ECHO "$complete" | $GREP " "`
24381      if test "x$has_space" != x; then
24382        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24383$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24384      fi
24385      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24386    fi
24387  fi
24388
24389  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24390  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24391  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24392  # "foo.exe" is OK but "foo" is an error.
24393  #
24394  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24395  # It is also a way to make sure we got the proper file name for the real test later on.
24396  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24397  if test "x$test_shortpath" = x; then
24398    # Short path failed, file does not exist as specified.
24399    # Try adding .exe or .cmd
24400    if test -f "${new_path}.exe"; then
24401       input_to_shortpath="${new_path}.exe"
24402    elif test -f "${new_path}.cmd"; then
24403       input_to_shortpath="${new_path}.cmd"
24404    else
24405      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
24406$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
24407      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24408$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24409      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24410    fi
24411  else
24412    input_to_shortpath="$new_path"
24413  fi
24414
24415  # Call helper function which possibly converts this using DOS-style short mode.
24416  # If so, the updated path is stored in $new_path.
24417  new_path="$input_to_shortpath"
24418
24419  input_path="$input_to_shortpath"
24420  # Check if we need to convert this using DOS-style short mode. If the path
24421  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24422  # take no chances and rewrite it.
24423  # Note: m4 eats our [], so we need to use [ and ] instead.
24424  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24425  if test "x$has_forbidden_chars" != x; then
24426    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24427    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24428    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24429    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24430      # Going to short mode and back again did indeed matter. Since short mode is
24431      # case insensitive, let's make it lowercase to improve readability.
24432      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24433      # Now convert it back to Unix-stile (cygpath)
24434      input_path=`$CYGPATH -u "$shortmode_path"`
24435      new_path="$input_path"
24436    fi
24437  fi
24438
24439  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24440  if test "x$test_cygdrive_prefix" = x; then
24441    # As a simple fix, exclude /usr/bin since it's not a real path.
24442    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24443      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24444      # a path prefixed by /cygdrive for fixpath to work.
24445      new_path="$CYGWIN_ROOT_PATH$input_path"
24446    fi
24447  fi
24448
24449  # remove trailing .exe if any
24450  new_path="${new_path/%.exe/}"
24451
24452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24453
24454  # First separate the path from the arguments. This will split at the first
24455  # space.
24456  complete="$DUMPBIN"
24457  path="${complete%% *}"
24458  tmp="$complete EOL"
24459  arguments="${tmp#* }"
24460
24461  # Input might be given as Windows format, start by converting to
24462  # unix format.
24463  new_path="$path"
24464
24465  windows_path="$new_path"
24466  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24467    unix_path=`$CYGPATH -u "$windows_path"`
24468    new_path="$unix_path"
24469  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24470    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24471    new_path="$unix_path"
24472  fi
24473
24474
24475  # Now try to locate executable using which
24476  new_path=`$WHICH "$new_path" 2> /dev/null`
24477
24478  if test "x$new_path" = x; then
24479    # Oops. Which didn't find the executable.
24480    # The splitting of arguments from the executable at a space might have been incorrect,
24481    # since paths with space are more likely in Windows. Give it another try with the whole
24482    # argument.
24483    path="$complete"
24484    arguments="EOL"
24485    new_path="$path"
24486
24487  windows_path="$new_path"
24488  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24489    unix_path=`$CYGPATH -u "$windows_path"`
24490    new_path="$unix_path"
24491  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24492    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24493    new_path="$unix_path"
24494  fi
24495
24496
24497    new_path=`$WHICH "$new_path" 2> /dev/null`
24498
24499    if test "x$new_path" = x; then
24500      # It's still not found. Now this is an unrecoverable error.
24501      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24502$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24503      has_space=`$ECHO "$complete" | $GREP " "`
24504      if test "x$has_space" != x; then
24505        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24506$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24507      fi
24508      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24509    fi
24510  fi
24511
24512  # Now new_path has a complete unix path to the binary
24513  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24514    # Keep paths in /bin as-is, but remove trailing .exe if any
24515    new_path="${new_path/%.exe/}"
24516    # Do not save /bin paths to all_fixpath_prefixes!
24517  else
24518    # Not in mixed or Windows style, start by that.
24519    new_path=`cmd //c echo $new_path`
24520
24521  input_path="$new_path"
24522  # Check if we need to convert this using DOS-style short mode. If the path
24523  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24524  # take no chances and rewrite it.
24525  # Note: m4 eats our [], so we need to use [ and ] instead.
24526  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24527  if test "x$has_forbidden_chars" != x; then
24528    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24529    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24530  fi
24531
24532    # Output is in $new_path
24533
24534  windows_path="$new_path"
24535  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24536    unix_path=`$CYGPATH -u "$windows_path"`
24537    new_path="$unix_path"
24538  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24539    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24540    new_path="$unix_path"
24541  fi
24542
24543    # remove trailing .exe if any
24544    new_path="${new_path/%.exe/}"
24545
24546    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24547    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24548  fi
24549
24550  else
24551    # We're on a posix platform. Hooray! :)
24552    # First separate the path from the arguments. This will split at the first
24553    # space.
24554    complete="$DUMPBIN"
24555    path="${complete%% *}"
24556    tmp="$complete EOL"
24557    arguments="${tmp#* }"
24558
24559    # Cannot rely on the command "which" here since it doesn't always work.
24560    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24561    if test -z "$is_absolute_path"; then
24562      # Path to executable is not absolute. Find it.
24563      IFS_save="$IFS"
24564      IFS=:
24565      for p in $PATH; do
24566        if test -f "$p/$path" && test -x "$p/$path"; then
24567          new_path="$p/$path"
24568          break
24569        fi
24570      done
24571      IFS="$IFS_save"
24572    else
24573      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
24574$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
24575      new_path="$path"
24576    fi
24577
24578    if test "x$new_path" = x; then
24579        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24580$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24581        has_space=`$ECHO "$complete" | $GREP " "`
24582        if test "x$has_space" != x; then
24583          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24584$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24585        fi
24586        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24587      fi
24588  fi
24589
24590      # Now join together the path and the arguments once again
24591      if test "x$arguments" != xEOL; then
24592        new_complete="$new_path ${arguments% *}"
24593      else
24594        new_complete="$new_path"
24595      fi
24596
24597  if test "x$complete" != "x$new_complete"; then
24598      DUMPBIN="$new_complete"
24599      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
24600$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
24601    fi
24602
24603
24604    COMPILER_TYPE=CL
24605    CCXXFLAGS="$CCXXFLAGS -nologo"
24606
24607fi
24608
24609
24610
24611ac_ext=c
24612ac_cpp='$CPP $CPPFLAGS'
24613ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24614ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24615ac_compiler_gnu=$ac_cv_c_compiler_gnu
24616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
24617$as_echo_n "checking how to run the C preprocessor... " >&6; }
24618# On Suns, sometimes $CPP names a directory.
24619if test -n "$CPP" && test -d "$CPP"; then
24620  CPP=
24621fi
24622if test -z "$CPP"; then
24623  if ${ac_cv_prog_CPP+:} false; then :
24624  $as_echo_n "(cached) " >&6
24625else
24626      # Double quotes because CPP needs to be expanded
24627    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
24628    do
24629      ac_preproc_ok=false
24630for ac_c_preproc_warn_flag in '' yes
24631do
24632  # Use a header file that comes with gcc, so configuring glibc
24633  # with a fresh cross-compiler works.
24634  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24635  # <limits.h> exists even on freestanding compilers.
24636  # On the NeXT, cc -E runs the code through the compiler's parser,
24637  # not just through cpp. "Syntax error" is here to catch this case.
24638  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24639/* end confdefs.h.  */
24640#ifdef __STDC__
24641# include <limits.h>
24642#else
24643# include <assert.h>
24644#endif
24645		     Syntax error
24646_ACEOF
24647if ac_fn_c_try_cpp "$LINENO"; then :
24648
24649else
24650  # Broken: fails on valid input.
24651continue
24652fi
24653rm -f conftest.err conftest.i conftest.$ac_ext
24654
24655  # OK, works on sane cases.  Now check whether nonexistent headers
24656  # can be detected and how.
24657  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24658/* end confdefs.h.  */
24659#include <ac_nonexistent.h>
24660_ACEOF
24661if ac_fn_c_try_cpp "$LINENO"; then :
24662  # Broken: success on invalid input.
24663continue
24664else
24665  # Passes both tests.
24666ac_preproc_ok=:
24667break
24668fi
24669rm -f conftest.err conftest.i conftest.$ac_ext
24670
24671done
24672# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24673rm -f conftest.i conftest.err conftest.$ac_ext
24674if $ac_preproc_ok; then :
24675  break
24676fi
24677
24678    done
24679    ac_cv_prog_CPP=$CPP
24680
24681fi
24682  CPP=$ac_cv_prog_CPP
24683else
24684  ac_cv_prog_CPP=$CPP
24685fi
24686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
24687$as_echo "$CPP" >&6; }
24688ac_preproc_ok=false
24689for ac_c_preproc_warn_flag in '' yes
24690do
24691  # Use a header file that comes with gcc, so configuring glibc
24692  # with a fresh cross-compiler works.
24693  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24694  # <limits.h> exists even on freestanding compilers.
24695  # On the NeXT, cc -E runs the code through the compiler's parser,
24696  # not just through cpp. "Syntax error" is here to catch this case.
24697  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24698/* end confdefs.h.  */
24699#ifdef __STDC__
24700# include <limits.h>
24701#else
24702# include <assert.h>
24703#endif
24704		     Syntax error
24705_ACEOF
24706if ac_fn_c_try_cpp "$LINENO"; then :
24707
24708else
24709  # Broken: fails on valid input.
24710continue
24711fi
24712rm -f conftest.err conftest.i conftest.$ac_ext
24713
24714  # OK, works on sane cases.  Now check whether nonexistent headers
24715  # can be detected and how.
24716  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24717/* end confdefs.h.  */
24718#include <ac_nonexistent.h>
24719_ACEOF
24720if ac_fn_c_try_cpp "$LINENO"; then :
24721  # Broken: success on invalid input.
24722continue
24723else
24724  # Passes both tests.
24725ac_preproc_ok=:
24726break
24727fi
24728rm -f conftest.err conftest.i conftest.$ac_ext
24729
24730done
24731# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24732rm -f conftest.i conftest.err conftest.$ac_ext
24733if $ac_preproc_ok; then :
24734
24735else
24736  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24737$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24738as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
24739See \`config.log' for more details" "$LINENO" 5; }
24740fi
24741
24742ac_ext=cpp
24743ac_cpp='$CXXCPP $CPPFLAGS'
24744ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24745ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24746ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24747
24748
24749  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24750
24751  # First separate the path from the arguments. This will split at the first
24752  # space.
24753  complete="$CPP"
24754  path="${complete%% *}"
24755  tmp="$complete EOL"
24756  arguments="${tmp#* }"
24757
24758  # Input might be given as Windows format, start by converting to
24759  # unix format.
24760  new_path=`$CYGPATH -u "$path"`
24761
24762  # Now try to locate executable using which
24763  new_path=`$WHICH "$new_path" 2> /dev/null`
24764  # bat and cmd files are not always considered executable in cygwin causing which
24765  # to not find them
24766  if test "x$new_path" = x \
24767           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24768           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24769    new_path=`$CYGPATH -u "$path"`
24770  fi
24771  if test "x$new_path" = x; then
24772    # Oops. Which didn't find the executable.
24773    # The splitting of arguments from the executable at a space might have been incorrect,
24774    # since paths with space are more likely in Windows. Give it another try with the whole
24775    # argument.
24776    path="$complete"
24777    arguments="EOL"
24778    new_path=`$CYGPATH -u "$path"`
24779    new_path=`$WHICH "$new_path" 2> /dev/null`
24780    # bat and cmd files are not always considered executable in cygwin causing which
24781    # to not find them
24782    if test "x$new_path" = x \
24783             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24784             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24785      new_path=`$CYGPATH -u "$path"`
24786    fi
24787    if test "x$new_path" = x; then
24788      # It's still not found. Now this is an unrecoverable error.
24789      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24790$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24791      has_space=`$ECHO "$complete" | $GREP " "`
24792      if test "x$has_space" != x; then
24793        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24794$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24795      fi
24796      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24797    fi
24798  fi
24799
24800  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24801  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24802  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24803  # "foo.exe" is OK but "foo" is an error.
24804  #
24805  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24806  # It is also a way to make sure we got the proper file name for the real test later on.
24807  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24808  if test "x$test_shortpath" = x; then
24809    # Short path failed, file does not exist as specified.
24810    # Try adding .exe or .cmd
24811    if test -f "${new_path}.exe"; then
24812       input_to_shortpath="${new_path}.exe"
24813    elif test -f "${new_path}.cmd"; then
24814       input_to_shortpath="${new_path}.cmd"
24815    else
24816      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
24817$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
24818      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24819$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24820      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24821    fi
24822  else
24823    input_to_shortpath="$new_path"
24824  fi
24825
24826  # Call helper function which possibly converts this using DOS-style short mode.
24827  # If so, the updated path is stored in $new_path.
24828  new_path="$input_to_shortpath"
24829
24830  input_path="$input_to_shortpath"
24831  # Check if we need to convert this using DOS-style short mode. If the path
24832  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24833  # take no chances and rewrite it.
24834  # Note: m4 eats our [], so we need to use [ and ] instead.
24835  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24836  if test "x$has_forbidden_chars" != x; then
24837    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24838    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24839    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24840    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24841      # Going to short mode and back again did indeed matter. Since short mode is
24842      # case insensitive, let's make it lowercase to improve readability.
24843      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24844      # Now convert it back to Unix-stile (cygpath)
24845      input_path=`$CYGPATH -u "$shortmode_path"`
24846      new_path="$input_path"
24847    fi
24848  fi
24849
24850  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24851  if test "x$test_cygdrive_prefix" = x; then
24852    # As a simple fix, exclude /usr/bin since it's not a real path.
24853    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24854      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24855      # a path prefixed by /cygdrive for fixpath to work.
24856      new_path="$CYGWIN_ROOT_PATH$input_path"
24857    fi
24858  fi
24859
24860  # remove trailing .exe if any
24861  new_path="${new_path/%.exe/}"
24862
24863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24864
24865  # First separate the path from the arguments. This will split at the first
24866  # space.
24867  complete="$CPP"
24868  path="${complete%% *}"
24869  tmp="$complete EOL"
24870  arguments="${tmp#* }"
24871
24872  # Input might be given as Windows format, start by converting to
24873  # unix format.
24874  new_path="$path"
24875
24876  windows_path="$new_path"
24877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24878    unix_path=`$CYGPATH -u "$windows_path"`
24879    new_path="$unix_path"
24880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24881    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24882    new_path="$unix_path"
24883  fi
24884
24885
24886  # Now try to locate executable using which
24887  new_path=`$WHICH "$new_path" 2> /dev/null`
24888
24889  if test "x$new_path" = x; then
24890    # Oops. Which didn't find the executable.
24891    # The splitting of arguments from the executable at a space might have been incorrect,
24892    # since paths with space are more likely in Windows. Give it another try with the whole
24893    # argument.
24894    path="$complete"
24895    arguments="EOL"
24896    new_path="$path"
24897
24898  windows_path="$new_path"
24899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24900    unix_path=`$CYGPATH -u "$windows_path"`
24901    new_path="$unix_path"
24902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24903    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24904    new_path="$unix_path"
24905  fi
24906
24907
24908    new_path=`$WHICH "$new_path" 2> /dev/null`
24909
24910    if test "x$new_path" = x; then
24911      # It's still not found. Now this is an unrecoverable error.
24912      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24913$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24914      has_space=`$ECHO "$complete" | $GREP " "`
24915      if test "x$has_space" != x; then
24916        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24917$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24918      fi
24919      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24920    fi
24921  fi
24922
24923  # Now new_path has a complete unix path to the binary
24924  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24925    # Keep paths in /bin as-is, but remove trailing .exe if any
24926    new_path="${new_path/%.exe/}"
24927    # Do not save /bin paths to all_fixpath_prefixes!
24928  else
24929    # Not in mixed or Windows style, start by that.
24930    new_path=`cmd //c echo $new_path`
24931
24932  input_path="$new_path"
24933  # Check if we need to convert this using DOS-style short mode. If the path
24934  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24935  # take no chances and rewrite it.
24936  # Note: m4 eats our [], so we need to use [ and ] instead.
24937  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24938  if test "x$has_forbidden_chars" != x; then
24939    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24940    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24941  fi
24942
24943    # Output is in $new_path
24944
24945  windows_path="$new_path"
24946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24947    unix_path=`$CYGPATH -u "$windows_path"`
24948    new_path="$unix_path"
24949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24950    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24951    new_path="$unix_path"
24952  fi
24953
24954    # remove trailing .exe if any
24955    new_path="${new_path/%.exe/}"
24956
24957    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24958    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24959  fi
24960
24961  else
24962    # We're on a posix platform. Hooray! :)
24963    # First separate the path from the arguments. This will split at the first
24964    # space.
24965    complete="$CPP"
24966    path="${complete%% *}"
24967    tmp="$complete EOL"
24968    arguments="${tmp#* }"
24969
24970    # Cannot rely on the command "which" here since it doesn't always work.
24971    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24972    if test -z "$is_absolute_path"; then
24973      # Path to executable is not absolute. Find it.
24974      IFS_save="$IFS"
24975      IFS=:
24976      for p in $PATH; do
24977        if test -f "$p/$path" && test -x "$p/$path"; then
24978          new_path="$p/$path"
24979          break
24980        fi
24981      done
24982      IFS="$IFS_save"
24983    else
24984      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
24985$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
24986      new_path="$path"
24987    fi
24988
24989    if test "x$new_path" = x; then
24990        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24991$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24992        has_space=`$ECHO "$complete" | $GREP " "`
24993        if test "x$has_space" != x; then
24994          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24995$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24996        fi
24997        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24998      fi
24999  fi
25000
25001      # Now join together the path and the arguments once again
25002      if test "x$arguments" != xEOL; then
25003        new_complete="$new_path ${arguments% *}"
25004      else
25005        new_complete="$new_path"
25006      fi
25007
25008  if test "x$complete" != "x$new_complete"; then
25009      CPP="$new_complete"
25010      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
25011$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
25012    fi
25013
25014
25015ac_ext=cpp
25016ac_cpp='$CXXCPP $CPPFLAGS'
25017ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25018ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25019ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
25021$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
25022if test -z "$CXXCPP"; then
25023  if ${ac_cv_prog_CXXCPP+:} false; then :
25024  $as_echo_n "(cached) " >&6
25025else
25026      # Double quotes because CXXCPP needs to be expanded
25027    for CXXCPP in "$CXX -E" "/lib/cpp"
25028    do
25029      ac_preproc_ok=false
25030for ac_cxx_preproc_warn_flag in '' yes
25031do
25032  # Use a header file that comes with gcc, so configuring glibc
25033  # with a fresh cross-compiler works.
25034  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
25035  # <limits.h> exists even on freestanding compilers.
25036  # On the NeXT, cc -E runs the code through the compiler's parser,
25037  # not just through cpp. "Syntax error" is here to catch this case.
25038  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25039/* end confdefs.h.  */
25040#ifdef __STDC__
25041# include <limits.h>
25042#else
25043# include <assert.h>
25044#endif
25045		     Syntax error
25046_ACEOF
25047if ac_fn_cxx_try_cpp "$LINENO"; then :
25048
25049else
25050  # Broken: fails on valid input.
25051continue
25052fi
25053rm -f conftest.err conftest.i conftest.$ac_ext
25054
25055  # OK, works on sane cases.  Now check whether nonexistent headers
25056  # can be detected and how.
25057  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25058/* end confdefs.h.  */
25059#include <ac_nonexistent.h>
25060_ACEOF
25061if ac_fn_cxx_try_cpp "$LINENO"; then :
25062  # Broken: success on invalid input.
25063continue
25064else
25065  # Passes both tests.
25066ac_preproc_ok=:
25067break
25068fi
25069rm -f conftest.err conftest.i conftest.$ac_ext
25070
25071done
25072# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25073rm -f conftest.i conftest.err conftest.$ac_ext
25074if $ac_preproc_ok; then :
25075  break
25076fi
25077
25078    done
25079    ac_cv_prog_CXXCPP=$CXXCPP
25080
25081fi
25082  CXXCPP=$ac_cv_prog_CXXCPP
25083else
25084  ac_cv_prog_CXXCPP=$CXXCPP
25085fi
25086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
25087$as_echo "$CXXCPP" >&6; }
25088ac_preproc_ok=false
25089for ac_cxx_preproc_warn_flag in '' yes
25090do
25091  # Use a header file that comes with gcc, so configuring glibc
25092  # with a fresh cross-compiler works.
25093  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
25094  # <limits.h> exists even on freestanding compilers.
25095  # On the NeXT, cc -E runs the code through the compiler's parser,
25096  # not just through cpp. "Syntax error" is here to catch this case.
25097  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25098/* end confdefs.h.  */
25099#ifdef __STDC__
25100# include <limits.h>
25101#else
25102# include <assert.h>
25103#endif
25104		     Syntax error
25105_ACEOF
25106if ac_fn_cxx_try_cpp "$LINENO"; then :
25107
25108else
25109  # Broken: fails on valid input.
25110continue
25111fi
25112rm -f conftest.err conftest.i conftest.$ac_ext
25113
25114  # OK, works on sane cases.  Now check whether nonexistent headers
25115  # can be detected and how.
25116  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25117/* end confdefs.h.  */
25118#include <ac_nonexistent.h>
25119_ACEOF
25120if ac_fn_cxx_try_cpp "$LINENO"; then :
25121  # Broken: success on invalid input.
25122continue
25123else
25124  # Passes both tests.
25125ac_preproc_ok=:
25126break
25127fi
25128rm -f conftest.err conftest.i conftest.$ac_ext
25129
25130done
25131# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25132rm -f conftest.i conftest.err conftest.$ac_ext
25133if $ac_preproc_ok; then :
25134
25135else
25136  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
25137$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25138as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
25139See \`config.log' for more details" "$LINENO" 5; }
25140fi
25141
25142ac_ext=cpp
25143ac_cpp='$CXXCPP $CPPFLAGS'
25144ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25145ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25146ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25147
25148
25149  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25150
25151  # First separate the path from the arguments. This will split at the first
25152  # space.
25153  complete="$CXXCPP"
25154  path="${complete%% *}"
25155  tmp="$complete EOL"
25156  arguments="${tmp#* }"
25157
25158  # Input might be given as Windows format, start by converting to
25159  # unix format.
25160  new_path=`$CYGPATH -u "$path"`
25161
25162  # Now try to locate executable using which
25163  new_path=`$WHICH "$new_path" 2> /dev/null`
25164  # bat and cmd files are not always considered executable in cygwin causing which
25165  # to not find them
25166  if test "x$new_path" = x \
25167           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25168           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25169    new_path=`$CYGPATH -u "$path"`
25170  fi
25171  if test "x$new_path" = x; then
25172    # Oops. Which didn't find the executable.
25173    # The splitting of arguments from the executable at a space might have been incorrect,
25174    # since paths with space are more likely in Windows. Give it another try with the whole
25175    # argument.
25176    path="$complete"
25177    arguments="EOL"
25178    new_path=`$CYGPATH -u "$path"`
25179    new_path=`$WHICH "$new_path" 2> /dev/null`
25180    # bat and cmd files are not always considered executable in cygwin causing which
25181    # to not find them
25182    if test "x$new_path" = x \
25183             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25184             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25185      new_path=`$CYGPATH -u "$path"`
25186    fi
25187    if test "x$new_path" = x; then
25188      # It's still not found. Now this is an unrecoverable error.
25189      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25190$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25191      has_space=`$ECHO "$complete" | $GREP " "`
25192      if test "x$has_space" != x; then
25193        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25194$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25195      fi
25196      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25197    fi
25198  fi
25199
25200  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25201  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25202  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25203  # "foo.exe" is OK but "foo" is an error.
25204  #
25205  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25206  # It is also a way to make sure we got the proper file name for the real test later on.
25207  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25208  if test "x$test_shortpath" = x; then
25209    # Short path failed, file does not exist as specified.
25210    # Try adding .exe or .cmd
25211    if test -f "${new_path}.exe"; then
25212       input_to_shortpath="${new_path}.exe"
25213    elif test -f "${new_path}.cmd"; then
25214       input_to_shortpath="${new_path}.cmd"
25215    else
25216      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
25217$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
25218      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25219$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25220      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25221    fi
25222  else
25223    input_to_shortpath="$new_path"
25224  fi
25225
25226  # Call helper function which possibly converts this using DOS-style short mode.
25227  # If so, the updated path is stored in $new_path.
25228  new_path="$input_to_shortpath"
25229
25230  input_path="$input_to_shortpath"
25231  # Check if we need to convert this using DOS-style short mode. If the path
25232  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25233  # take no chances and rewrite it.
25234  # Note: m4 eats our [], so we need to use [ and ] instead.
25235  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25236  if test "x$has_forbidden_chars" != x; then
25237    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25238    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25239    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25240    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25241      # Going to short mode and back again did indeed matter. Since short mode is
25242      # case insensitive, let's make it lowercase to improve readability.
25243      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25244      # Now convert it back to Unix-stile (cygpath)
25245      input_path=`$CYGPATH -u "$shortmode_path"`
25246      new_path="$input_path"
25247    fi
25248  fi
25249
25250  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25251  if test "x$test_cygdrive_prefix" = x; then
25252    # As a simple fix, exclude /usr/bin since it's not a real path.
25253    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25254      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25255      # a path prefixed by /cygdrive for fixpath to work.
25256      new_path="$CYGWIN_ROOT_PATH$input_path"
25257    fi
25258  fi
25259
25260  # remove trailing .exe if any
25261  new_path="${new_path/%.exe/}"
25262
25263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25264
25265  # First separate the path from the arguments. This will split at the first
25266  # space.
25267  complete="$CXXCPP"
25268  path="${complete%% *}"
25269  tmp="$complete EOL"
25270  arguments="${tmp#* }"
25271
25272  # Input might be given as Windows format, start by converting to
25273  # unix format.
25274  new_path="$path"
25275
25276  windows_path="$new_path"
25277  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25278    unix_path=`$CYGPATH -u "$windows_path"`
25279    new_path="$unix_path"
25280  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25281    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25282    new_path="$unix_path"
25283  fi
25284
25285
25286  # Now try to locate executable using which
25287  new_path=`$WHICH "$new_path" 2> /dev/null`
25288
25289  if test "x$new_path" = x; then
25290    # Oops. Which didn't find the executable.
25291    # The splitting of arguments from the executable at a space might have been incorrect,
25292    # since paths with space are more likely in Windows. Give it another try with the whole
25293    # argument.
25294    path="$complete"
25295    arguments="EOL"
25296    new_path="$path"
25297
25298  windows_path="$new_path"
25299  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25300    unix_path=`$CYGPATH -u "$windows_path"`
25301    new_path="$unix_path"
25302  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25303    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25304    new_path="$unix_path"
25305  fi
25306
25307
25308    new_path=`$WHICH "$new_path" 2> /dev/null`
25309
25310    if test "x$new_path" = x; then
25311      # It's still not found. Now this is an unrecoverable error.
25312      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25313$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25314      has_space=`$ECHO "$complete" | $GREP " "`
25315      if test "x$has_space" != x; then
25316        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25317$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25318      fi
25319      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25320    fi
25321  fi
25322
25323  # Now new_path has a complete unix path to the binary
25324  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25325    # Keep paths in /bin as-is, but remove trailing .exe if any
25326    new_path="${new_path/%.exe/}"
25327    # Do not save /bin paths to all_fixpath_prefixes!
25328  else
25329    # Not in mixed or Windows style, start by that.
25330    new_path=`cmd //c echo $new_path`
25331
25332  input_path="$new_path"
25333  # Check if we need to convert this using DOS-style short mode. If the path
25334  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25335  # take no chances and rewrite it.
25336  # Note: m4 eats our [], so we need to use [ and ] instead.
25337  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25338  if test "x$has_forbidden_chars" != x; then
25339    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25340    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25341  fi
25342
25343    # Output is in $new_path
25344
25345  windows_path="$new_path"
25346  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25347    unix_path=`$CYGPATH -u "$windows_path"`
25348    new_path="$unix_path"
25349  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25350    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25351    new_path="$unix_path"
25352  fi
25353
25354    # remove trailing .exe if any
25355    new_path="${new_path/%.exe/}"
25356
25357    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25358    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25359  fi
25360
25361  else
25362    # We're on a posix platform. Hooray! :)
25363    # First separate the path from the arguments. This will split at the first
25364    # space.
25365    complete="$CXXCPP"
25366    path="${complete%% *}"
25367    tmp="$complete EOL"
25368    arguments="${tmp#* }"
25369
25370    # Cannot rely on the command "which" here since it doesn't always work.
25371    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25372    if test -z "$is_absolute_path"; then
25373      # Path to executable is not absolute. Find it.
25374      IFS_save="$IFS"
25375      IFS=:
25376      for p in $PATH; do
25377        if test -f "$p/$path" && test -x "$p/$path"; then
25378          new_path="$p/$path"
25379          break
25380        fi
25381      done
25382      IFS="$IFS_save"
25383    else
25384      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
25385$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
25386      new_path="$path"
25387    fi
25388
25389    if test "x$new_path" = x; then
25390        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25391$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25392        has_space=`$ECHO "$complete" | $GREP " "`
25393        if test "x$has_space" != x; then
25394          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25395$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25396        fi
25397        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25398      fi
25399  fi
25400
25401      # Now join together the path and the arguments once again
25402      if test "x$arguments" != xEOL; then
25403        new_complete="$new_path ${arguments% *}"
25404      else
25405        new_complete="$new_path"
25406      fi
25407
25408  if test "x$complete" != "x$new_complete"; then
25409      CXXCPP="$new_complete"
25410      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
25411$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
25412    fi
25413
25414
25415if test "x$COMPILE_TYPE" != "xcross"; then
25416    # If we are not cross compiling, use the same compilers for
25417    # building the build platform executables. The cross-compilation
25418    # case needed to be done earlier, but this can only be done after
25419    # the native tools have been localized.
25420    BUILD_CC="$CC"
25421    BUILD_CXX="$CXX"
25422    BUILD_LD="$LD"
25423fi
25424
25425# for solaris we really need solaris tools, and not gnu equivalent
25426#   these seems to normally reside in /usr/ccs/bin so add that to path before
25427#   starting to probe
25428#
25429#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
25430#         so that it can be overriden --with-tools-dir
25431if test "x$OPENJDK_BUILD_OS" = xsolaris; then
25432    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
25433fi
25434
25435# Find the right assembler.
25436if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25437    # Extract the first word of "as", so it can be a program name with args.
25438set dummy as; ac_word=$2
25439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25440$as_echo_n "checking for $ac_word... " >&6; }
25441if ${ac_cv_path_AS+:} false; then :
25442  $as_echo_n "(cached) " >&6
25443else
25444  case $AS in
25445  [\\/]* | ?:[\\/]*)
25446  ac_cv_path_AS="$AS" # Let the user override the test with a path.
25447  ;;
25448  *)
25449  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25450for as_dir in $PATH
25451do
25452  IFS=$as_save_IFS
25453  test -z "$as_dir" && as_dir=.
25454    for ac_exec_ext in '' $ac_executable_extensions; do
25455  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25456    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
25457    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25458    break 2
25459  fi
25460done
25461  done
25462IFS=$as_save_IFS
25463
25464  ;;
25465esac
25466fi
25467AS=$ac_cv_path_AS
25468if test -n "$AS"; then
25469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
25470$as_echo "$AS" >&6; }
25471else
25472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25473$as_echo "no" >&6; }
25474fi
25475
25476
25477
25478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25479
25480  # First separate the path from the arguments. This will split at the first
25481  # space.
25482  complete="$AS"
25483  path="${complete%% *}"
25484  tmp="$complete EOL"
25485  arguments="${tmp#* }"
25486
25487  # Input might be given as Windows format, start by converting to
25488  # unix format.
25489  new_path=`$CYGPATH -u "$path"`
25490
25491  # Now try to locate executable using which
25492  new_path=`$WHICH "$new_path" 2> /dev/null`
25493  # bat and cmd files are not always considered executable in cygwin causing which
25494  # to not find them
25495  if test "x$new_path" = x \
25496           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25497           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25498    new_path=`$CYGPATH -u "$path"`
25499  fi
25500  if test "x$new_path" = x; then
25501    # Oops. Which didn't find the executable.
25502    # The splitting of arguments from the executable at a space might have been incorrect,
25503    # since paths with space are more likely in Windows. Give it another try with the whole
25504    # argument.
25505    path="$complete"
25506    arguments="EOL"
25507    new_path=`$CYGPATH -u "$path"`
25508    new_path=`$WHICH "$new_path" 2> /dev/null`
25509    # bat and cmd files are not always considered executable in cygwin causing which
25510    # to not find them
25511    if test "x$new_path" = x \
25512             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25513             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25514      new_path=`$CYGPATH -u "$path"`
25515    fi
25516    if test "x$new_path" = x; then
25517      # It's still not found. Now this is an unrecoverable error.
25518      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25519$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25520      has_space=`$ECHO "$complete" | $GREP " "`
25521      if test "x$has_space" != x; then
25522        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25523$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25524      fi
25525      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25526    fi
25527  fi
25528
25529  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25530  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25531  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25532  # "foo.exe" is OK but "foo" is an error.
25533  #
25534  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25535  # It is also a way to make sure we got the proper file name for the real test later on.
25536  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25537  if test "x$test_shortpath" = x; then
25538    # Short path failed, file does not exist as specified.
25539    # Try adding .exe or .cmd
25540    if test -f "${new_path}.exe"; then
25541       input_to_shortpath="${new_path}.exe"
25542    elif test -f "${new_path}.cmd"; then
25543       input_to_shortpath="${new_path}.cmd"
25544    else
25545      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
25546$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
25547      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25548$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25549      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25550    fi
25551  else
25552    input_to_shortpath="$new_path"
25553  fi
25554
25555  # Call helper function which possibly converts this using DOS-style short mode.
25556  # If so, the updated path is stored in $new_path.
25557  new_path="$input_to_shortpath"
25558
25559  input_path="$input_to_shortpath"
25560  # Check if we need to convert this using DOS-style short mode. If the path
25561  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25562  # take no chances and rewrite it.
25563  # Note: m4 eats our [], so we need to use [ and ] instead.
25564  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25565  if test "x$has_forbidden_chars" != x; then
25566    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25567    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25568    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25569    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25570      # Going to short mode and back again did indeed matter. Since short mode is
25571      # case insensitive, let's make it lowercase to improve readability.
25572      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25573      # Now convert it back to Unix-stile (cygpath)
25574      input_path=`$CYGPATH -u "$shortmode_path"`
25575      new_path="$input_path"
25576    fi
25577  fi
25578
25579  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25580  if test "x$test_cygdrive_prefix" = x; then
25581    # As a simple fix, exclude /usr/bin since it's not a real path.
25582    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25583      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25584      # a path prefixed by /cygdrive for fixpath to work.
25585      new_path="$CYGWIN_ROOT_PATH$input_path"
25586    fi
25587  fi
25588
25589  # remove trailing .exe if any
25590  new_path="${new_path/%.exe/}"
25591
25592  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25593
25594  # First separate the path from the arguments. This will split at the first
25595  # space.
25596  complete="$AS"
25597  path="${complete%% *}"
25598  tmp="$complete EOL"
25599  arguments="${tmp#* }"
25600
25601  # Input might be given as Windows format, start by converting to
25602  # unix format.
25603  new_path="$path"
25604
25605  windows_path="$new_path"
25606  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25607    unix_path=`$CYGPATH -u "$windows_path"`
25608    new_path="$unix_path"
25609  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25610    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25611    new_path="$unix_path"
25612  fi
25613
25614
25615  # Now try to locate executable using which
25616  new_path=`$WHICH "$new_path" 2> /dev/null`
25617
25618  if test "x$new_path" = x; then
25619    # Oops. Which didn't find the executable.
25620    # The splitting of arguments from the executable at a space might have been incorrect,
25621    # since paths with space are more likely in Windows. Give it another try with the whole
25622    # argument.
25623    path="$complete"
25624    arguments="EOL"
25625    new_path="$path"
25626
25627  windows_path="$new_path"
25628  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25629    unix_path=`$CYGPATH -u "$windows_path"`
25630    new_path="$unix_path"
25631  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25632    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25633    new_path="$unix_path"
25634  fi
25635
25636
25637    new_path=`$WHICH "$new_path" 2> /dev/null`
25638
25639    if test "x$new_path" = x; then
25640      # It's still not found. Now this is an unrecoverable error.
25641      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25642$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25643      has_space=`$ECHO "$complete" | $GREP " "`
25644      if test "x$has_space" != x; then
25645        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25646$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25647      fi
25648      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25649    fi
25650  fi
25651
25652  # Now new_path has a complete unix path to the binary
25653  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25654    # Keep paths in /bin as-is, but remove trailing .exe if any
25655    new_path="${new_path/%.exe/}"
25656    # Do not save /bin paths to all_fixpath_prefixes!
25657  else
25658    # Not in mixed or Windows style, start by that.
25659    new_path=`cmd //c echo $new_path`
25660
25661  input_path="$new_path"
25662  # Check if we need to convert this using DOS-style short mode. If the path
25663  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25664  # take no chances and rewrite it.
25665  # Note: m4 eats our [], so we need to use [ and ] instead.
25666  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25667  if test "x$has_forbidden_chars" != x; then
25668    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25669    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25670  fi
25671
25672    # Output is in $new_path
25673
25674  windows_path="$new_path"
25675  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25676    unix_path=`$CYGPATH -u "$windows_path"`
25677    new_path="$unix_path"
25678  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25679    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25680    new_path="$unix_path"
25681  fi
25682
25683    # remove trailing .exe if any
25684    new_path="${new_path/%.exe/}"
25685
25686    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25687    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25688  fi
25689
25690  else
25691    # We're on a posix platform. Hooray! :)
25692    # First separate the path from the arguments. This will split at the first
25693    # space.
25694    complete="$AS"
25695    path="${complete%% *}"
25696    tmp="$complete EOL"
25697    arguments="${tmp#* }"
25698
25699    # Cannot rely on the command "which" here since it doesn't always work.
25700    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25701    if test -z "$is_absolute_path"; then
25702      # Path to executable is not absolute. Find it.
25703      IFS_save="$IFS"
25704      IFS=:
25705      for p in $PATH; do
25706        if test -f "$p/$path" && test -x "$p/$path"; then
25707          new_path="$p/$path"
25708          break
25709        fi
25710      done
25711      IFS="$IFS_save"
25712    else
25713      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
25714$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
25715      new_path="$path"
25716    fi
25717
25718    if test "x$new_path" = x; then
25719        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25720$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25721        has_space=`$ECHO "$complete" | $GREP " "`
25722        if test "x$has_space" != x; then
25723          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25724$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25725        fi
25726        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25727      fi
25728  fi
25729
25730      # Now join together the path and the arguments once again
25731      if test "x$arguments" != xEOL; then
25732        new_complete="$new_path ${arguments% *}"
25733      else
25734        new_complete="$new_path"
25735      fi
25736
25737  if test "x$complete" != "x$new_complete"; then
25738      AS="$new_complete"
25739      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
25740$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
25741    fi
25742
25743else
25744    AS="$CC -c"
25745fi
25746
25747
25748if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25749    # Extract the first word of "nm", so it can be a program name with args.
25750set dummy nm; ac_word=$2
25751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25752$as_echo_n "checking for $ac_word... " >&6; }
25753if ${ac_cv_path_NM+:} false; then :
25754  $as_echo_n "(cached) " >&6
25755else
25756  case $NM in
25757  [\\/]* | ?:[\\/]*)
25758  ac_cv_path_NM="$NM" # Let the user override the test with a path.
25759  ;;
25760  *)
25761  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25762for as_dir in $PATH
25763do
25764  IFS=$as_save_IFS
25765  test -z "$as_dir" && as_dir=.
25766    for ac_exec_ext in '' $ac_executable_extensions; do
25767  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25768    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
25769    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25770    break 2
25771  fi
25772done
25773  done
25774IFS=$as_save_IFS
25775
25776  ;;
25777esac
25778fi
25779NM=$ac_cv_path_NM
25780if test -n "$NM"; then
25781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25782$as_echo "$NM" >&6; }
25783else
25784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25785$as_echo "no" >&6; }
25786fi
25787
25788
25789
25790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25791
25792  # First separate the path from the arguments. This will split at the first
25793  # space.
25794  complete="$NM"
25795  path="${complete%% *}"
25796  tmp="$complete EOL"
25797  arguments="${tmp#* }"
25798
25799  # Input might be given as Windows format, start by converting to
25800  # unix format.
25801  new_path=`$CYGPATH -u "$path"`
25802
25803  # Now try to locate executable using which
25804  new_path=`$WHICH "$new_path" 2> /dev/null`
25805  # bat and cmd files are not always considered executable in cygwin causing which
25806  # to not find them
25807  if test "x$new_path" = x \
25808           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25809           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25810    new_path=`$CYGPATH -u "$path"`
25811  fi
25812  if test "x$new_path" = x; then
25813    # Oops. Which didn't find the executable.
25814    # The splitting of arguments from the executable at a space might have been incorrect,
25815    # since paths with space are more likely in Windows. Give it another try with the whole
25816    # argument.
25817    path="$complete"
25818    arguments="EOL"
25819    new_path=`$CYGPATH -u "$path"`
25820    new_path=`$WHICH "$new_path" 2> /dev/null`
25821    # bat and cmd files are not always considered executable in cygwin causing which
25822    # to not find them
25823    if test "x$new_path" = x \
25824             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25825             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25826      new_path=`$CYGPATH -u "$path"`
25827    fi
25828    if test "x$new_path" = x; then
25829      # It's still not found. Now this is an unrecoverable error.
25830      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25831$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25832      has_space=`$ECHO "$complete" | $GREP " "`
25833      if test "x$has_space" != x; then
25834        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25835$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25836      fi
25837      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25838    fi
25839  fi
25840
25841  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25842  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25843  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25844  # "foo.exe" is OK but "foo" is an error.
25845  #
25846  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25847  # It is also a way to make sure we got the proper file name for the real test later on.
25848  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25849  if test "x$test_shortpath" = x; then
25850    # Short path failed, file does not exist as specified.
25851    # Try adding .exe or .cmd
25852    if test -f "${new_path}.exe"; then
25853       input_to_shortpath="${new_path}.exe"
25854    elif test -f "${new_path}.cmd"; then
25855       input_to_shortpath="${new_path}.cmd"
25856    else
25857      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25858$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25859      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25860$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25861      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25862    fi
25863  else
25864    input_to_shortpath="$new_path"
25865  fi
25866
25867  # Call helper function which possibly converts this using DOS-style short mode.
25868  # If so, the updated path is stored in $new_path.
25869  new_path="$input_to_shortpath"
25870
25871  input_path="$input_to_shortpath"
25872  # Check if we need to convert this using DOS-style short mode. If the path
25873  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25874  # take no chances and rewrite it.
25875  # Note: m4 eats our [], so we need to use [ and ] instead.
25876  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25877  if test "x$has_forbidden_chars" != x; then
25878    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25879    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25880    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25881    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25882      # Going to short mode and back again did indeed matter. Since short mode is
25883      # case insensitive, let's make it lowercase to improve readability.
25884      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25885      # Now convert it back to Unix-stile (cygpath)
25886      input_path=`$CYGPATH -u "$shortmode_path"`
25887      new_path="$input_path"
25888    fi
25889  fi
25890
25891  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25892  if test "x$test_cygdrive_prefix" = x; then
25893    # As a simple fix, exclude /usr/bin since it's not a real path.
25894    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25895      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25896      # a path prefixed by /cygdrive for fixpath to work.
25897      new_path="$CYGWIN_ROOT_PATH$input_path"
25898    fi
25899  fi
25900
25901  # remove trailing .exe if any
25902  new_path="${new_path/%.exe/}"
25903
25904  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25905
25906  # First separate the path from the arguments. This will split at the first
25907  # space.
25908  complete="$NM"
25909  path="${complete%% *}"
25910  tmp="$complete EOL"
25911  arguments="${tmp#* }"
25912
25913  # Input might be given as Windows format, start by converting to
25914  # unix format.
25915  new_path="$path"
25916
25917  windows_path="$new_path"
25918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25919    unix_path=`$CYGPATH -u "$windows_path"`
25920    new_path="$unix_path"
25921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25923    new_path="$unix_path"
25924  fi
25925
25926
25927  # Now try to locate executable using which
25928  new_path=`$WHICH "$new_path" 2> /dev/null`
25929
25930  if test "x$new_path" = x; then
25931    # Oops. Which didn't find the executable.
25932    # The splitting of arguments from the executable at a space might have been incorrect,
25933    # since paths with space are more likely in Windows. Give it another try with the whole
25934    # argument.
25935    path="$complete"
25936    arguments="EOL"
25937    new_path="$path"
25938
25939  windows_path="$new_path"
25940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25941    unix_path=`$CYGPATH -u "$windows_path"`
25942    new_path="$unix_path"
25943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25944    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25945    new_path="$unix_path"
25946  fi
25947
25948
25949    new_path=`$WHICH "$new_path" 2> /dev/null`
25950
25951    if test "x$new_path" = x; then
25952      # It's still not found. Now this is an unrecoverable error.
25953      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25954$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25955      has_space=`$ECHO "$complete" | $GREP " "`
25956      if test "x$has_space" != x; then
25957        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25958$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25959      fi
25960      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25961    fi
25962  fi
25963
25964  # Now new_path has a complete unix path to the binary
25965  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25966    # Keep paths in /bin as-is, but remove trailing .exe if any
25967    new_path="${new_path/%.exe/}"
25968    # Do not save /bin paths to all_fixpath_prefixes!
25969  else
25970    # Not in mixed or Windows style, start by that.
25971    new_path=`cmd //c echo $new_path`
25972
25973  input_path="$new_path"
25974  # Check if we need to convert this using DOS-style short mode. If the path
25975  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25976  # take no chances and rewrite it.
25977  # Note: m4 eats our [], so we need to use [ and ] instead.
25978  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25979  if test "x$has_forbidden_chars" != x; then
25980    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25981    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25982  fi
25983
25984    # Output is in $new_path
25985
25986  windows_path="$new_path"
25987  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25988    unix_path=`$CYGPATH -u "$windows_path"`
25989    new_path="$unix_path"
25990  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25991    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25992    new_path="$unix_path"
25993  fi
25994
25995    # remove trailing .exe if any
25996    new_path="${new_path/%.exe/}"
25997
25998    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25999    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26000  fi
26001
26002  else
26003    # We're on a posix platform. Hooray! :)
26004    # First separate the path from the arguments. This will split at the first
26005    # space.
26006    complete="$NM"
26007    path="${complete%% *}"
26008    tmp="$complete EOL"
26009    arguments="${tmp#* }"
26010
26011    # Cannot rely on the command "which" here since it doesn't always work.
26012    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26013    if test -z "$is_absolute_path"; then
26014      # Path to executable is not absolute. Find it.
26015      IFS_save="$IFS"
26016      IFS=:
26017      for p in $PATH; do
26018        if test -f "$p/$path" && test -x "$p/$path"; then
26019          new_path="$p/$path"
26020          break
26021        fi
26022      done
26023      IFS="$IFS_save"
26024    else
26025      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
26026$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
26027      new_path="$path"
26028    fi
26029
26030    if test "x$new_path" = x; then
26031        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26032$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26033        has_space=`$ECHO "$complete" | $GREP " "`
26034        if test "x$has_space" != x; then
26035          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26036$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26037        fi
26038        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26039      fi
26040  fi
26041
26042      # Now join together the path and the arguments once again
26043      if test "x$arguments" != xEOL; then
26044        new_complete="$new_path ${arguments% *}"
26045      else
26046        new_complete="$new_path"
26047      fi
26048
26049  if test "x$complete" != "x$new_complete"; then
26050      NM="$new_complete"
26051      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
26052$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
26053    fi
26054
26055    # Extract the first word of "gnm", so it can be a program name with args.
26056set dummy gnm; ac_word=$2
26057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26058$as_echo_n "checking for $ac_word... " >&6; }
26059if ${ac_cv_path_GNM+:} false; then :
26060  $as_echo_n "(cached) " >&6
26061else
26062  case $GNM in
26063  [\\/]* | ?:[\\/]*)
26064  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
26065  ;;
26066  *)
26067  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26068for as_dir in $PATH
26069do
26070  IFS=$as_save_IFS
26071  test -z "$as_dir" && as_dir=.
26072    for ac_exec_ext in '' $ac_executable_extensions; do
26073  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26074    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
26075    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26076    break 2
26077  fi
26078done
26079  done
26080IFS=$as_save_IFS
26081
26082  ;;
26083esac
26084fi
26085GNM=$ac_cv_path_GNM
26086if test -n "$GNM"; then
26087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
26088$as_echo "$GNM" >&6; }
26089else
26090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26091$as_echo "no" >&6; }
26092fi
26093
26094
26095
26096  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26097
26098  # First separate the path from the arguments. This will split at the first
26099  # space.
26100  complete="$GNM"
26101  path="${complete%% *}"
26102  tmp="$complete EOL"
26103  arguments="${tmp#* }"
26104
26105  # Input might be given as Windows format, start by converting to
26106  # unix format.
26107  new_path=`$CYGPATH -u "$path"`
26108
26109  # Now try to locate executable using which
26110  new_path=`$WHICH "$new_path" 2> /dev/null`
26111  # bat and cmd files are not always considered executable in cygwin causing which
26112  # to not find them
26113  if test "x$new_path" = x \
26114           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26115           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26116    new_path=`$CYGPATH -u "$path"`
26117  fi
26118  if test "x$new_path" = x; then
26119    # Oops. Which didn't find the executable.
26120    # The splitting of arguments from the executable at a space might have been incorrect,
26121    # since paths with space are more likely in Windows. Give it another try with the whole
26122    # argument.
26123    path="$complete"
26124    arguments="EOL"
26125    new_path=`$CYGPATH -u "$path"`
26126    new_path=`$WHICH "$new_path" 2> /dev/null`
26127    # bat and cmd files are not always considered executable in cygwin causing which
26128    # to not find them
26129    if test "x$new_path" = x \
26130             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26131             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26132      new_path=`$CYGPATH -u "$path"`
26133    fi
26134    if test "x$new_path" = x; then
26135      # It's still not found. Now this is an unrecoverable error.
26136      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26137$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26138      has_space=`$ECHO "$complete" | $GREP " "`
26139      if test "x$has_space" != x; then
26140        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26141$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26142      fi
26143      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26144    fi
26145  fi
26146
26147  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26148  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26149  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26150  # "foo.exe" is OK but "foo" is an error.
26151  #
26152  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26153  # It is also a way to make sure we got the proper file name for the real test later on.
26154  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26155  if test "x$test_shortpath" = x; then
26156    # Short path failed, file does not exist as specified.
26157    # Try adding .exe or .cmd
26158    if test -f "${new_path}.exe"; then
26159       input_to_shortpath="${new_path}.exe"
26160    elif test -f "${new_path}.cmd"; then
26161       input_to_shortpath="${new_path}.cmd"
26162    else
26163      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
26164$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
26165      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26166$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26167      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26168    fi
26169  else
26170    input_to_shortpath="$new_path"
26171  fi
26172
26173  # Call helper function which possibly converts this using DOS-style short mode.
26174  # If so, the updated path is stored in $new_path.
26175  new_path="$input_to_shortpath"
26176
26177  input_path="$input_to_shortpath"
26178  # Check if we need to convert this using DOS-style short mode. If the path
26179  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26180  # take no chances and rewrite it.
26181  # Note: m4 eats our [], so we need to use [ and ] instead.
26182  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26183  if test "x$has_forbidden_chars" != x; then
26184    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26185    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26186    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26187    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26188      # Going to short mode and back again did indeed matter. Since short mode is
26189      # case insensitive, let's make it lowercase to improve readability.
26190      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26191      # Now convert it back to Unix-stile (cygpath)
26192      input_path=`$CYGPATH -u "$shortmode_path"`
26193      new_path="$input_path"
26194    fi
26195  fi
26196
26197  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26198  if test "x$test_cygdrive_prefix" = x; then
26199    # As a simple fix, exclude /usr/bin since it's not a real path.
26200    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26201      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26202      # a path prefixed by /cygdrive for fixpath to work.
26203      new_path="$CYGWIN_ROOT_PATH$input_path"
26204    fi
26205  fi
26206
26207  # remove trailing .exe if any
26208  new_path="${new_path/%.exe/}"
26209
26210  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26211
26212  # First separate the path from the arguments. This will split at the first
26213  # space.
26214  complete="$GNM"
26215  path="${complete%% *}"
26216  tmp="$complete EOL"
26217  arguments="${tmp#* }"
26218
26219  # Input might be given as Windows format, start by converting to
26220  # unix format.
26221  new_path="$path"
26222
26223  windows_path="$new_path"
26224  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26225    unix_path=`$CYGPATH -u "$windows_path"`
26226    new_path="$unix_path"
26227  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26228    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26229    new_path="$unix_path"
26230  fi
26231
26232
26233  # Now try to locate executable using which
26234  new_path=`$WHICH "$new_path" 2> /dev/null`
26235
26236  if test "x$new_path" = x; then
26237    # Oops. Which didn't find the executable.
26238    # The splitting of arguments from the executable at a space might have been incorrect,
26239    # since paths with space are more likely in Windows. Give it another try with the whole
26240    # argument.
26241    path="$complete"
26242    arguments="EOL"
26243    new_path="$path"
26244
26245  windows_path="$new_path"
26246  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26247    unix_path=`$CYGPATH -u "$windows_path"`
26248    new_path="$unix_path"
26249  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26250    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26251    new_path="$unix_path"
26252  fi
26253
26254
26255    new_path=`$WHICH "$new_path" 2> /dev/null`
26256
26257    if test "x$new_path" = x; then
26258      # It's still not found. Now this is an unrecoverable error.
26259      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26260$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26261      has_space=`$ECHO "$complete" | $GREP " "`
26262      if test "x$has_space" != x; then
26263        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26264$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26265      fi
26266      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26267    fi
26268  fi
26269
26270  # Now new_path has a complete unix path to the binary
26271  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26272    # Keep paths in /bin as-is, but remove trailing .exe if any
26273    new_path="${new_path/%.exe/}"
26274    # Do not save /bin paths to all_fixpath_prefixes!
26275  else
26276    # Not in mixed or Windows style, start by that.
26277    new_path=`cmd //c echo $new_path`
26278
26279  input_path="$new_path"
26280  # Check if we need to convert this using DOS-style short mode. If the path
26281  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26282  # take no chances and rewrite it.
26283  # Note: m4 eats our [], so we need to use [ and ] instead.
26284  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26285  if test "x$has_forbidden_chars" != x; then
26286    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26287    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26288  fi
26289
26290    # Output is in $new_path
26291
26292  windows_path="$new_path"
26293  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26294    unix_path=`$CYGPATH -u "$windows_path"`
26295    new_path="$unix_path"
26296  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26297    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26298    new_path="$unix_path"
26299  fi
26300
26301    # remove trailing .exe if any
26302    new_path="${new_path/%.exe/}"
26303
26304    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26305    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26306  fi
26307
26308  else
26309    # We're on a posix platform. Hooray! :)
26310    # First separate the path from the arguments. This will split at the first
26311    # space.
26312    complete="$GNM"
26313    path="${complete%% *}"
26314    tmp="$complete EOL"
26315    arguments="${tmp#* }"
26316
26317    # Cannot rely on the command "which" here since it doesn't always work.
26318    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26319    if test -z "$is_absolute_path"; then
26320      # Path to executable is not absolute. Find it.
26321      IFS_save="$IFS"
26322      IFS=:
26323      for p in $PATH; do
26324        if test -f "$p/$path" && test -x "$p/$path"; then
26325          new_path="$p/$path"
26326          break
26327        fi
26328      done
26329      IFS="$IFS_save"
26330    else
26331      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving GNM (as $path) failed, using $path directly." >&5
26332$as_echo "$as_me: Resolving GNM (as $path) failed, using $path directly." >&6;}
26333      new_path="$path"
26334    fi
26335
26336    if test "x$new_path" = x; then
26337        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26338$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26339        has_space=`$ECHO "$complete" | $GREP " "`
26340        if test "x$has_space" != x; then
26341          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26342$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26343        fi
26344        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26345      fi
26346  fi
26347
26348      # Now join together the path and the arguments once again
26349      if test "x$arguments" != xEOL; then
26350        new_complete="$new_path ${arguments% *}"
26351      else
26352        new_complete="$new_path"
26353      fi
26354
26355  if test "x$complete" != "x$new_complete"; then
26356      GNM="$new_complete"
26357      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
26358$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
26359    fi
26360
26361    # Extract the first word of "strip", so it can be a program name with args.
26362set dummy strip; ac_word=$2
26363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26364$as_echo_n "checking for $ac_word... " >&6; }
26365if ${ac_cv_path_STRIP+:} false; then :
26366  $as_echo_n "(cached) " >&6
26367else
26368  case $STRIP in
26369  [\\/]* | ?:[\\/]*)
26370  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
26371  ;;
26372  *)
26373  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26374for as_dir in $PATH
26375do
26376  IFS=$as_save_IFS
26377  test -z "$as_dir" && as_dir=.
26378    for ac_exec_ext in '' $ac_executable_extensions; do
26379  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26380    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
26381    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26382    break 2
26383  fi
26384done
26385  done
26386IFS=$as_save_IFS
26387
26388  ;;
26389esac
26390fi
26391STRIP=$ac_cv_path_STRIP
26392if test -n "$STRIP"; then
26393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
26394$as_echo "$STRIP" >&6; }
26395else
26396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26397$as_echo "no" >&6; }
26398fi
26399
26400
26401
26402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26403
26404  # First separate the path from the arguments. This will split at the first
26405  # space.
26406  complete="$STRIP"
26407  path="${complete%% *}"
26408  tmp="$complete EOL"
26409  arguments="${tmp#* }"
26410
26411  # Input might be given as Windows format, start by converting to
26412  # unix format.
26413  new_path=`$CYGPATH -u "$path"`
26414
26415  # Now try to locate executable using which
26416  new_path=`$WHICH "$new_path" 2> /dev/null`
26417  # bat and cmd files are not always considered executable in cygwin causing which
26418  # to not find them
26419  if test "x$new_path" = x \
26420           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26421           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26422    new_path=`$CYGPATH -u "$path"`
26423  fi
26424  if test "x$new_path" = x; then
26425    # Oops. Which didn't find the executable.
26426    # The splitting of arguments from the executable at a space might have been incorrect,
26427    # since paths with space are more likely in Windows. Give it another try with the whole
26428    # argument.
26429    path="$complete"
26430    arguments="EOL"
26431    new_path=`$CYGPATH -u "$path"`
26432    new_path=`$WHICH "$new_path" 2> /dev/null`
26433    # bat and cmd files are not always considered executable in cygwin causing which
26434    # to not find them
26435    if test "x$new_path" = x \
26436             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26437             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26438      new_path=`$CYGPATH -u "$path"`
26439    fi
26440    if test "x$new_path" = x; then
26441      # It's still not found. Now this is an unrecoverable error.
26442      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26443$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26444      has_space=`$ECHO "$complete" | $GREP " "`
26445      if test "x$has_space" != x; then
26446        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26447$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26448      fi
26449      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26450    fi
26451  fi
26452
26453  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26454  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26455  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26456  # "foo.exe" is OK but "foo" is an error.
26457  #
26458  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26459  # It is also a way to make sure we got the proper file name for the real test later on.
26460  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26461  if test "x$test_shortpath" = x; then
26462    # Short path failed, file does not exist as specified.
26463    # Try adding .exe or .cmd
26464    if test -f "${new_path}.exe"; then
26465       input_to_shortpath="${new_path}.exe"
26466    elif test -f "${new_path}.cmd"; then
26467       input_to_shortpath="${new_path}.cmd"
26468    else
26469      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26470$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26471      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26472$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26473      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26474    fi
26475  else
26476    input_to_shortpath="$new_path"
26477  fi
26478
26479  # Call helper function which possibly converts this using DOS-style short mode.
26480  # If so, the updated path is stored in $new_path.
26481  new_path="$input_to_shortpath"
26482
26483  input_path="$input_to_shortpath"
26484  # Check if we need to convert this using DOS-style short mode. If the path
26485  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26486  # take no chances and rewrite it.
26487  # Note: m4 eats our [], so we need to use [ and ] instead.
26488  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26489  if test "x$has_forbidden_chars" != x; then
26490    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26491    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26492    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26493    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26494      # Going to short mode and back again did indeed matter. Since short mode is
26495      # case insensitive, let's make it lowercase to improve readability.
26496      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26497      # Now convert it back to Unix-stile (cygpath)
26498      input_path=`$CYGPATH -u "$shortmode_path"`
26499      new_path="$input_path"
26500    fi
26501  fi
26502
26503  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26504  if test "x$test_cygdrive_prefix" = x; then
26505    # As a simple fix, exclude /usr/bin since it's not a real path.
26506    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26507      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26508      # a path prefixed by /cygdrive for fixpath to work.
26509      new_path="$CYGWIN_ROOT_PATH$input_path"
26510    fi
26511  fi
26512
26513  # remove trailing .exe if any
26514  new_path="${new_path/%.exe/}"
26515
26516  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26517
26518  # First separate the path from the arguments. This will split at the first
26519  # space.
26520  complete="$STRIP"
26521  path="${complete%% *}"
26522  tmp="$complete EOL"
26523  arguments="${tmp#* }"
26524
26525  # Input might be given as Windows format, start by converting to
26526  # unix format.
26527  new_path="$path"
26528
26529  windows_path="$new_path"
26530  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26531    unix_path=`$CYGPATH -u "$windows_path"`
26532    new_path="$unix_path"
26533  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26534    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26535    new_path="$unix_path"
26536  fi
26537
26538
26539  # Now try to locate executable using which
26540  new_path=`$WHICH "$new_path" 2> /dev/null`
26541
26542  if test "x$new_path" = x; then
26543    # Oops. Which didn't find the executable.
26544    # The splitting of arguments from the executable at a space might have been incorrect,
26545    # since paths with space are more likely in Windows. Give it another try with the whole
26546    # argument.
26547    path="$complete"
26548    arguments="EOL"
26549    new_path="$path"
26550
26551  windows_path="$new_path"
26552  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26553    unix_path=`$CYGPATH -u "$windows_path"`
26554    new_path="$unix_path"
26555  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26556    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26557    new_path="$unix_path"
26558  fi
26559
26560
26561    new_path=`$WHICH "$new_path" 2> /dev/null`
26562
26563    if test "x$new_path" = x; then
26564      # It's still not found. Now this is an unrecoverable error.
26565      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26566$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26567      has_space=`$ECHO "$complete" | $GREP " "`
26568      if test "x$has_space" != x; then
26569        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26570$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26571      fi
26572      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26573    fi
26574  fi
26575
26576  # Now new_path has a complete unix path to the binary
26577  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26578    # Keep paths in /bin as-is, but remove trailing .exe if any
26579    new_path="${new_path/%.exe/}"
26580    # Do not save /bin paths to all_fixpath_prefixes!
26581  else
26582    # Not in mixed or Windows style, start by that.
26583    new_path=`cmd //c echo $new_path`
26584
26585  input_path="$new_path"
26586  # Check if we need to convert this using DOS-style short mode. If the path
26587  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26588  # take no chances and rewrite it.
26589  # Note: m4 eats our [], so we need to use [ and ] instead.
26590  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26591  if test "x$has_forbidden_chars" != x; then
26592    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26593    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26594  fi
26595
26596    # Output is in $new_path
26597
26598  windows_path="$new_path"
26599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26600    unix_path=`$CYGPATH -u "$windows_path"`
26601    new_path="$unix_path"
26602  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26603    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26604    new_path="$unix_path"
26605  fi
26606
26607    # remove trailing .exe if any
26608    new_path="${new_path/%.exe/}"
26609
26610    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26611    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26612  fi
26613
26614  else
26615    # We're on a posix platform. Hooray! :)
26616    # First separate the path from the arguments. This will split at the first
26617    # space.
26618    complete="$STRIP"
26619    path="${complete%% *}"
26620    tmp="$complete EOL"
26621    arguments="${tmp#* }"
26622
26623    # Cannot rely on the command "which" here since it doesn't always work.
26624    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26625    if test -z "$is_absolute_path"; then
26626      # Path to executable is not absolute. Find it.
26627      IFS_save="$IFS"
26628      IFS=:
26629      for p in $PATH; do
26630        if test -f "$p/$path" && test -x "$p/$path"; then
26631          new_path="$p/$path"
26632          break
26633        fi
26634      done
26635      IFS="$IFS_save"
26636    else
26637      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26638$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26639      new_path="$path"
26640    fi
26641
26642    if test "x$new_path" = x; then
26643        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26644$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26645        has_space=`$ECHO "$complete" | $GREP " "`
26646        if test "x$has_space" != x; then
26647          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26648$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26649        fi
26650        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26651      fi
26652  fi
26653
26654      # Now join together the path and the arguments once again
26655      if test "x$arguments" != xEOL; then
26656        new_complete="$new_path ${arguments% *}"
26657      else
26658        new_complete="$new_path"
26659      fi
26660
26661  if test "x$complete" != "x$new_complete"; then
26662      STRIP="$new_complete"
26663      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26664$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26665    fi
26666
26667    # Extract the first word of "mcs", so it can be a program name with args.
26668set dummy mcs; ac_word=$2
26669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26670$as_echo_n "checking for $ac_word... " >&6; }
26671if ${ac_cv_path_MCS+:} false; then :
26672  $as_echo_n "(cached) " >&6
26673else
26674  case $MCS in
26675  [\\/]* | ?:[\\/]*)
26676  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
26677  ;;
26678  *)
26679  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26680for as_dir in $PATH
26681do
26682  IFS=$as_save_IFS
26683  test -z "$as_dir" && as_dir=.
26684    for ac_exec_ext in '' $ac_executable_extensions; do
26685  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26686    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
26687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26688    break 2
26689  fi
26690done
26691  done
26692IFS=$as_save_IFS
26693
26694  ;;
26695esac
26696fi
26697MCS=$ac_cv_path_MCS
26698if test -n "$MCS"; then
26699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
26700$as_echo "$MCS" >&6; }
26701else
26702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26703$as_echo "no" >&6; }
26704fi
26705
26706
26707
26708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26709
26710  # First separate the path from the arguments. This will split at the first
26711  # space.
26712  complete="$MCS"
26713  path="${complete%% *}"
26714  tmp="$complete EOL"
26715  arguments="${tmp#* }"
26716
26717  # Input might be given as Windows format, start by converting to
26718  # unix format.
26719  new_path=`$CYGPATH -u "$path"`
26720
26721  # Now try to locate executable using which
26722  new_path=`$WHICH "$new_path" 2> /dev/null`
26723  # bat and cmd files are not always considered executable in cygwin causing which
26724  # to not find them
26725  if test "x$new_path" = x \
26726           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26727           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26728    new_path=`$CYGPATH -u "$path"`
26729  fi
26730  if test "x$new_path" = x; then
26731    # Oops. Which didn't find the executable.
26732    # The splitting of arguments from the executable at a space might have been incorrect,
26733    # since paths with space are more likely in Windows. Give it another try with the whole
26734    # argument.
26735    path="$complete"
26736    arguments="EOL"
26737    new_path=`$CYGPATH -u "$path"`
26738    new_path=`$WHICH "$new_path" 2> /dev/null`
26739    # bat and cmd files are not always considered executable in cygwin causing which
26740    # to not find them
26741    if test "x$new_path" = x \
26742             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26743             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26744      new_path=`$CYGPATH -u "$path"`
26745    fi
26746    if test "x$new_path" = x; then
26747      # It's still not found. Now this is an unrecoverable error.
26748      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26749$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26750      has_space=`$ECHO "$complete" | $GREP " "`
26751      if test "x$has_space" != x; then
26752        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26753$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26754      fi
26755      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26756    fi
26757  fi
26758
26759  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26760  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26761  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26762  # "foo.exe" is OK but "foo" is an error.
26763  #
26764  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26765  # It is also a way to make sure we got the proper file name for the real test later on.
26766  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26767  if test "x$test_shortpath" = x; then
26768    # Short path failed, file does not exist as specified.
26769    # Try adding .exe or .cmd
26770    if test -f "${new_path}.exe"; then
26771       input_to_shortpath="${new_path}.exe"
26772    elif test -f "${new_path}.cmd"; then
26773       input_to_shortpath="${new_path}.cmd"
26774    else
26775      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
26776$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
26777      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26778$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26779      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26780    fi
26781  else
26782    input_to_shortpath="$new_path"
26783  fi
26784
26785  # Call helper function which possibly converts this using DOS-style short mode.
26786  # If so, the updated path is stored in $new_path.
26787  new_path="$input_to_shortpath"
26788
26789  input_path="$input_to_shortpath"
26790  # Check if we need to convert this using DOS-style short mode. If the path
26791  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26792  # take no chances and rewrite it.
26793  # Note: m4 eats our [], so we need to use [ and ] instead.
26794  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26795  if test "x$has_forbidden_chars" != x; then
26796    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26797    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26798    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26799    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26800      # Going to short mode and back again did indeed matter. Since short mode is
26801      # case insensitive, let's make it lowercase to improve readability.
26802      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26803      # Now convert it back to Unix-stile (cygpath)
26804      input_path=`$CYGPATH -u "$shortmode_path"`
26805      new_path="$input_path"
26806    fi
26807  fi
26808
26809  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26810  if test "x$test_cygdrive_prefix" = x; then
26811    # As a simple fix, exclude /usr/bin since it's not a real path.
26812    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26813      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26814      # a path prefixed by /cygdrive for fixpath to work.
26815      new_path="$CYGWIN_ROOT_PATH$input_path"
26816    fi
26817  fi
26818
26819  # remove trailing .exe if any
26820  new_path="${new_path/%.exe/}"
26821
26822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26823
26824  # First separate the path from the arguments. This will split at the first
26825  # space.
26826  complete="$MCS"
26827  path="${complete%% *}"
26828  tmp="$complete EOL"
26829  arguments="${tmp#* }"
26830
26831  # Input might be given as Windows format, start by converting to
26832  # unix format.
26833  new_path="$path"
26834
26835  windows_path="$new_path"
26836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26837    unix_path=`$CYGPATH -u "$windows_path"`
26838    new_path="$unix_path"
26839  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26840    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26841    new_path="$unix_path"
26842  fi
26843
26844
26845  # Now try to locate executable using which
26846  new_path=`$WHICH "$new_path" 2> /dev/null`
26847
26848  if test "x$new_path" = x; then
26849    # Oops. Which didn't find the executable.
26850    # The splitting of arguments from the executable at a space might have been incorrect,
26851    # since paths with space are more likely in Windows. Give it another try with the whole
26852    # argument.
26853    path="$complete"
26854    arguments="EOL"
26855    new_path="$path"
26856
26857  windows_path="$new_path"
26858  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26859    unix_path=`$CYGPATH -u "$windows_path"`
26860    new_path="$unix_path"
26861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26862    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26863    new_path="$unix_path"
26864  fi
26865
26866
26867    new_path=`$WHICH "$new_path" 2> /dev/null`
26868
26869    if test "x$new_path" = x; then
26870      # It's still not found. Now this is an unrecoverable error.
26871      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26872$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26873      has_space=`$ECHO "$complete" | $GREP " "`
26874      if test "x$has_space" != x; then
26875        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26876$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26877      fi
26878      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26879    fi
26880  fi
26881
26882  # Now new_path has a complete unix path to the binary
26883  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26884    # Keep paths in /bin as-is, but remove trailing .exe if any
26885    new_path="${new_path/%.exe/}"
26886    # Do not save /bin paths to all_fixpath_prefixes!
26887  else
26888    # Not in mixed or Windows style, start by that.
26889    new_path=`cmd //c echo $new_path`
26890
26891  input_path="$new_path"
26892  # Check if we need to convert this using DOS-style short mode. If the path
26893  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26894  # take no chances and rewrite it.
26895  # Note: m4 eats our [], so we need to use [ and ] instead.
26896  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26897  if test "x$has_forbidden_chars" != x; then
26898    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26899    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26900  fi
26901
26902    # Output is in $new_path
26903
26904  windows_path="$new_path"
26905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26906    unix_path=`$CYGPATH -u "$windows_path"`
26907    new_path="$unix_path"
26908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26909    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26910    new_path="$unix_path"
26911  fi
26912
26913    # remove trailing .exe if any
26914    new_path="${new_path/%.exe/}"
26915
26916    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26917    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26918  fi
26919
26920  else
26921    # We're on a posix platform. Hooray! :)
26922    # First separate the path from the arguments. This will split at the first
26923    # space.
26924    complete="$MCS"
26925    path="${complete%% *}"
26926    tmp="$complete EOL"
26927    arguments="${tmp#* }"
26928
26929    # Cannot rely on the command "which" here since it doesn't always work.
26930    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26931    if test -z "$is_absolute_path"; then
26932      # Path to executable is not absolute. Find it.
26933      IFS_save="$IFS"
26934      IFS=:
26935      for p in $PATH; do
26936        if test -f "$p/$path" && test -x "$p/$path"; then
26937          new_path="$p/$path"
26938          break
26939        fi
26940      done
26941      IFS="$IFS_save"
26942    else
26943      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
26944$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
26945      new_path="$path"
26946    fi
26947
26948    if test "x$new_path" = x; then
26949        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26950$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26951        has_space=`$ECHO "$complete" | $GREP " "`
26952        if test "x$has_space" != x; then
26953          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26954$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26955        fi
26956        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26957      fi
26958  fi
26959
26960      # Now join together the path and the arguments once again
26961      if test "x$arguments" != xEOL; then
26962        new_complete="$new_path ${arguments% *}"
26963      else
26964        new_complete="$new_path"
26965      fi
26966
26967  if test "x$complete" != "x$new_complete"; then
26968      MCS="$new_complete"
26969      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
26970$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
26971    fi
26972
26973elif test "x$OPENJDK_TARGET_OS" != xwindows; then
26974    if test -n "$ac_tool_prefix"; then
26975  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
26976set dummy ${ac_tool_prefix}nm; ac_word=$2
26977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26978$as_echo_n "checking for $ac_word... " >&6; }
26979if ${ac_cv_prog_NM+:} false; then :
26980  $as_echo_n "(cached) " >&6
26981else
26982  if test -n "$NM"; then
26983  ac_cv_prog_NM="$NM" # Let the user override the test.
26984else
26985as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26986for as_dir in $PATH
26987do
26988  IFS=$as_save_IFS
26989  test -z "$as_dir" && as_dir=.
26990    for ac_exec_ext in '' $ac_executable_extensions; do
26991  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26992    ac_cv_prog_NM="${ac_tool_prefix}nm"
26993    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26994    break 2
26995  fi
26996done
26997  done
26998IFS=$as_save_IFS
26999
27000fi
27001fi
27002NM=$ac_cv_prog_NM
27003if test -n "$NM"; then
27004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
27005$as_echo "$NM" >&6; }
27006else
27007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27008$as_echo "no" >&6; }
27009fi
27010
27011
27012fi
27013if test -z "$ac_cv_prog_NM"; then
27014  ac_ct_NM=$NM
27015  # Extract the first word of "nm", so it can be a program name with args.
27016set dummy nm; ac_word=$2
27017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27018$as_echo_n "checking for $ac_word... " >&6; }
27019if ${ac_cv_prog_ac_ct_NM+:} false; then :
27020  $as_echo_n "(cached) " >&6
27021else
27022  if test -n "$ac_ct_NM"; then
27023  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
27024else
27025as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27026for as_dir in $PATH
27027do
27028  IFS=$as_save_IFS
27029  test -z "$as_dir" && as_dir=.
27030    for ac_exec_ext in '' $ac_executable_extensions; do
27031  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27032    ac_cv_prog_ac_ct_NM="nm"
27033    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27034    break 2
27035  fi
27036done
27037  done
27038IFS=$as_save_IFS
27039
27040fi
27041fi
27042ac_ct_NM=$ac_cv_prog_ac_ct_NM
27043if test -n "$ac_ct_NM"; then
27044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
27045$as_echo "$ac_ct_NM" >&6; }
27046else
27047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27048$as_echo "no" >&6; }
27049fi
27050
27051  if test "x$ac_ct_NM" = x; then
27052    NM=""
27053  else
27054    case $cross_compiling:$ac_tool_warned in
27055yes:)
27056{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27057$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27058ac_tool_warned=yes ;;
27059esac
27060    NM=$ac_ct_NM
27061  fi
27062else
27063  NM="$ac_cv_prog_NM"
27064fi
27065
27066
27067  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27068
27069  # First separate the path from the arguments. This will split at the first
27070  # space.
27071  complete="$NM"
27072  path="${complete%% *}"
27073  tmp="$complete EOL"
27074  arguments="${tmp#* }"
27075
27076  # Input might be given as Windows format, start by converting to
27077  # unix format.
27078  new_path=`$CYGPATH -u "$path"`
27079
27080  # Now try to locate executable using which
27081  new_path=`$WHICH "$new_path" 2> /dev/null`
27082  # bat and cmd files are not always considered executable in cygwin causing which
27083  # to not find them
27084  if test "x$new_path" = x \
27085           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27086           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27087    new_path=`$CYGPATH -u "$path"`
27088  fi
27089  if test "x$new_path" = x; then
27090    # Oops. Which didn't find the executable.
27091    # The splitting of arguments from the executable at a space might have been incorrect,
27092    # since paths with space are more likely in Windows. Give it another try with the whole
27093    # argument.
27094    path="$complete"
27095    arguments="EOL"
27096    new_path=`$CYGPATH -u "$path"`
27097    new_path=`$WHICH "$new_path" 2> /dev/null`
27098    # bat and cmd files are not always considered executable in cygwin causing which
27099    # to not find them
27100    if test "x$new_path" = x \
27101             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27102             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27103      new_path=`$CYGPATH -u "$path"`
27104    fi
27105    if test "x$new_path" = x; then
27106      # It's still not found. Now this is an unrecoverable error.
27107      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27108$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27109      has_space=`$ECHO "$complete" | $GREP " "`
27110      if test "x$has_space" != x; then
27111        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27112$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27113      fi
27114      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27115    fi
27116  fi
27117
27118  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27119  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27120  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27121  # "foo.exe" is OK but "foo" is an error.
27122  #
27123  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27124  # It is also a way to make sure we got the proper file name for the real test later on.
27125  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27126  if test "x$test_shortpath" = x; then
27127    # Short path failed, file does not exist as specified.
27128    # Try adding .exe or .cmd
27129    if test -f "${new_path}.exe"; then
27130       input_to_shortpath="${new_path}.exe"
27131    elif test -f "${new_path}.cmd"; then
27132       input_to_shortpath="${new_path}.cmd"
27133    else
27134      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
27135$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
27136      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27137$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27138      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27139    fi
27140  else
27141    input_to_shortpath="$new_path"
27142  fi
27143
27144  # Call helper function which possibly converts this using DOS-style short mode.
27145  # If so, the updated path is stored in $new_path.
27146  new_path="$input_to_shortpath"
27147
27148  input_path="$input_to_shortpath"
27149  # Check if we need to convert this using DOS-style short mode. If the path
27150  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27151  # take no chances and rewrite it.
27152  # Note: m4 eats our [], so we need to use [ and ] instead.
27153  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27154  if test "x$has_forbidden_chars" != x; then
27155    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27156    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27157    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27158    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27159      # Going to short mode and back again did indeed matter. Since short mode is
27160      # case insensitive, let's make it lowercase to improve readability.
27161      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27162      # Now convert it back to Unix-stile (cygpath)
27163      input_path=`$CYGPATH -u "$shortmode_path"`
27164      new_path="$input_path"
27165    fi
27166  fi
27167
27168  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27169  if test "x$test_cygdrive_prefix" = x; then
27170    # As a simple fix, exclude /usr/bin since it's not a real path.
27171    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27172      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27173      # a path prefixed by /cygdrive for fixpath to work.
27174      new_path="$CYGWIN_ROOT_PATH$input_path"
27175    fi
27176  fi
27177
27178  # remove trailing .exe if any
27179  new_path="${new_path/%.exe/}"
27180
27181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27182
27183  # First separate the path from the arguments. This will split at the first
27184  # space.
27185  complete="$NM"
27186  path="${complete%% *}"
27187  tmp="$complete EOL"
27188  arguments="${tmp#* }"
27189
27190  # Input might be given as Windows format, start by converting to
27191  # unix format.
27192  new_path="$path"
27193
27194  windows_path="$new_path"
27195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27196    unix_path=`$CYGPATH -u "$windows_path"`
27197    new_path="$unix_path"
27198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27199    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27200    new_path="$unix_path"
27201  fi
27202
27203
27204  # Now try to locate executable using which
27205  new_path=`$WHICH "$new_path" 2> /dev/null`
27206
27207  if test "x$new_path" = x; then
27208    # Oops. Which didn't find the executable.
27209    # The splitting of arguments from the executable at a space might have been incorrect,
27210    # since paths with space are more likely in Windows. Give it another try with the whole
27211    # argument.
27212    path="$complete"
27213    arguments="EOL"
27214    new_path="$path"
27215
27216  windows_path="$new_path"
27217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27218    unix_path=`$CYGPATH -u "$windows_path"`
27219    new_path="$unix_path"
27220  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27221    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27222    new_path="$unix_path"
27223  fi
27224
27225
27226    new_path=`$WHICH "$new_path" 2> /dev/null`
27227
27228    if test "x$new_path" = x; then
27229      # It's still not found. Now this is an unrecoverable error.
27230      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27231$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27232      has_space=`$ECHO "$complete" | $GREP " "`
27233      if test "x$has_space" != x; then
27234        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27235$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27236      fi
27237      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27238    fi
27239  fi
27240
27241  # Now new_path has a complete unix path to the binary
27242  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27243    # Keep paths in /bin as-is, but remove trailing .exe if any
27244    new_path="${new_path/%.exe/}"
27245    # Do not save /bin paths to all_fixpath_prefixes!
27246  else
27247    # Not in mixed or Windows style, start by that.
27248    new_path=`cmd //c echo $new_path`
27249
27250  input_path="$new_path"
27251  # Check if we need to convert this using DOS-style short mode. If the path
27252  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27253  # take no chances and rewrite it.
27254  # Note: m4 eats our [], so we need to use [ and ] instead.
27255  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27256  if test "x$has_forbidden_chars" != x; then
27257    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27258    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27259  fi
27260
27261    # Output is in $new_path
27262
27263  windows_path="$new_path"
27264  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27265    unix_path=`$CYGPATH -u "$windows_path"`
27266    new_path="$unix_path"
27267  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27268    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27269    new_path="$unix_path"
27270  fi
27271
27272    # remove trailing .exe if any
27273    new_path="${new_path/%.exe/}"
27274
27275    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27276    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27277  fi
27278
27279  else
27280    # We're on a posix platform. Hooray! :)
27281    # First separate the path from the arguments. This will split at the first
27282    # space.
27283    complete="$NM"
27284    path="${complete%% *}"
27285    tmp="$complete EOL"
27286    arguments="${tmp#* }"
27287
27288    # Cannot rely on the command "which" here since it doesn't always work.
27289    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27290    if test -z "$is_absolute_path"; then
27291      # Path to executable is not absolute. Find it.
27292      IFS_save="$IFS"
27293      IFS=:
27294      for p in $PATH; do
27295        if test -f "$p/$path" && test -x "$p/$path"; then
27296          new_path="$p/$path"
27297          break
27298        fi
27299      done
27300      IFS="$IFS_save"
27301    else
27302      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
27303$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
27304      new_path="$path"
27305    fi
27306
27307    if test "x$new_path" = x; then
27308        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27309$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27310        has_space=`$ECHO "$complete" | $GREP " "`
27311        if test "x$has_space" != x; then
27312          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27313$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27314        fi
27315        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27316      fi
27317  fi
27318
27319      # Now join together the path and the arguments once again
27320      if test "x$arguments" != xEOL; then
27321        new_complete="$new_path ${arguments% *}"
27322      else
27323        new_complete="$new_path"
27324      fi
27325
27326  if test "x$complete" != "x$new_complete"; then
27327      NM="$new_complete"
27328      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
27329$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
27330    fi
27331
27332    GNM="$NM"
27333
27334    if test -n "$ac_tool_prefix"; then
27335  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
27336set dummy ${ac_tool_prefix}strip; ac_word=$2
27337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27338$as_echo_n "checking for $ac_word... " >&6; }
27339if ${ac_cv_prog_STRIP+:} false; then :
27340  $as_echo_n "(cached) " >&6
27341else
27342  if test -n "$STRIP"; then
27343  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
27344else
27345as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27346for as_dir in $PATH
27347do
27348  IFS=$as_save_IFS
27349  test -z "$as_dir" && as_dir=.
27350    for ac_exec_ext in '' $ac_executable_extensions; do
27351  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27352    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
27353    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27354    break 2
27355  fi
27356done
27357  done
27358IFS=$as_save_IFS
27359
27360fi
27361fi
27362STRIP=$ac_cv_prog_STRIP
27363if test -n "$STRIP"; then
27364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
27365$as_echo "$STRIP" >&6; }
27366else
27367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27368$as_echo "no" >&6; }
27369fi
27370
27371
27372fi
27373if test -z "$ac_cv_prog_STRIP"; then
27374  ac_ct_STRIP=$STRIP
27375  # Extract the first word of "strip", so it can be a program name with args.
27376set dummy strip; ac_word=$2
27377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27378$as_echo_n "checking for $ac_word... " >&6; }
27379if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
27380  $as_echo_n "(cached) " >&6
27381else
27382  if test -n "$ac_ct_STRIP"; then
27383  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
27384else
27385as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27386for as_dir in $PATH
27387do
27388  IFS=$as_save_IFS
27389  test -z "$as_dir" && as_dir=.
27390    for ac_exec_ext in '' $ac_executable_extensions; do
27391  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27392    ac_cv_prog_ac_ct_STRIP="strip"
27393    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27394    break 2
27395  fi
27396done
27397  done
27398IFS=$as_save_IFS
27399
27400fi
27401fi
27402ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
27403if test -n "$ac_ct_STRIP"; then
27404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
27405$as_echo "$ac_ct_STRIP" >&6; }
27406else
27407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27408$as_echo "no" >&6; }
27409fi
27410
27411  if test "x$ac_ct_STRIP" = x; then
27412    STRIP=""
27413  else
27414    case $cross_compiling:$ac_tool_warned in
27415yes:)
27416{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27417$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27418ac_tool_warned=yes ;;
27419esac
27420    STRIP=$ac_ct_STRIP
27421  fi
27422else
27423  STRIP="$ac_cv_prog_STRIP"
27424fi
27425
27426
27427  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27428
27429  # First separate the path from the arguments. This will split at the first
27430  # space.
27431  complete="$STRIP"
27432  path="${complete%% *}"
27433  tmp="$complete EOL"
27434  arguments="${tmp#* }"
27435
27436  # Input might be given as Windows format, start by converting to
27437  # unix format.
27438  new_path=`$CYGPATH -u "$path"`
27439
27440  # Now try to locate executable using which
27441  new_path=`$WHICH "$new_path" 2> /dev/null`
27442  # bat and cmd files are not always considered executable in cygwin causing which
27443  # to not find them
27444  if test "x$new_path" = x \
27445           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27446           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27447    new_path=`$CYGPATH -u "$path"`
27448  fi
27449  if test "x$new_path" = x; then
27450    # Oops. Which didn't find the executable.
27451    # The splitting of arguments from the executable at a space might have been incorrect,
27452    # since paths with space are more likely in Windows. Give it another try with the whole
27453    # argument.
27454    path="$complete"
27455    arguments="EOL"
27456    new_path=`$CYGPATH -u "$path"`
27457    new_path=`$WHICH "$new_path" 2> /dev/null`
27458    # bat and cmd files are not always considered executable in cygwin causing which
27459    # to not find them
27460    if test "x$new_path" = x \
27461             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27462             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27463      new_path=`$CYGPATH -u "$path"`
27464    fi
27465    if test "x$new_path" = x; then
27466      # It's still not found. Now this is an unrecoverable error.
27467      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27468$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27469      has_space=`$ECHO "$complete" | $GREP " "`
27470      if test "x$has_space" != x; then
27471        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27472$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27473      fi
27474      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27475    fi
27476  fi
27477
27478  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27479  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27480  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27481  # "foo.exe" is OK but "foo" is an error.
27482  #
27483  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27484  # It is also a way to make sure we got the proper file name for the real test later on.
27485  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27486  if test "x$test_shortpath" = x; then
27487    # Short path failed, file does not exist as specified.
27488    # Try adding .exe or .cmd
27489    if test -f "${new_path}.exe"; then
27490       input_to_shortpath="${new_path}.exe"
27491    elif test -f "${new_path}.cmd"; then
27492       input_to_shortpath="${new_path}.cmd"
27493    else
27494      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
27495$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
27496      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27497$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27498      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27499    fi
27500  else
27501    input_to_shortpath="$new_path"
27502  fi
27503
27504  # Call helper function which possibly converts this using DOS-style short mode.
27505  # If so, the updated path is stored in $new_path.
27506  new_path="$input_to_shortpath"
27507
27508  input_path="$input_to_shortpath"
27509  # Check if we need to convert this using DOS-style short mode. If the path
27510  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27511  # take no chances and rewrite it.
27512  # Note: m4 eats our [], so we need to use [ and ] instead.
27513  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27514  if test "x$has_forbidden_chars" != x; then
27515    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27516    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27517    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27518    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27519      # Going to short mode and back again did indeed matter. Since short mode is
27520      # case insensitive, let's make it lowercase to improve readability.
27521      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27522      # Now convert it back to Unix-stile (cygpath)
27523      input_path=`$CYGPATH -u "$shortmode_path"`
27524      new_path="$input_path"
27525    fi
27526  fi
27527
27528  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27529  if test "x$test_cygdrive_prefix" = x; then
27530    # As a simple fix, exclude /usr/bin since it's not a real path.
27531    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27532      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27533      # a path prefixed by /cygdrive for fixpath to work.
27534      new_path="$CYGWIN_ROOT_PATH$input_path"
27535    fi
27536  fi
27537
27538  # remove trailing .exe if any
27539  new_path="${new_path/%.exe/}"
27540
27541  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27542
27543  # First separate the path from the arguments. This will split at the first
27544  # space.
27545  complete="$STRIP"
27546  path="${complete%% *}"
27547  tmp="$complete EOL"
27548  arguments="${tmp#* }"
27549
27550  # Input might be given as Windows format, start by converting to
27551  # unix format.
27552  new_path="$path"
27553
27554  windows_path="$new_path"
27555  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27556    unix_path=`$CYGPATH -u "$windows_path"`
27557    new_path="$unix_path"
27558  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27559    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27560    new_path="$unix_path"
27561  fi
27562
27563
27564  # Now try to locate executable using which
27565  new_path=`$WHICH "$new_path" 2> /dev/null`
27566
27567  if test "x$new_path" = x; then
27568    # Oops. Which didn't find the executable.
27569    # The splitting of arguments from the executable at a space might have been incorrect,
27570    # since paths with space are more likely in Windows. Give it another try with the whole
27571    # argument.
27572    path="$complete"
27573    arguments="EOL"
27574    new_path="$path"
27575
27576  windows_path="$new_path"
27577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27578    unix_path=`$CYGPATH -u "$windows_path"`
27579    new_path="$unix_path"
27580  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27581    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27582    new_path="$unix_path"
27583  fi
27584
27585
27586    new_path=`$WHICH "$new_path" 2> /dev/null`
27587
27588    if test "x$new_path" = x; then
27589      # It's still not found. Now this is an unrecoverable error.
27590      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27591$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27592      has_space=`$ECHO "$complete" | $GREP " "`
27593      if test "x$has_space" != x; then
27594        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27595$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27596      fi
27597      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27598    fi
27599  fi
27600
27601  # Now new_path has a complete unix path to the binary
27602  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27603    # Keep paths in /bin as-is, but remove trailing .exe if any
27604    new_path="${new_path/%.exe/}"
27605    # Do not save /bin paths to all_fixpath_prefixes!
27606  else
27607    # Not in mixed or Windows style, start by that.
27608    new_path=`cmd //c echo $new_path`
27609
27610  input_path="$new_path"
27611  # Check if we need to convert this using DOS-style short mode. If the path
27612  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27613  # take no chances and rewrite it.
27614  # Note: m4 eats our [], so we need to use [ and ] instead.
27615  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27616  if test "x$has_forbidden_chars" != x; then
27617    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27618    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27619  fi
27620
27621    # Output is in $new_path
27622
27623  windows_path="$new_path"
27624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27625    unix_path=`$CYGPATH -u "$windows_path"`
27626    new_path="$unix_path"
27627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27628    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27629    new_path="$unix_path"
27630  fi
27631
27632    # remove trailing .exe if any
27633    new_path="${new_path/%.exe/}"
27634
27635    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27636    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27637  fi
27638
27639  else
27640    # We're on a posix platform. Hooray! :)
27641    # First separate the path from the arguments. This will split at the first
27642    # space.
27643    complete="$STRIP"
27644    path="${complete%% *}"
27645    tmp="$complete EOL"
27646    arguments="${tmp#* }"
27647
27648    # Cannot rely on the command "which" here since it doesn't always work.
27649    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27650    if test -z "$is_absolute_path"; then
27651      # Path to executable is not absolute. Find it.
27652      IFS_save="$IFS"
27653      IFS=:
27654      for p in $PATH; do
27655        if test -f "$p/$path" && test -x "$p/$path"; then
27656          new_path="$p/$path"
27657          break
27658        fi
27659      done
27660      IFS="$IFS_save"
27661    else
27662      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
27663$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
27664      new_path="$path"
27665    fi
27666
27667    if test "x$new_path" = x; then
27668        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27669$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27670        has_space=`$ECHO "$complete" | $GREP " "`
27671        if test "x$has_space" != x; then
27672          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27673$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27674        fi
27675        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27676      fi
27677  fi
27678
27679      # Now join together the path and the arguments once again
27680      if test "x$arguments" != xEOL; then
27681        new_complete="$new_path ${arguments% *}"
27682      else
27683        new_complete="$new_path"
27684      fi
27685
27686  if test "x$complete" != "x$new_complete"; then
27687      STRIP="$new_complete"
27688      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
27689$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
27690    fi
27691
27692fi
27693
27694# objcopy is used for moving debug symbols to separate files when
27695# full debug symbols are enabled.
27696if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
27697    if test -n "$ac_tool_prefix"; then
27698  for ac_prog in gobjcopy objcopy
27699  do
27700    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27701set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27703$as_echo_n "checking for $ac_word... " >&6; }
27704if ${ac_cv_prog_OBJCOPY+:} false; then :
27705  $as_echo_n "(cached) " >&6
27706else
27707  if test -n "$OBJCOPY"; then
27708  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
27709else
27710as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27711for as_dir in $PATH
27712do
27713  IFS=$as_save_IFS
27714  test -z "$as_dir" && as_dir=.
27715    for ac_exec_ext in '' $ac_executable_extensions; do
27716  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27717    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
27718    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27719    break 2
27720  fi
27721done
27722  done
27723IFS=$as_save_IFS
27724
27725fi
27726fi
27727OBJCOPY=$ac_cv_prog_OBJCOPY
27728if test -n "$OBJCOPY"; then
27729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
27730$as_echo "$OBJCOPY" >&6; }
27731else
27732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27733$as_echo "no" >&6; }
27734fi
27735
27736
27737    test -n "$OBJCOPY" && break
27738  done
27739fi
27740if test -z "$OBJCOPY"; then
27741  ac_ct_OBJCOPY=$OBJCOPY
27742  for ac_prog in gobjcopy objcopy
27743do
27744  # Extract the first word of "$ac_prog", so it can be a program name with args.
27745set dummy $ac_prog; ac_word=$2
27746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27747$as_echo_n "checking for $ac_word... " >&6; }
27748if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
27749  $as_echo_n "(cached) " >&6
27750else
27751  if test -n "$ac_ct_OBJCOPY"; then
27752  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
27753else
27754as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27755for as_dir in $PATH
27756do
27757  IFS=$as_save_IFS
27758  test -z "$as_dir" && as_dir=.
27759    for ac_exec_ext in '' $ac_executable_extensions; do
27760  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27761    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
27762    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27763    break 2
27764  fi
27765done
27766  done
27767IFS=$as_save_IFS
27768
27769fi
27770fi
27771ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
27772if test -n "$ac_ct_OBJCOPY"; then
27773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
27774$as_echo "$ac_ct_OBJCOPY" >&6; }
27775else
27776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27777$as_echo "no" >&6; }
27778fi
27779
27780
27781  test -n "$ac_ct_OBJCOPY" && break
27782done
27783
27784  if test "x$ac_ct_OBJCOPY" = x; then
27785    OBJCOPY=""
27786  else
27787    case $cross_compiling:$ac_tool_warned in
27788yes:)
27789{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27790$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27791ac_tool_warned=yes ;;
27792esac
27793    OBJCOPY=$ac_ct_OBJCOPY
27794  fi
27795fi
27796
27797    # Only call fixup if objcopy was found.
27798    if test -n "$OBJCOPY"; then
27799
27800  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27801
27802  # First separate the path from the arguments. This will split at the first
27803  # space.
27804  complete="$OBJCOPY"
27805  path="${complete%% *}"
27806  tmp="$complete EOL"
27807  arguments="${tmp#* }"
27808
27809  # Input might be given as Windows format, start by converting to
27810  # unix format.
27811  new_path=`$CYGPATH -u "$path"`
27812
27813  # Now try to locate executable using which
27814  new_path=`$WHICH "$new_path" 2> /dev/null`
27815  # bat and cmd files are not always considered executable in cygwin causing which
27816  # to not find them
27817  if test "x$new_path" = x \
27818           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27819           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27820    new_path=`$CYGPATH -u "$path"`
27821  fi
27822  if test "x$new_path" = x; then
27823    # Oops. Which didn't find the executable.
27824    # The splitting of arguments from the executable at a space might have been incorrect,
27825    # since paths with space are more likely in Windows. Give it another try with the whole
27826    # argument.
27827    path="$complete"
27828    arguments="EOL"
27829    new_path=`$CYGPATH -u "$path"`
27830    new_path=`$WHICH "$new_path" 2> /dev/null`
27831    # bat and cmd files are not always considered executable in cygwin causing which
27832    # to not find them
27833    if test "x$new_path" = x \
27834             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27835             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27836      new_path=`$CYGPATH -u "$path"`
27837    fi
27838    if test "x$new_path" = x; then
27839      # It's still not found. Now this is an unrecoverable error.
27840      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27841$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27842      has_space=`$ECHO "$complete" | $GREP " "`
27843      if test "x$has_space" != x; then
27844        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27845$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27846      fi
27847      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27848    fi
27849  fi
27850
27851  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27852  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27853  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27854  # "foo.exe" is OK but "foo" is an error.
27855  #
27856  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27857  # It is also a way to make sure we got the proper file name for the real test later on.
27858  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27859  if test "x$test_shortpath" = x; then
27860    # Short path failed, file does not exist as specified.
27861    # Try adding .exe or .cmd
27862    if test -f "${new_path}.exe"; then
27863       input_to_shortpath="${new_path}.exe"
27864    elif test -f "${new_path}.cmd"; then
27865       input_to_shortpath="${new_path}.cmd"
27866    else
27867      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
27868$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
27869      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27870$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27871      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27872    fi
27873  else
27874    input_to_shortpath="$new_path"
27875  fi
27876
27877  # Call helper function which possibly converts this using DOS-style short mode.
27878  # If so, the updated path is stored in $new_path.
27879  new_path="$input_to_shortpath"
27880
27881  input_path="$input_to_shortpath"
27882  # Check if we need to convert this using DOS-style short mode. If the path
27883  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27884  # take no chances and rewrite it.
27885  # Note: m4 eats our [], so we need to use [ and ] instead.
27886  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27887  if test "x$has_forbidden_chars" != x; then
27888    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27889    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27890    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27891    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27892      # Going to short mode and back again did indeed matter. Since short mode is
27893      # case insensitive, let's make it lowercase to improve readability.
27894      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27895      # Now convert it back to Unix-stile (cygpath)
27896      input_path=`$CYGPATH -u "$shortmode_path"`
27897      new_path="$input_path"
27898    fi
27899  fi
27900
27901  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27902  if test "x$test_cygdrive_prefix" = x; then
27903    # As a simple fix, exclude /usr/bin since it's not a real path.
27904    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27905      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27906      # a path prefixed by /cygdrive for fixpath to work.
27907      new_path="$CYGWIN_ROOT_PATH$input_path"
27908    fi
27909  fi
27910
27911  # remove trailing .exe if any
27912  new_path="${new_path/%.exe/}"
27913
27914  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27915
27916  # First separate the path from the arguments. This will split at the first
27917  # space.
27918  complete="$OBJCOPY"
27919  path="${complete%% *}"
27920  tmp="$complete EOL"
27921  arguments="${tmp#* }"
27922
27923  # Input might be given as Windows format, start by converting to
27924  # unix format.
27925  new_path="$path"
27926
27927  windows_path="$new_path"
27928  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27929    unix_path=`$CYGPATH -u "$windows_path"`
27930    new_path="$unix_path"
27931  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27932    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27933    new_path="$unix_path"
27934  fi
27935
27936
27937  # Now try to locate executable using which
27938  new_path=`$WHICH "$new_path" 2> /dev/null`
27939
27940  if test "x$new_path" = x; then
27941    # Oops. Which didn't find the executable.
27942    # The splitting of arguments from the executable at a space might have been incorrect,
27943    # since paths with space are more likely in Windows. Give it another try with the whole
27944    # argument.
27945    path="$complete"
27946    arguments="EOL"
27947    new_path="$path"
27948
27949  windows_path="$new_path"
27950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27951    unix_path=`$CYGPATH -u "$windows_path"`
27952    new_path="$unix_path"
27953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27954    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27955    new_path="$unix_path"
27956  fi
27957
27958
27959    new_path=`$WHICH "$new_path" 2> /dev/null`
27960
27961    if test "x$new_path" = x; then
27962      # It's still not found. Now this is an unrecoverable error.
27963      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27964$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27965      has_space=`$ECHO "$complete" | $GREP " "`
27966      if test "x$has_space" != x; then
27967        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27968$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27969      fi
27970      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27971    fi
27972  fi
27973
27974  # Now new_path has a complete unix path to the binary
27975  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27976    # Keep paths in /bin as-is, but remove trailing .exe if any
27977    new_path="${new_path/%.exe/}"
27978    # Do not save /bin paths to all_fixpath_prefixes!
27979  else
27980    # Not in mixed or Windows style, start by that.
27981    new_path=`cmd //c echo $new_path`
27982
27983  input_path="$new_path"
27984  # Check if we need to convert this using DOS-style short mode. If the path
27985  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27986  # take no chances and rewrite it.
27987  # Note: m4 eats our [], so we need to use [ and ] instead.
27988  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27989  if test "x$has_forbidden_chars" != x; then
27990    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27991    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27992  fi
27993
27994    # Output is in $new_path
27995
27996  windows_path="$new_path"
27997  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27998    unix_path=`$CYGPATH -u "$windows_path"`
27999    new_path="$unix_path"
28000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28001    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28002    new_path="$unix_path"
28003  fi
28004
28005    # remove trailing .exe if any
28006    new_path="${new_path/%.exe/}"
28007
28008    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28009    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28010  fi
28011
28012  else
28013    # We're on a posix platform. Hooray! :)
28014    # First separate the path from the arguments. This will split at the first
28015    # space.
28016    complete="$OBJCOPY"
28017    path="${complete%% *}"
28018    tmp="$complete EOL"
28019    arguments="${tmp#* }"
28020
28021    # Cannot rely on the command "which" here since it doesn't always work.
28022    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28023    if test -z "$is_absolute_path"; then
28024      # Path to executable is not absolute. Find it.
28025      IFS_save="$IFS"
28026      IFS=:
28027      for p in $PATH; do
28028        if test -f "$p/$path" && test -x "$p/$path"; then
28029          new_path="$p/$path"
28030          break
28031        fi
28032      done
28033      IFS="$IFS_save"
28034    else
28035      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
28036$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
28037      new_path="$path"
28038    fi
28039
28040    if test "x$new_path" = x; then
28041        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
28042$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
28043        has_space=`$ECHO "$complete" | $GREP " "`
28044        if test "x$has_space" != x; then
28045          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28046$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28047        fi
28048        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
28049      fi
28050  fi
28051
28052      # Now join together the path and the arguments once again
28053      if test "x$arguments" != xEOL; then
28054        new_complete="$new_path ${arguments% *}"
28055      else
28056        new_complete="$new_path"
28057      fi
28058
28059  if test "x$complete" != "x$new_complete"; then
28060      OBJCOPY="$new_complete"
28061      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
28062$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
28063    fi
28064
28065    fi
28066fi
28067
28068if test -n "$ac_tool_prefix"; then
28069  for ac_prog in gobjdump objdump
28070  do
28071    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28072set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28074$as_echo_n "checking for $ac_word... " >&6; }
28075if ${ac_cv_prog_OBJDUMP+:} false; then :
28076  $as_echo_n "(cached) " >&6
28077else
28078  if test -n "$OBJDUMP"; then
28079  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
28080else
28081as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28082for as_dir in $PATH
28083do
28084  IFS=$as_save_IFS
28085  test -z "$as_dir" && as_dir=.
28086    for ac_exec_ext in '' $ac_executable_extensions; do
28087  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28088    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
28089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28090    break 2
28091  fi
28092done
28093  done
28094IFS=$as_save_IFS
28095
28096fi
28097fi
28098OBJDUMP=$ac_cv_prog_OBJDUMP
28099if test -n "$OBJDUMP"; then
28100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
28101$as_echo "$OBJDUMP" >&6; }
28102else
28103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28104$as_echo "no" >&6; }
28105fi
28106
28107
28108    test -n "$OBJDUMP" && break
28109  done
28110fi
28111if test -z "$OBJDUMP"; then
28112  ac_ct_OBJDUMP=$OBJDUMP
28113  for ac_prog in gobjdump objdump
28114do
28115  # Extract the first word of "$ac_prog", so it can be a program name with args.
28116set dummy $ac_prog; ac_word=$2
28117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28118$as_echo_n "checking for $ac_word... " >&6; }
28119if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
28120  $as_echo_n "(cached) " >&6
28121else
28122  if test -n "$ac_ct_OBJDUMP"; then
28123  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
28124else
28125as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28126for as_dir in $PATH
28127do
28128  IFS=$as_save_IFS
28129  test -z "$as_dir" && as_dir=.
28130    for ac_exec_ext in '' $ac_executable_extensions; do
28131  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28132    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
28133    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28134    break 2
28135  fi
28136done
28137  done
28138IFS=$as_save_IFS
28139
28140fi
28141fi
28142ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
28143if test -n "$ac_ct_OBJDUMP"; then
28144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
28145$as_echo "$ac_ct_OBJDUMP" >&6; }
28146else
28147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28148$as_echo "no" >&6; }
28149fi
28150
28151
28152  test -n "$ac_ct_OBJDUMP" && break
28153done
28154
28155  if test "x$ac_ct_OBJDUMP" = x; then
28156    OBJDUMP=""
28157  else
28158    case $cross_compiling:$ac_tool_warned in
28159yes:)
28160{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28161$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28162ac_tool_warned=yes ;;
28163esac
28164    OBJDUMP=$ac_ct_OBJDUMP
28165  fi
28166fi
28167
28168if test "x$OBJDUMP" != x; then
28169  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
28170
28171  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28172
28173  # First separate the path from the arguments. This will split at the first
28174  # space.
28175  complete="$OBJDUMP"
28176  path="${complete%% *}"
28177  tmp="$complete EOL"
28178  arguments="${tmp#* }"
28179
28180  # Input might be given as Windows format, start by converting to
28181  # unix format.
28182  new_path=`$CYGPATH -u "$path"`
28183
28184  # Now try to locate executable using which
28185  new_path=`$WHICH "$new_path" 2> /dev/null`
28186  # bat and cmd files are not always considered executable in cygwin causing which
28187  # to not find them
28188  if test "x$new_path" = x \
28189           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28190           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28191    new_path=`$CYGPATH -u "$path"`
28192  fi
28193  if test "x$new_path" = x; then
28194    # Oops. Which didn't find the executable.
28195    # The splitting of arguments from the executable at a space might have been incorrect,
28196    # since paths with space are more likely in Windows. Give it another try with the whole
28197    # argument.
28198    path="$complete"
28199    arguments="EOL"
28200    new_path=`$CYGPATH -u "$path"`
28201    new_path=`$WHICH "$new_path" 2> /dev/null`
28202    # bat and cmd files are not always considered executable in cygwin causing which
28203    # to not find them
28204    if test "x$new_path" = x \
28205             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28206             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28207      new_path=`$CYGPATH -u "$path"`
28208    fi
28209    if test "x$new_path" = x; then
28210      # It's still not found. Now this is an unrecoverable error.
28211      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28212$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28213      has_space=`$ECHO "$complete" | $GREP " "`
28214      if test "x$has_space" != x; then
28215        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28216$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28217      fi
28218      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28219    fi
28220  fi
28221
28222  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28223  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28224  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28225  # "foo.exe" is OK but "foo" is an error.
28226  #
28227  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28228  # It is also a way to make sure we got the proper file name for the real test later on.
28229  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28230  if test "x$test_shortpath" = x; then
28231    # Short path failed, file does not exist as specified.
28232    # Try adding .exe or .cmd
28233    if test -f "${new_path}.exe"; then
28234       input_to_shortpath="${new_path}.exe"
28235    elif test -f "${new_path}.cmd"; then
28236       input_to_shortpath="${new_path}.cmd"
28237    else
28238      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
28239$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
28240      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28241$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28242      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28243    fi
28244  else
28245    input_to_shortpath="$new_path"
28246  fi
28247
28248  # Call helper function which possibly converts this using DOS-style short mode.
28249  # If so, the updated path is stored in $new_path.
28250  new_path="$input_to_shortpath"
28251
28252  input_path="$input_to_shortpath"
28253  # Check if we need to convert this using DOS-style short mode. If the path
28254  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28255  # take no chances and rewrite it.
28256  # Note: m4 eats our [], so we need to use [ and ] instead.
28257  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28258  if test "x$has_forbidden_chars" != x; then
28259    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28260    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28261    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28262    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28263      # Going to short mode and back again did indeed matter. Since short mode is
28264      # case insensitive, let's make it lowercase to improve readability.
28265      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28266      # Now convert it back to Unix-stile (cygpath)
28267      input_path=`$CYGPATH -u "$shortmode_path"`
28268      new_path="$input_path"
28269    fi
28270  fi
28271
28272  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28273  if test "x$test_cygdrive_prefix" = x; then
28274    # As a simple fix, exclude /usr/bin since it's not a real path.
28275    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28276      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28277      # a path prefixed by /cygdrive for fixpath to work.
28278      new_path="$CYGWIN_ROOT_PATH$input_path"
28279    fi
28280  fi
28281
28282  # remove trailing .exe if any
28283  new_path="${new_path/%.exe/}"
28284
28285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28286
28287  # First separate the path from the arguments. This will split at the first
28288  # space.
28289  complete="$OBJDUMP"
28290  path="${complete%% *}"
28291  tmp="$complete EOL"
28292  arguments="${tmp#* }"
28293
28294  # Input might be given as Windows format, start by converting to
28295  # unix format.
28296  new_path="$path"
28297
28298  windows_path="$new_path"
28299  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28300    unix_path=`$CYGPATH -u "$windows_path"`
28301    new_path="$unix_path"
28302  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28303    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28304    new_path="$unix_path"
28305  fi
28306
28307
28308  # Now try to locate executable using which
28309  new_path=`$WHICH "$new_path" 2> /dev/null`
28310
28311  if test "x$new_path" = x; then
28312    # Oops. Which didn't find the executable.
28313    # The splitting of arguments from the executable at a space might have been incorrect,
28314    # since paths with space are more likely in Windows. Give it another try with the whole
28315    # argument.
28316    path="$complete"
28317    arguments="EOL"
28318    new_path="$path"
28319
28320  windows_path="$new_path"
28321  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28322    unix_path=`$CYGPATH -u "$windows_path"`
28323    new_path="$unix_path"
28324  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28325    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28326    new_path="$unix_path"
28327  fi
28328
28329
28330    new_path=`$WHICH "$new_path" 2> /dev/null`
28331
28332    if test "x$new_path" = x; then
28333      # It's still not found. Now this is an unrecoverable error.
28334      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28335$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28336      has_space=`$ECHO "$complete" | $GREP " "`
28337      if test "x$has_space" != x; then
28338        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28339$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28340      fi
28341      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28342    fi
28343  fi
28344
28345  # Now new_path has a complete unix path to the binary
28346  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28347    # Keep paths in /bin as-is, but remove trailing .exe if any
28348    new_path="${new_path/%.exe/}"
28349    # Do not save /bin paths to all_fixpath_prefixes!
28350  else
28351    # Not in mixed or Windows style, start by that.
28352    new_path=`cmd //c echo $new_path`
28353
28354  input_path="$new_path"
28355  # Check if we need to convert this using DOS-style short mode. If the path
28356  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28357  # take no chances and rewrite it.
28358  # Note: m4 eats our [], so we need to use [ and ] instead.
28359  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28360  if test "x$has_forbidden_chars" != x; then
28361    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28362    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28363  fi
28364
28365    # Output is in $new_path
28366
28367  windows_path="$new_path"
28368  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28369    unix_path=`$CYGPATH -u "$windows_path"`
28370    new_path="$unix_path"
28371  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28372    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28373    new_path="$unix_path"
28374  fi
28375
28376    # remove trailing .exe if any
28377    new_path="${new_path/%.exe/}"
28378
28379    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28380    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28381  fi
28382
28383  else
28384    # We're on a posix platform. Hooray! :)
28385    # First separate the path from the arguments. This will split at the first
28386    # space.
28387    complete="$OBJDUMP"
28388    path="${complete%% *}"
28389    tmp="$complete EOL"
28390    arguments="${tmp#* }"
28391
28392    # Cannot rely on the command "which" here since it doesn't always work.
28393    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28394    if test -z "$is_absolute_path"; then
28395      # Path to executable is not absolute. Find it.
28396      IFS_save="$IFS"
28397      IFS=:
28398      for p in $PATH; do
28399        if test -f "$p/$path" && test -x "$p/$path"; then
28400          new_path="$p/$path"
28401          break
28402        fi
28403      done
28404      IFS="$IFS_save"
28405    else
28406      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
28407$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
28408      new_path="$path"
28409    fi
28410
28411    if test "x$new_path" = x; then
28412        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28413$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28414        has_space=`$ECHO "$complete" | $GREP " "`
28415        if test "x$has_space" != x; then
28416          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28417$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28418        fi
28419        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28420      fi
28421  fi
28422
28423      # Now join together the path and the arguments once again
28424      if test "x$arguments" != xEOL; then
28425        new_complete="$new_path ${arguments% *}"
28426      else
28427        new_complete="$new_path"
28428      fi
28429
28430  if test "x$complete" != "x$new_complete"; then
28431      OBJDUMP="$new_complete"
28432      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
28433$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
28434    fi
28435
28436fi
28437
28438if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
28439   # Extract the first word of "lipo", so it can be a program name with args.
28440set dummy lipo; ac_word=$2
28441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28442$as_echo_n "checking for $ac_word... " >&6; }
28443if ${ac_cv_path_LIPO+:} false; then :
28444  $as_echo_n "(cached) " >&6
28445else
28446  case $LIPO in
28447  [\\/]* | ?:[\\/]*)
28448  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
28449  ;;
28450  *)
28451  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28452for as_dir in $PATH
28453do
28454  IFS=$as_save_IFS
28455  test -z "$as_dir" && as_dir=.
28456    for ac_exec_ext in '' $ac_executable_extensions; do
28457  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28458    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
28459    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28460    break 2
28461  fi
28462done
28463  done
28464IFS=$as_save_IFS
28465
28466  ;;
28467esac
28468fi
28469LIPO=$ac_cv_path_LIPO
28470if test -n "$LIPO"; then
28471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
28472$as_echo "$LIPO" >&6; }
28473else
28474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28475$as_echo "no" >&6; }
28476fi
28477
28478
28479
28480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28481
28482  # First separate the path from the arguments. This will split at the first
28483  # space.
28484  complete="$LIPO"
28485  path="${complete%% *}"
28486  tmp="$complete EOL"
28487  arguments="${tmp#* }"
28488
28489  # Input might be given as Windows format, start by converting to
28490  # unix format.
28491  new_path=`$CYGPATH -u "$path"`
28492
28493  # Now try to locate executable using which
28494  new_path=`$WHICH "$new_path" 2> /dev/null`
28495  # bat and cmd files are not always considered executable in cygwin causing which
28496  # to not find them
28497  if test "x$new_path" = x \
28498           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28499           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28500    new_path=`$CYGPATH -u "$path"`
28501  fi
28502  if test "x$new_path" = x; then
28503    # Oops. Which didn't find the executable.
28504    # The splitting of arguments from the executable at a space might have been incorrect,
28505    # since paths with space are more likely in Windows. Give it another try with the whole
28506    # argument.
28507    path="$complete"
28508    arguments="EOL"
28509    new_path=`$CYGPATH -u "$path"`
28510    new_path=`$WHICH "$new_path" 2> /dev/null`
28511    # bat and cmd files are not always considered executable in cygwin causing which
28512    # to not find them
28513    if test "x$new_path" = x \
28514             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28515             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28516      new_path=`$CYGPATH -u "$path"`
28517    fi
28518    if test "x$new_path" = x; then
28519      # It's still not found. Now this is an unrecoverable error.
28520      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28521$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28522      has_space=`$ECHO "$complete" | $GREP " "`
28523      if test "x$has_space" != x; then
28524        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28525$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28526      fi
28527      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28528    fi
28529  fi
28530
28531  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28532  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28533  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28534  # "foo.exe" is OK but "foo" is an error.
28535  #
28536  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28537  # It is also a way to make sure we got the proper file name for the real test later on.
28538  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28539  if test "x$test_shortpath" = x; then
28540    # Short path failed, file does not exist as specified.
28541    # Try adding .exe or .cmd
28542    if test -f "${new_path}.exe"; then
28543       input_to_shortpath="${new_path}.exe"
28544    elif test -f "${new_path}.cmd"; then
28545       input_to_shortpath="${new_path}.cmd"
28546    else
28547      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
28548$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
28549      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28550$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28551      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28552    fi
28553  else
28554    input_to_shortpath="$new_path"
28555  fi
28556
28557  # Call helper function which possibly converts this using DOS-style short mode.
28558  # If so, the updated path is stored in $new_path.
28559  new_path="$input_to_shortpath"
28560
28561  input_path="$input_to_shortpath"
28562  # Check if we need to convert this using DOS-style short mode. If the path
28563  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28564  # take no chances and rewrite it.
28565  # Note: m4 eats our [], so we need to use [ and ] instead.
28566  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28567  if test "x$has_forbidden_chars" != x; then
28568    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28569    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28570    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28571    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28572      # Going to short mode and back again did indeed matter. Since short mode is
28573      # case insensitive, let's make it lowercase to improve readability.
28574      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28575      # Now convert it back to Unix-stile (cygpath)
28576      input_path=`$CYGPATH -u "$shortmode_path"`
28577      new_path="$input_path"
28578    fi
28579  fi
28580
28581  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28582  if test "x$test_cygdrive_prefix" = x; then
28583    # As a simple fix, exclude /usr/bin since it's not a real path.
28584    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28585      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28586      # a path prefixed by /cygdrive for fixpath to work.
28587      new_path="$CYGWIN_ROOT_PATH$input_path"
28588    fi
28589  fi
28590
28591  # remove trailing .exe if any
28592  new_path="${new_path/%.exe/}"
28593
28594  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28595
28596  # First separate the path from the arguments. This will split at the first
28597  # space.
28598  complete="$LIPO"
28599  path="${complete%% *}"
28600  tmp="$complete EOL"
28601  arguments="${tmp#* }"
28602
28603  # Input might be given as Windows format, start by converting to
28604  # unix format.
28605  new_path="$path"
28606
28607  windows_path="$new_path"
28608  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28609    unix_path=`$CYGPATH -u "$windows_path"`
28610    new_path="$unix_path"
28611  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28612    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28613    new_path="$unix_path"
28614  fi
28615
28616
28617  # Now try to locate executable using which
28618  new_path=`$WHICH "$new_path" 2> /dev/null`
28619
28620  if test "x$new_path" = x; then
28621    # Oops. Which didn't find the executable.
28622    # The splitting of arguments from the executable at a space might have been incorrect,
28623    # since paths with space are more likely in Windows. Give it another try with the whole
28624    # argument.
28625    path="$complete"
28626    arguments="EOL"
28627    new_path="$path"
28628
28629  windows_path="$new_path"
28630  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28631    unix_path=`$CYGPATH -u "$windows_path"`
28632    new_path="$unix_path"
28633  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28634    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28635    new_path="$unix_path"
28636  fi
28637
28638
28639    new_path=`$WHICH "$new_path" 2> /dev/null`
28640
28641    if test "x$new_path" = x; then
28642      # It's still not found. Now this is an unrecoverable error.
28643      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28644$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28645      has_space=`$ECHO "$complete" | $GREP " "`
28646      if test "x$has_space" != x; then
28647        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28648$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28649      fi
28650      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28651    fi
28652  fi
28653
28654  # Now new_path has a complete unix path to the binary
28655  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28656    # Keep paths in /bin as-is, but remove trailing .exe if any
28657    new_path="${new_path/%.exe/}"
28658    # Do not save /bin paths to all_fixpath_prefixes!
28659  else
28660    # Not in mixed or Windows style, start by that.
28661    new_path=`cmd //c echo $new_path`
28662
28663  input_path="$new_path"
28664  # Check if we need to convert this using DOS-style short mode. If the path
28665  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28666  # take no chances and rewrite it.
28667  # Note: m4 eats our [], so we need to use [ and ] instead.
28668  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28669  if test "x$has_forbidden_chars" != x; then
28670    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28671    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28672  fi
28673
28674    # Output is in $new_path
28675
28676  windows_path="$new_path"
28677  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28678    unix_path=`$CYGPATH -u "$windows_path"`
28679    new_path="$unix_path"
28680  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28681    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28682    new_path="$unix_path"
28683  fi
28684
28685    # remove trailing .exe if any
28686    new_path="${new_path/%.exe/}"
28687
28688    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28689    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28690  fi
28691
28692  else
28693    # We're on a posix platform. Hooray! :)
28694    # First separate the path from the arguments. This will split at the first
28695    # space.
28696    complete="$LIPO"
28697    path="${complete%% *}"
28698    tmp="$complete EOL"
28699    arguments="${tmp#* }"
28700
28701    # Cannot rely on the command "which" here since it doesn't always work.
28702    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28703    if test -z "$is_absolute_path"; then
28704      # Path to executable is not absolute. Find it.
28705      IFS_save="$IFS"
28706      IFS=:
28707      for p in $PATH; do
28708        if test -f "$p/$path" && test -x "$p/$path"; then
28709          new_path="$p/$path"
28710          break
28711        fi
28712      done
28713      IFS="$IFS_save"
28714    else
28715      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
28716$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
28717      new_path="$path"
28718    fi
28719
28720    if test "x$new_path" = x; then
28721        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28722$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28723        has_space=`$ECHO "$complete" | $GREP " "`
28724        if test "x$has_space" != x; then
28725          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28726$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28727        fi
28728        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28729      fi
28730  fi
28731
28732      # Now join together the path and the arguments once again
28733      if test "x$arguments" != xEOL; then
28734        new_complete="$new_path ${arguments% *}"
28735      else
28736        new_complete="$new_path"
28737      fi
28738
28739  if test "x$complete" != "x$new_complete"; then
28740      LIPO="$new_complete"
28741      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
28742$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
28743    fi
28744
28745fi
28746
28747
28748
28749# Restore old path without tools dir
28750PATH="$OLD_PATH"
28751
28752
28753# FIXME: Currently we must test this after paths but before flags. Fix!
28754
28755# And we can test some aspects on the target using configure macros.
28756
28757
28758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
28759$as_echo_n "checking for ANSI C header files... " >&6; }
28760if ${ac_cv_header_stdc+:} false; then :
28761  $as_echo_n "(cached) " >&6
28762else
28763  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28764/* end confdefs.h.  */
28765#include <stdlib.h>
28766#include <stdarg.h>
28767#include <string.h>
28768#include <float.h>
28769
28770int
28771main ()
28772{
28773
28774  ;
28775  return 0;
28776}
28777_ACEOF
28778if ac_fn_cxx_try_compile "$LINENO"; then :
28779  ac_cv_header_stdc=yes
28780else
28781  ac_cv_header_stdc=no
28782fi
28783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28784
28785if test $ac_cv_header_stdc = yes; then
28786  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
28787  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28788/* end confdefs.h.  */
28789#include <string.h>
28790
28791_ACEOF
28792if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28793  $EGREP "memchr" >/dev/null 2>&1; then :
28794
28795else
28796  ac_cv_header_stdc=no
28797fi
28798rm -f conftest*
28799
28800fi
28801
28802if test $ac_cv_header_stdc = yes; then
28803  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
28804  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28805/* end confdefs.h.  */
28806#include <stdlib.h>
28807
28808_ACEOF
28809if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28810  $EGREP "free" >/dev/null 2>&1; then :
28811
28812else
28813  ac_cv_header_stdc=no
28814fi
28815rm -f conftest*
28816
28817fi
28818
28819if test $ac_cv_header_stdc = yes; then
28820  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
28821  if test "$cross_compiling" = yes; then :
28822  :
28823else
28824  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28825/* end confdefs.h.  */
28826#include <ctype.h>
28827#include <stdlib.h>
28828#if ((' ' & 0x0FF) == 0x020)
28829# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
28830# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
28831#else
28832# define ISLOWER(c) \
28833		   (('a' <= (c) && (c) <= 'i') \
28834		     || ('j' <= (c) && (c) <= 'r') \
28835		     || ('s' <= (c) && (c) <= 'z'))
28836# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
28837#endif
28838
28839#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
28840int
28841main ()
28842{
28843  int i;
28844  for (i = 0; i < 256; i++)
28845    if (XOR (islower (i), ISLOWER (i))
28846	|| toupper (i) != TOUPPER (i))
28847      return 2;
28848  return 0;
28849}
28850_ACEOF
28851if ac_fn_cxx_try_run "$LINENO"; then :
28852
28853else
28854  ac_cv_header_stdc=no
28855fi
28856rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28857  conftest.$ac_objext conftest.beam conftest.$ac_ext
28858fi
28859
28860fi
28861fi
28862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
28863$as_echo "$ac_cv_header_stdc" >&6; }
28864if test $ac_cv_header_stdc = yes; then
28865
28866$as_echo "#define STDC_HEADERS 1" >>confdefs.h
28867
28868fi
28869
28870# On IRIX 5.3, sys/types and inttypes.h are conflicting.
28871for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
28872		  inttypes.h stdint.h unistd.h
28873do :
28874  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28875ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
28876"
28877if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28878  cat >>confdefs.h <<_ACEOF
28879#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28880_ACEOF
28881
28882fi
28883
28884done
28885
28886
28887
28888###############################################################################
28889#
28890# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
28891# (The JVM can use 32 or 64 bit Java pointers but that decision
28892# is made at runtime.)
28893#
28894
28895if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
28896  # Always specify -m flag on Solaris
28897  # And -q on AIX because otherwise the compiler produces 32-bit objects by default
28898
28899  # keep track of c/cxx flags that we added outselves...
28900  #   to prevent emitting warning...
28901  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
28902  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
28903  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
28904
28905  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28906  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28907  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28908
28909  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28910  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28911  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28912
28913elif test "x$COMPILE_TYPE" = xreduced; then
28914  if test "x$OPENJDK_TARGET_OS" != xwindows; then
28915    # Specify -m if running reduced on other Posix platforms
28916
28917  # keep track of c/cxx flags that we added outselves...
28918  #   to prevent emitting warning...
28919  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
28920  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
28921  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
28922
28923  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28924  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28925  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28926
28927  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28928  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28929  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28930
28931  fi
28932fi
28933
28934# Make compilation sanity check
28935for ac_header in stdio.h
28936do :
28937  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
28938if test "x$ac_cv_header_stdio_h" = xyes; then :
28939  cat >>confdefs.h <<_ACEOF
28940#define HAVE_STDIO_H 1
28941_ACEOF
28942
28943else
28944
28945  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
28946$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
28947  if test "x$COMPILE_TYPE" = xreduced; then
28948    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
28949$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
28950  elif test "x$COMPILE_TYPE" = xcross; then
28951    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
28952$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
28953  fi
28954  as_fn_error $? "Cannot continue." "$LINENO" 5
28955
28956fi
28957
28958done
28959
28960
28961# The cast to long int works around a bug in the HP C Compiler
28962# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
28963# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
28964# This bug is HP SR number 8606223364.
28965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
28966$as_echo_n "checking size of int *... " >&6; }
28967if ${ac_cv_sizeof_int_p+:} false; then :
28968  $as_echo_n "(cached) " >&6
28969else
28970  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
28971
28972else
28973  if test "$ac_cv_type_int_p" = yes; then
28974     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28975$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28976as_fn_error 77 "cannot compute sizeof (int *)
28977See \`config.log' for more details" "$LINENO" 5; }
28978   else
28979     ac_cv_sizeof_int_p=0
28980   fi
28981fi
28982
28983fi
28984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
28985$as_echo "$ac_cv_sizeof_int_p" >&6; }
28986
28987
28988
28989cat >>confdefs.h <<_ACEOF
28990#define SIZEOF_INT_P $ac_cv_sizeof_int_p
28991_ACEOF
28992
28993
28994
28995# AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
28996if test "x$ac_cv_sizeof_int_p" = x; then
28997    # The test failed, lets stick to the assumed value.
28998    { $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
28999$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
29000else
29001    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
29002
29003    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
29004        # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
29005        # Let's try to implicitely set the compilers target architecture and retry the test
29006        { $as_echo "$as_me:${as_lineno-$LINENO}: 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)." >&5
29007$as_echo "$as_me: 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)." >&6;}
29008        { $as_echo "$as_me:${as_lineno-$LINENO}: I'll retry after setting the platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
29009$as_echo "$as_me: I'll retry after setting the platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
29010
29011  # keep track of c/cxx flags that we added outselves...
29012  #   to prevent emitting warning...
29013  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
29014  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
29015  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
29016
29017  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
29018  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
29019  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
29020
29021  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
29022  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
29023  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
29024
29025
29026        # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
29027        unset ac_cv_sizeof_int_p
29028	# And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
29029	cat >>confdefs.h <<_ACEOF
29030#undef SIZEOF_INT_P
29031_ACEOF
29032
29033        # The cast to long int works around a bug in the HP C Compiler
29034# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
29035# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
29036# This bug is HP SR number 8606223364.
29037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
29038$as_echo_n "checking size of int *... " >&6; }
29039if ${ac_cv_sizeof_int_p+:} false; then :
29040  $as_echo_n "(cached) " >&6
29041else
29042  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
29043
29044else
29045  if test "$ac_cv_type_int_p" = yes; then
29046     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29047$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29048as_fn_error 77 "cannot compute sizeof (int *)
29049See \`config.log' for more details" "$LINENO" 5; }
29050   else
29051     ac_cv_sizeof_int_p=0
29052   fi
29053fi
29054
29055fi
29056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
29057$as_echo "$ac_cv_sizeof_int_p" >&6; }
29058
29059
29060
29061cat >>confdefs.h <<_ACEOF
29062#define SIZEOF_INT_P $ac_cv_sizeof_int_p
29063_ACEOF
29064
29065
29066
29067        TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
29068
29069        if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
29070            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
29071        fi
29072    fi
29073fi
29074
29075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
29076$as_echo_n "checking for target address size... " >&6; }
29077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
29078$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
29079
29080
29081###############################################################################
29082#
29083# Is the target little of big endian?
29084#
29085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
29086$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
29087if ${ac_cv_c_bigendian+:} false; then :
29088  $as_echo_n "(cached) " >&6
29089else
29090  ac_cv_c_bigendian=unknown
29091    # See if we're dealing with a universal compiler.
29092    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29093/* end confdefs.h.  */
29094#ifndef __APPLE_CC__
29095	       not a universal capable compiler
29096	     #endif
29097	     typedef int dummy;
29098
29099_ACEOF
29100if ac_fn_cxx_try_compile "$LINENO"; then :
29101
29102	# Check for potential -arch flags.  It is not universal unless
29103	# there are at least two -arch flags with different values.
29104	ac_arch=
29105	ac_prev=
29106	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
29107	 if test -n "$ac_prev"; then
29108	   case $ac_word in
29109	     i?86 | x86_64 | ppc | ppc64)
29110	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
29111		 ac_arch=$ac_word
29112	       else
29113		 ac_cv_c_bigendian=universal
29114		 break
29115	       fi
29116	       ;;
29117	   esac
29118	   ac_prev=
29119	 elif test "x$ac_word" = "x-arch"; then
29120	   ac_prev=arch
29121	 fi
29122       done
29123fi
29124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29125    if test $ac_cv_c_bigendian = unknown; then
29126      # See if sys/param.h defines the BYTE_ORDER macro.
29127      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29128/* end confdefs.h.  */
29129#include <sys/types.h>
29130	     #include <sys/param.h>
29131
29132int
29133main ()
29134{
29135#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
29136		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
29137		     && LITTLE_ENDIAN)
29138	      bogus endian macros
29139	     #endif
29140
29141  ;
29142  return 0;
29143}
29144_ACEOF
29145if ac_fn_cxx_try_compile "$LINENO"; then :
29146  # It does; now see whether it defined to BIG_ENDIAN or not.
29147	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29148/* end confdefs.h.  */
29149#include <sys/types.h>
29150		#include <sys/param.h>
29151
29152int
29153main ()
29154{
29155#if BYTE_ORDER != BIG_ENDIAN
29156		 not big endian
29157		#endif
29158
29159  ;
29160  return 0;
29161}
29162_ACEOF
29163if ac_fn_cxx_try_compile "$LINENO"; then :
29164  ac_cv_c_bigendian=yes
29165else
29166  ac_cv_c_bigendian=no
29167fi
29168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29169fi
29170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29171    fi
29172    if test $ac_cv_c_bigendian = unknown; then
29173      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
29174      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29175/* end confdefs.h.  */
29176#include <limits.h>
29177
29178int
29179main ()
29180{
29181#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
29182	      bogus endian macros
29183	     #endif
29184
29185  ;
29186  return 0;
29187}
29188_ACEOF
29189if ac_fn_cxx_try_compile "$LINENO"; then :
29190  # It does; now see whether it defined to _BIG_ENDIAN or not.
29191	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29192/* end confdefs.h.  */
29193#include <limits.h>
29194
29195int
29196main ()
29197{
29198#ifndef _BIG_ENDIAN
29199		 not big endian
29200		#endif
29201
29202  ;
29203  return 0;
29204}
29205_ACEOF
29206if ac_fn_cxx_try_compile "$LINENO"; then :
29207  ac_cv_c_bigendian=yes
29208else
29209  ac_cv_c_bigendian=no
29210fi
29211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29212fi
29213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29214    fi
29215    if test $ac_cv_c_bigendian = unknown; then
29216      # Compile a test program.
29217      if test "$cross_compiling" = yes; then :
29218  # Try to guess by grepping values from an object file.
29219	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29220/* end confdefs.h.  */
29221short int ascii_mm[] =
29222		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
29223		short int ascii_ii[] =
29224		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
29225		int use_ascii (int i) {
29226		  return ascii_mm[i] + ascii_ii[i];
29227		}
29228		short int ebcdic_ii[] =
29229		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
29230		short int ebcdic_mm[] =
29231		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
29232		int use_ebcdic (int i) {
29233		  return ebcdic_mm[i] + ebcdic_ii[i];
29234		}
29235		extern int foo;
29236
29237int
29238main ()
29239{
29240return use_ascii (foo) == use_ebcdic (foo);
29241  ;
29242  return 0;
29243}
29244_ACEOF
29245if ac_fn_cxx_try_compile "$LINENO"; then :
29246  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
29247	      ac_cv_c_bigendian=yes
29248	    fi
29249	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
29250	      if test "$ac_cv_c_bigendian" = unknown; then
29251		ac_cv_c_bigendian=no
29252	      else
29253		# finding both strings is unlikely to happen, but who knows?
29254		ac_cv_c_bigendian=unknown
29255	      fi
29256	    fi
29257fi
29258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29259else
29260  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29261/* end confdefs.h.  */
29262$ac_includes_default
29263int
29264main ()
29265{
29266
29267	     /* Are we little or big endian?  From Harbison&Steele.  */
29268	     union
29269	     {
29270	       long int l;
29271	       char c[sizeof (long int)];
29272	     } u;
29273	     u.l = 1;
29274	     return u.c[sizeof (long int) - 1] == 1;
29275
29276  ;
29277  return 0;
29278}
29279_ACEOF
29280if ac_fn_cxx_try_run "$LINENO"; then :
29281  ac_cv_c_bigendian=no
29282else
29283  ac_cv_c_bigendian=yes
29284fi
29285rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29286  conftest.$ac_objext conftest.beam conftest.$ac_ext
29287fi
29288
29289    fi
29290fi
29291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
29292$as_echo "$ac_cv_c_bigendian" >&6; }
29293 case $ac_cv_c_bigendian in #(
29294   yes)
29295     ENDIAN="big";; #(
29296   no)
29297     ENDIAN="little" ;; #(
29298   universal)
29299     ENDIAN="universal_endianness"
29300     ;; #(
29301   *)
29302     ENDIAN="unknown" ;;
29303 esac
29304
29305
29306if test "x$ENDIAN" = xuniversal_endianness; then
29307    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
29308fi
29309if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
29310    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
29311fi
29312
29313
29314# Configure flags for the tools
29315
29316
29317###############################################################################
29318#
29319# How to compile shared libraries.
29320#
29321
29322if test "x$GCC" = xyes; then
29323    COMPILER_NAME=gcc
29324    PICFLAG="-fPIC"
29325    LIBRARY_PREFIX=lib
29326    SHARED_LIBRARY='lib$1.so'
29327    STATIC_LIBRARY='lib$1.a'
29328    SHARED_LIBRARY_FLAGS="-shared"
29329    SHARED_LIBRARY_SUFFIX='.so'
29330    STATIC_LIBRARY_SUFFIX='.a'
29331    OBJ_SUFFIX='.o'
29332    EXE_SUFFIX=''
29333    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
29334    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
29335    C_FLAG_REORDER=''
29336    CXX_FLAG_REORDER=''
29337    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29338    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29339    LD="$CC"
29340    LDEXE="$CC"
29341    LDCXX="$CXX"
29342    LDEXECXX="$CXX"
29343    POST_STRIP_CMD="$STRIP -g"
29344
29345    # Linking is different on MacOSX
29346    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29347        # Might change in the future to clang.
29348        COMPILER_NAME=gcc
29349        SHARED_LIBRARY='lib$1.dylib'
29350        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
29351        SHARED_LIBRARY_SUFFIX='.dylib'
29352        EXE_SUFFIX=''
29353        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
29354        SET_SHARED_LIBRARY_MAPFILE=''
29355        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
29356        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29357        POST_STRIP_CMD="$STRIP -S"
29358    fi
29359else
29360    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29361        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
29362        COMPILER_NAME=ossc
29363        PICFLAG="-KPIC"
29364        LIBRARY_PREFIX=lib
29365        SHARED_LIBRARY='lib$1.so'
29366        STATIC_LIBRARY='lib$1.a'
29367        SHARED_LIBRARY_FLAGS="-G"
29368        SHARED_LIBRARY_SUFFIX='.so'
29369        STATIC_LIBRARY_SUFFIX='.a'
29370        OBJ_SUFFIX='.o'
29371        EXE_SUFFIX=''
29372        SET_SHARED_LIBRARY_NAME=''
29373        SET_SHARED_LIBRARY_MAPFILE='-M$1'
29374	C_FLAG_REORDER='-xF'
29375	CXX_FLAG_REORDER='-xF'
29376        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
29377        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29378        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
29379        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
29380        CFLAGS_JDKLIB_EXTRA='-xstrconst'
29381        POST_STRIP_CMD="$STRIP -x"
29382        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
29383    fi
29384    if test "x$OPENJDK_TARGET_OS" = xaix; then
29385        COMPILER_NAME=xlc
29386        PICFLAG="-qpic=large"
29387        LIBRARY_PREFIX=lib
29388        SHARED_LIBRARY='lib$1.so'
29389        STATIC_LIBRARY='lib$1.a'
29390        SHARED_LIBRARY_FLAGS="-qmkshrobj"
29391        SHARED_LIBRARY_SUFFIX='.so'
29392        STATIC_LIBRARY_SUFFIX='.a'
29393        OBJ_SUFFIX='.o'
29394        EXE_SUFFIX=''
29395        SET_SHARED_LIBRARY_NAME=''
29396        SET_SHARED_LIBRARY_MAPFILE=''
29397        C_FLAG_REORDER=''
29398        CXX_FLAG_REORDER=''
29399        SET_SHARED_LIBRARY_ORIGIN=''
29400        SET_EXECUTABLE_ORIGIN=""
29401        CFLAGS_JDK=""
29402        CXXFLAGS_JDK=""
29403        CFLAGS_JDKLIB_EXTRA=''
29404        POST_STRIP_CMD="$STRIP -X32_64"
29405        POST_MCS_CMD=""
29406    fi
29407    if test "x$OPENJDK_TARGET_OS" = xwindows; then
29408        # If it is not gcc, then assume it is the MS Visual Studio compiler
29409        COMPILER_NAME=cl
29410        PICFLAG=""
29411        LIBRARY_PREFIX=
29412        SHARED_LIBRARY='$1.dll'
29413        STATIC_LIBRARY='$1.lib'
29414        SHARED_LIBRARY_FLAGS="-LD"
29415        SHARED_LIBRARY_SUFFIX='.dll'
29416        STATIC_LIBRARY_SUFFIX='.lib'
29417        OBJ_SUFFIX='.obj'
29418        EXE_SUFFIX='.exe'
29419        SET_SHARED_LIBRARY_NAME=''
29420        SET_SHARED_LIBRARY_MAPFILE=''
29421        SET_SHARED_LIBRARY_ORIGIN=''
29422        SET_EXECUTABLE_ORIGIN=''
29423    fi
29424fi
29425
29426
29427
29428
29429
29430
29431
29432
29433
29434
29435
29436
29437
29438
29439
29440
29441
29442
29443
29444# The (cross) compiler is now configured, we can now test capabilities
29445# of the target platform.
29446
29447
29448
29449###############################################################################
29450#
29451# Setup the opt flags for different compilers
29452# and different operating systems.
29453#
29454
29455#
29456# NOTE: check for -mstackrealign needs to be below potential addition of -m32
29457#
29458if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
29459    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
29460    # While waiting for a better solution, the current workaround is to use -mstackrealign.
29461    CFLAGS="$CFLAGS -mstackrealign"
29462    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
29463$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
29464    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29465/* end confdefs.h.  */
29466int main() { return 0; }
29467_ACEOF
29468if ac_fn_cxx_try_link "$LINENO"; then :
29469
29470		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29471$as_echo "yes" >&6; }
29472
29473else
29474
29475		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29476$as_echo "no" >&6; }
29477	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
29478
29479fi
29480rm -f core conftest.err conftest.$ac_objext \
29481    conftest$ac_exeext conftest.$ac_ext
29482fi
29483
29484C_FLAG_DEPS="-MMD -MF"
29485CXX_FLAG_DEPS="-MMD -MF"
29486
29487case $COMPILER_TYPE in
29488  CC )
29489    case $COMPILER_NAME in
29490      gcc )
29491      	case $OPENJDK_TARGET_OS in
29492	  macosx )
29493	    # On MacOSX we optimize for size, something
29494	    # we should do for all platforms?
29495	    C_O_FLAG_HI="-Os"
29496	    C_O_FLAG_NORM="-Os"
29497	    C_O_FLAG_NONE=""
29498	    ;;
29499	  *)
29500	    C_O_FLAG_HI="-O3"
29501	    C_O_FLAG_NORM="-O2"
29502	    C_O_FLAG_NONE="-O0"
29503	    ;;
29504	esac
29505        CXX_O_FLAG_HI="$C_O_FLAG_HI"
29506        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29507        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29508        CFLAGS_DEBUG_SYMBOLS="-g"
29509        CXXFLAGS_DEBUG_SYMBOLS="-g"
29510        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
29511            CFLAGS_DEBUG_SYMBOLS="-g1"
29512            CXXFLAGS_DEBUG_SYMBOLS="-g1"
29513        fi
29514        ;;
29515      ossc )
29516        #
29517        # Forte has different names for this with their C++ compiler...
29518        #
29519        C_FLAG_DEPS="-xMMD -xMF"
29520        CXX_FLAG_DEPS="-xMMD -xMF"
29521
29522        # Extra options used with HIGHEST
29523        #
29524        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
29525        #          done with care, there are some assumptions below that need to
29526        #          be understood about the use of pointers, and IEEE behavior.
29527        #
29528        # Use non-standard floating point mode (not IEEE 754)
29529        CC_HIGHEST="$CC_HIGHEST -fns"
29530        # Do some simplification of floating point arithmetic (not IEEE 754)
29531        CC_HIGHEST="$CC_HIGHEST -fsimple"
29532        # Use single precision floating point with 'float'
29533        CC_HIGHEST="$CC_HIGHEST -fsingle"
29534        # Assume memory references via basic pointer types do not alias
29535        #   (Source with excessing pointer casting and data access with mixed
29536        #    pointer types are not recommended)
29537        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
29538        # Use intrinsic or inline versions for math/std functions
29539        #   (If you expect perfect errno behavior, do not use this)
29540        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
29541        # Loop data dependency optimizations (need -xO3 or higher)
29542        CC_HIGHEST="$CC_HIGHEST -xdepend"
29543        # Pointer parameters to functions do not overlap
29544        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
29545        #    If you pass in multiple pointers to the same data, do not use this)
29546        CC_HIGHEST="$CC_HIGHEST -xrestrict"
29547        # Inline some library routines
29548        #   (If you expect perfect errno behavior, do not use this)
29549        CC_HIGHEST="$CC_HIGHEST -xlibmil"
29550        # Use optimized math routines
29551        #   (If you expect perfect errno behavior, do not use this)
29552        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
29553        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
29554
29555        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
29556          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
29557          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
29558        fi
29559
29560        case $OPENJDK_TARGET_CPU_ARCH in
29561          x86)
29562            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
29563            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
29564            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
29565            C_O_FLAG_NONE="-xregs=no%frameptr"
29566            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
29567            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
29568            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
29569            CXX_O_FLAG_NONE="-xregs=no%frameptr"
29570            if test "x$OPENJDK_TARGET_CPU" = xx86; then
29571               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
29572               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
29573            fi
29574            ;;
29575          sparc)
29576            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29577            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29578            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29579            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29580            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29581            C_O_FLAG_NONE=""
29582            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29583            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29584            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29585            CXX_O_FLAG_NONE=""
29586            ;;
29587        esac
29588
29589        CFLAGS_DEBUG_SYMBOLS="-g -xs"
29590        CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
29591        ;;
29592      xlc )
29593        C_FLAG_DEPS="-qmakedep=gcc -MF"
29594        CXX_FLAG_DEPS="-qmakedep=gcc -MF"
29595        C_O_FLAG_HIGHEST="-O3"
29596        C_O_FLAG_HI="-O3 -qstrict"
29597        C_O_FLAG_NORM="-O2"
29598        C_O_FLAG_NONE=""
29599        CXX_O_FLAG_HIGHEST="-O3"
29600        CXX_O_FLAG_HI="-O3 -qstrict"
29601        CXX_O_FLAG_NORM="-O2"
29602        CXX_O_FLAG_NONE=""
29603        CFLAGS_DEBUG_SYMBOLS="-g"
29604        CXXFLAGS_DEBUG_SYMBOLS="-g"
29605        LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
29606        CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
29607        CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
29608        ;;
29609    esac
29610    ;;
29611  CL )
29612    C_O_FLAG_HIGHEST="-O2"
29613    C_O_FLAG_HI="-O1"
29614    C_O_FLAG_NORM="-O1"
29615    C_O_FLAG_NONE="-Od"
29616    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
29617    CXX_O_FLAG_HI="$C_O_FLAG_HI"
29618    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29619    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29620    ;;
29621esac
29622
29623if test -z "$C_O_FLAG_HIGHEST"; then
29624   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
29625fi
29626
29627if test -z "$CXX_O_FLAG_HIGHEST"; then
29628   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
29629fi
29630
29631
29632
29633
29634
29635
29636
29637
29638
29639
29640
29641
29642
29643
29644if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29645   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29646$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29647fi
29648
29649if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29650   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29651$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29652fi
29653
29654if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29655   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29656$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29657fi
29658
29659
29660# Check whether --with-extra-cflags was given.
29661if test "${with_extra_cflags+set}" = set; then :
29662  withval=$with_extra_cflags;
29663fi
29664
29665
29666
29667# Check whether --with-extra-cxxflags was given.
29668if test "${with_extra_cxxflags+set}" = set; then :
29669  withval=$with_extra_cxxflags;
29670fi
29671
29672
29673
29674# Check whether --with-extra-ldflags was given.
29675if test "${with_extra_ldflags+set}" = set; then :
29676  withval=$with_extra_ldflags;
29677fi
29678
29679
29680CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
29681CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
29682LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
29683
29684# Hotspot needs these set in their legacy form
29685LEGACY_EXTRA_CFLAGS=$with_extra_cflags
29686LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
29687LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
29688
29689
29690
29691
29692
29693###############################################################################
29694#
29695# Now setup the CFLAGS and LDFLAGS for the JDK build.
29696# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
29697#
29698case $COMPILER_NAME in
29699      gcc )
29700      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
29701                          -pipe \
29702                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
29703	  case $OPENJDK_TARGET_CPU_ARCH in
29704	  arm )
29705            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
29706	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29707	  ;;
29708	  ppc )
29709            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
29710	  ;;
29711	  * )
29712	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
29713	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29714          ;;
29715	  esac
29716          ;;
29717      ossc )
29718          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
29719          case $OPENJDK_TARGET_CPU_ARCH in
29720          x86 )
29721            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
29722       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
29723          ;;
29724          esac
29725
29726      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
29727      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
29728
29729          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
29730          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
29731          ;;
29732      xlc )
29733          CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
29734          CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
29735
29736          LDFLAGS_JDK="$LDFLAGS_JDK"
29737          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK"
29738          ;;
29739      cl )
29740          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
29741               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
29742	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
29743	       -DWIN32 -DIAL"
29744          case $OPENJDK_TARGET_CPU in
29745              x86 )
29746                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
29747                  ;;
29748              x86_64 )
29749                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
29750                  ;;
29751          esac
29752          ;;
29753esac
29754
29755###############################################################################
29756
29757# Adjust flags according to debug level.
29758case $DEBUG_LEVEL in
29759      fastdebug )
29760              CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29761              CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29762	      C_O_FLAG_HI="$C_O_FLAG_NORM"
29763	      C_O_FLAG_NORM="$C_O_FLAG_NORM"
29764	      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
29765	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
29766              JAVAC_FLAGS="$JAVAC_FLAGS -g"
29767              ;;
29768      slowdebug )
29769              CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29770              CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29771	      C_O_FLAG_HI="$C_O_FLAG_NONE"
29772	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
29773	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
29774	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
29775              JAVAC_FLAGS="$JAVAC_FLAGS -g"
29776              ;;
29777esac
29778
29779CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
29780
29781# The package path is used only on macosx?
29782PACKAGE_PATH=/opt/local
29783
29784
29785if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
29786    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
29787    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
29788    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
29789    #   Note: -Dmacro         is the same as    #define macro 1
29790    #         -Dmacro=	    is the same as    #define macro
29791    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29792        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
29793    else
29794        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
29795    fi
29796else
29797    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
29798fi
29799if test "x$OPENJDK_TARGET_OS" = xlinux; then
29800    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
29801fi
29802if test "x$OPENJDK_TARGET_OS" = xwindows; then
29803    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
29804fi
29805if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29806    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
29807fi
29808if test "x$OPENJDK_TARGET_OS" = xaix; then
29809    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DAIX -DPPC64"
29810fi
29811if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29812    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
29813    # Setting these parameters makes it an error to link to macosx APIs that are
29814    # newer than the given OS version and makes the linked binaries compatible even
29815    # if built on a newer version of the OS.
29816    # The expected format is X.Y.Z
29817    MACOSX_VERSION_MIN=10.7.0
29818
29819    # The macro takes the version with no dots, ex: 1070
29820    # Let the flags variables get resolved in make for easier override on make
29821    # command line.
29822    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29823    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29824fi
29825if test "x$OPENJDK_TARGET_OS" = xbsd; then
29826    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
29827fi
29828if test "x$DEBUG_LEVEL" = xrelease; then
29829    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
29830    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29831        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
29832    fi
29833else
29834    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
29835fi
29836
29837CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
29838CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
29839
29840CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
29841        -I${JDK_OUTPUTDIR}/include \
29842        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
29843        -I${JDK_TOPDIR}/src/share/javavm/export \
29844        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
29845        -I${JDK_TOPDIR}/src/share/native/common \
29846        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
29847
29848# The shared libraries are compiled using the picflag.
29849CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
29850CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
29851
29852# Executable flags
29853CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
29854CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
29855
29856# Now this is odd. The JDK native libraries have to link against libjvm.so
29857# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
29858# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
29859# is identical for client and server? Yes. Which is picked at runtime (client or server)?
29860# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
29861# libraries will link to whatever is in memory. Yuck.
29862#
29863# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
29864if test "x$COMPILER_NAME" = xcl; then
29865    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
29866    if test "x$OPENJDK_TARGET_CPU" = xx86; then
29867        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
29868    fi
29869    # TODO: make -debug optional "--disable-full-debug-symbols"
29870    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
29871    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
29872    LDFLAGS_JDKLIB_SUFFIX=""
29873    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
29874        LDFLAGS_STACK_SIZE=1048576
29875    else
29876        LDFLAGS_STACK_SIZE=327680
29877    fi
29878    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
29879else
29880    if test "x$COMPILER_NAME" = xgcc; then
29881        # If this is a --hash-style=gnu system, use --hash-style=both, why?
29882        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
29883        if test -n "$HAS_GNU_HASH"; then
29884            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
29885        fi
29886        if test "x$OPENJDK_TARGET_OS" = xlinux; then
29887          # And since we now know that the linker is gnu, then add -z defs, to forbid
29888          # undefined symbols in object files.
29889          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
29890          if test "x$DEBUG_LEVEL" = "xrelease"; then
29891              # When building release libraries, tell the linker optimize them.
29892              # Should this be supplied to the OSS linker as well?
29893              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
29894          fi
29895        fi
29896    fi
29897    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
29898                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
29899
29900    # On some platforms (mac) the linker warns about non existing -L dirs.
29901    # Add server first if available. Linking aginst client does not always produce the same results.
29902    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
29903    # Default to server for other variants.
29904    if test "x$JVM_VARIANT_SERVER" = xtrue; then
29905        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29906    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
29907        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
29908    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
29909        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
29910    else
29911        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29912    fi
29913
29914    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
29915    if test "x$COMPILER_NAME" = xossc; then
29916        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
29917    fi
29918
29919    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
29920    if test "x$OPENJDK_TARGET_OS" = xlinux; then
29921        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
29922    fi
29923fi
29924
29925
29926
29927
29928
29929
29930
29931
29932
29933
29934
29935
29936
29937
29938
29939  # Some Zero and Shark settings.
29940  # ZERO_ARCHFLAG tells the compiler which mode to build for
29941  case "${OPENJDK_TARGET_CPU}" in
29942    s390)
29943      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
29944      ;;
29945    *)
29946      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
29947  esac
29948
29949  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
29950$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
29951  supports=yes
29952
29953  saved_cflags="$CFLAGS"
29954  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
29955  ac_ext=c
29956ac_cpp='$CPP $CPPFLAGS'
29957ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29958ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29959ac_compiler_gnu=$ac_cv_c_compiler_gnu
29960
29961  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29962/* end confdefs.h.  */
29963
29964    int i;
29965
29966_ACEOF
29967if ac_fn_c_try_compile "$LINENO"; then :
29968
29969else
29970  supports=no
29971fi
29972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29973  ac_ext=cpp
29974ac_cpp='$CXXCPP $CPPFLAGS'
29975ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29976ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29977ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29978
29979  CFLAGS="$saved_cflags"
29980
29981  saved_cxxflags="$CXXFLAGS"
29982  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
29983  ac_ext=cpp
29984ac_cpp='$CXXCPP $CPPFLAGS'
29985ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29986ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29987ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29988
29989  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29990/* end confdefs.h.  */
29991
29992    int i;
29993
29994_ACEOF
29995if ac_fn_cxx_try_compile "$LINENO"; then :
29996
29997else
29998  supports=no
29999fi
30000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30001  ac_ext=cpp
30002ac_cpp='$CXXCPP $CPPFLAGS'
30003ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30004ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30005ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30006
30007  CXXFLAGS="$saved_cxxflags"
30008
30009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
30010$as_echo "$supports" >&6; }
30011  if test "x$supports" = "xyes" ; then
30012    :
30013  else
30014    ZERO_ARCHFLAG=""
30015  fi
30016
30017
30018
30019  # Check that the compiler supports -mX (or -qX on AIX) flags
30020  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
30021
30022  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
30023$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
30024  supports=yes
30025
30026  saved_cflags="$CFLAGS"
30027  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
30028  ac_ext=c
30029ac_cpp='$CPP $CPPFLAGS'
30030ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30031ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30032ac_compiler_gnu=$ac_cv_c_compiler_gnu
30033
30034  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30035/* end confdefs.h.  */
30036
30037    int i;
30038
30039_ACEOF
30040if ac_fn_c_try_compile "$LINENO"; then :
30041
30042else
30043  supports=no
30044fi
30045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30046  ac_ext=cpp
30047ac_cpp='$CXXCPP $CPPFLAGS'
30048ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30049ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30050ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30051
30052  CFLAGS="$saved_cflags"
30053
30054  saved_cxxflags="$CXXFLAGS"
30055  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
30056  ac_ext=cpp
30057ac_cpp='$CXXCPP $CPPFLAGS'
30058ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30059ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30060ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30061
30062  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30063/* end confdefs.h.  */
30064
30065    int i;
30066
30067_ACEOF
30068if ac_fn_cxx_try_compile "$LINENO"; then :
30069
30070else
30071  supports=no
30072fi
30073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30074  ac_ext=cpp
30075ac_cpp='$CXXCPP $CPPFLAGS'
30076ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30077ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30078ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30079
30080  CXXFLAGS="$saved_cxxflags"
30081
30082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
30083$as_echo "$supports" >&6; }
30084  if test "x$supports" = "xyes" ; then
30085    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
30086  else
30087    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
30088  fi
30089
30090
30091
30092
30093  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed in executable.'
30094  USING_BROKEN_SUSE_LD=no
30095  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$GCC" = xyes; then
30096    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
30097$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
30098    echo "SUNWprivate_1.1 { local: *; };" > version-script.map
30099    echo "int main() { }" > main.c
30100    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
30101      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30102$as_echo "no" >&6; }
30103      USING_BROKEN_SUSE_LD=no
30104    else
30105      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30106$as_echo "yes" >&6; }
30107      USING_BROKEN_SUSE_LD=yes
30108    fi
30109    rm -rf version-script.map main.c
30110  fi
30111
30112
30113
30114# Setup debug symbols (need objcopy from the toolchain for that)
30115
30116#
30117# ENABLE_DEBUG_SYMBOLS
30118# This must be done after the toolchain is setup, since we're looking at objcopy.
30119#
30120# Check whether --enable-debug-symbols was given.
30121if test "${enable_debug_symbols+set}" = set; then :
30122  enableval=$enable_debug_symbols;
30123fi
30124
30125
30126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
30127$as_echo_n "checking if we should generate debug symbols... " >&6; }
30128
30129if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
30130   # explicit enabling of enable-debug-symbols and can't find objcopy
30131   #   this is an error
30132   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
30133fi
30134
30135if test "x$enable_debug_symbols" = "xyes"; then
30136  ENABLE_DEBUG_SYMBOLS=true
30137elif test "x$enable_debug_symbols" = "xno"; then
30138  ENABLE_DEBUG_SYMBOLS=false
30139else
30140  # default on macosx is false
30141  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30142    ENABLE_DEBUG_SYMBOLS=false
30143  # Default is on if objcopy is found, otherwise off
30144  elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
30145    ENABLE_DEBUG_SYMBOLS=true
30146  else
30147    ENABLE_DEBUG_SYMBOLS=false
30148  fi
30149fi
30150
30151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
30152$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
30153
30154#
30155# ZIP_DEBUGINFO_FILES
30156#
30157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
30158$as_echo_n "checking if we should zip debug-info files... " >&6; }
30159# Check whether --enable-zip-debug-info was given.
30160if test "${enable_zip_debug_info+set}" = set; then :
30161  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
30162else
30163  enable_zip_debug_info="yes"
30164fi
30165
30166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
30167$as_echo "${enable_zip_debug_info}" >&6; }
30168
30169if test "x${enable_zip_debug_info}" = "xno"; then
30170   ZIP_DEBUGINFO_FILES=false
30171else
30172   ZIP_DEBUGINFO_FILES=true
30173fi
30174
30175
30176
30177
30178
30179
30180
30181###############################################################################
30182#
30183# Check dependencies for external and internal libraries.
30184#
30185###############################################################################
30186
30187
30188
30189###############################################################################
30190#
30191# OS specific settings that we never will need to probe.
30192#
30193if test "x$OPENJDK_TARGET_OS" = xlinux; then
30194    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
30195$as_echo_n "checking what is not needed on Linux?... " >&6; }
30196    PULSE_NOT_NEEDED=yes
30197    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
30198$as_echo "pulse" >&6; }
30199fi
30200
30201if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30202    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
30203$as_echo_n "checking what is not needed on Solaris?... " >&6; }
30204    ALSA_NOT_NEEDED=yes
30205    PULSE_NOT_NEEDED=yes
30206    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
30207$as_echo "alsa pulse" >&6; }
30208fi
30209
30210if test "x$OPENJDK_TARGET_OS" = xaix; then
30211    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
30212$as_echo_n "checking what is not needed on AIX?... " >&6; }
30213    ALSA_NOT_NEEDED=yes
30214    PULSE_NOT_NEEDED=yes
30215    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
30216$as_echo "alsa pulse" >&6; }
30217fi
30218
30219
30220if test "x$OPENJDK_TARGET_OS" = xwindows; then
30221    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
30222$as_echo_n "checking what is not needed on Windows?... " >&6; }
30223    CUPS_NOT_NEEDED=yes
30224    ALSA_NOT_NEEDED=yes
30225    PULSE_NOT_NEEDED=yes
30226    X11_NOT_NEEDED=yes
30227    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
30228$as_echo "alsa cups pulse x11" >&6; }
30229fi
30230
30231if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30232    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
30233$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
30234    ALSA_NOT_NEEDED=yes
30235    PULSE_NOT_NEEDED=yes
30236    X11_NOT_NEEDED=yes
30237    FREETYPE2_NOT_NEEDED=yes
30238    # If the java runtime framework is disabled, then we need X11.
30239    # This will be adjusted below.
30240    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
30241$as_echo "alsa pulse x11" >&6; }
30242fi
30243
30244if test "x$OPENJDK_TARGET_OS" = xbsd; then
30245    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
30246$as_echo_n "checking what is not needed on bsd?... " >&6; }
30247    ALSA_NOT_NEEDED=yes
30248    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
30249$as_echo "alsa" >&6; }
30250fi
30251
30252if test "x$OPENJDK" = "xfalse"; then
30253    FREETYPE2_NOT_NEEDED=yes
30254fi
30255
30256if test "x$SUPPORT_HEADFUL" = xno; then
30257    X11_NOT_NEEDED=yes
30258fi
30259
30260###############################################################################
30261#
30262# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
30263# that uses this API.
30264#
30265# Check whether --enable-macosx-runtime-support was given.
30266if test "${enable_macosx_runtime_support+set}" = set; then :
30267  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
30268else
30269  MACOSX_RUNTIME_SUPPORT="no"
30270fi
30271
30272
30273USE_MACOSX_RUNTIME_SUPPORT=no
30274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
30275$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
30276if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
30277    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
30278        MACOSX_RUNTIME_SUPPORT=yes
30279        USE_MACOSX_RUNTIME_SUPPORT=yes
30280        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
30281$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
30282    else
30283        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
30284$as_echo "yes, but explicitly disabled." >&6; }
30285    fi
30286else
30287    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30288$as_echo "no" >&6; }
30289fi
30290
30291if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
30292    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
30293$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
30294    X11_NOT_NEEDED=
30295    FREETYPE2_NOT_NEEDED=
30296    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
30297$as_echo "alsa pulse" >&6; }
30298fi
30299
30300
30301
30302###############################################################################
30303#
30304# Check for X Windows
30305#
30306
30307# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
30308# Make a simple check for the libraries at the sysroot, and setup --x-includes and
30309# --x-libraries for the sysroot, if that seems to be correct.
30310if test "x$SYS_ROOT" != "x/"; then
30311  if test "x$x_includes" = xNONE; then
30312    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
30313      x_includes="$SYS_ROOT/usr/X11R6/include"
30314    elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
30315      x_includes="$SYS_ROOT/usr/include"
30316    fi
30317  fi
30318  if test "x$x_libraries" = xNONE; then
30319    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
30320      x_libraries="$SYS_ROOT/usr/X11R6/lib"
30321    elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
30322      x_libraries="$SYS_ROOT/usr/lib64"
30323    elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
30324      x_libraries="$SYS_ROOT/usr/lib"
30325    fi
30326  fi
30327fi
30328
30329# Now let autoconf do it's magic
30330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
30331$as_echo_n "checking for X... " >&6; }
30332
30333
30334# Check whether --with-x was given.
30335if test "${with_x+set}" = set; then :
30336  withval=$with_x;
30337fi
30338
30339# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
30340if test "x$with_x" = xno; then
30341  # The user explicitly disabled X.
30342  have_x=disabled
30343else
30344  case $x_includes,$x_libraries in #(
30345    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
30346    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
30347  $as_echo_n "(cached) " >&6
30348else
30349  # One or both of the vars are not set, and there is no cached value.
30350ac_x_includes=no ac_x_libraries=no
30351rm -f -r conftest.dir
30352if mkdir conftest.dir; then
30353  cd conftest.dir
30354  cat >Imakefile <<'_ACEOF'
30355incroot:
30356	@echo incroot='${INCROOT}'
30357usrlibdir:
30358	@echo usrlibdir='${USRLIBDIR}'
30359libdir:
30360	@echo libdir='${LIBDIR}'
30361_ACEOF
30362  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
30363    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
30364    for ac_var in incroot usrlibdir libdir; do
30365      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
30366    done
30367    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
30368    for ac_extension in a so sl dylib la dll; do
30369      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
30370	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
30371	ac_im_usrlibdir=$ac_im_libdir; break
30372      fi
30373    done
30374    # Screen out bogus values from the imake configuration.  They are
30375    # bogus both because they are the default anyway, and because
30376    # using them would break gcc on systems where it needs fixed includes.
30377    case $ac_im_incroot in
30378	/usr/include) ac_x_includes= ;;
30379	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
30380    esac
30381    case $ac_im_usrlibdir in
30382	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
30383	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
30384    esac
30385  fi
30386  cd ..
30387  rm -f -r conftest.dir
30388fi
30389
30390# Standard set of common directories for X headers.
30391# Check X11 before X11Rn because it is often a symlink to the current release.
30392ac_x_header_dirs='
30393/usr/X11/include
30394/usr/X11R7/include
30395/usr/X11R6/include
30396/usr/X11R5/include
30397/usr/X11R4/include
30398
30399/usr/include/X11
30400/usr/include/X11R7
30401/usr/include/X11R6
30402/usr/include/X11R5
30403/usr/include/X11R4
30404
30405/usr/local/X11/include
30406/usr/local/X11R7/include
30407/usr/local/X11R6/include
30408/usr/local/X11R5/include
30409/usr/local/X11R4/include
30410
30411/usr/local/include/X11
30412/usr/local/include/X11R7
30413/usr/local/include/X11R6
30414/usr/local/include/X11R5
30415/usr/local/include/X11R4
30416
30417/usr/X386/include
30418/usr/x386/include
30419/usr/XFree86/include/X11
30420
30421/usr/include
30422/usr/local/include
30423/usr/unsupported/include
30424/usr/athena/include
30425/usr/local/x11r5/include
30426/usr/lpp/Xamples/include
30427
30428/usr/openwin/include
30429/usr/openwin/share/include'
30430
30431if test "$ac_x_includes" = no; then
30432  # Guess where to find include files, by looking for Xlib.h.
30433  # First, try using that file with no special directory specified.
30434  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30435/* end confdefs.h.  */
30436#include <X11/Xlib.h>
30437_ACEOF
30438if ac_fn_cxx_try_cpp "$LINENO"; then :
30439  # We can compile using X headers with no special include directory.
30440ac_x_includes=
30441else
30442  for ac_dir in $ac_x_header_dirs; do
30443  if test -r "$ac_dir/X11/Xlib.h"; then
30444    ac_x_includes=$ac_dir
30445    break
30446  fi
30447done
30448fi
30449rm -f conftest.err conftest.i conftest.$ac_ext
30450fi # $ac_x_includes = no
30451
30452if test "$ac_x_libraries" = no; then
30453  # Check for the libraries.
30454  # See if we find them without any special options.
30455  # Don't add to $LIBS permanently.
30456  ac_save_LIBS=$LIBS
30457  LIBS="-lX11 $LIBS"
30458  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30459/* end confdefs.h.  */
30460#include <X11/Xlib.h>
30461int
30462main ()
30463{
30464XrmInitialize ()
30465  ;
30466  return 0;
30467}
30468_ACEOF
30469if ac_fn_cxx_try_link "$LINENO"; then :
30470  LIBS=$ac_save_LIBS
30471# We can link X programs with no special library path.
30472ac_x_libraries=
30473else
30474  LIBS=$ac_save_LIBS
30475for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
30476do
30477  # Don't even attempt the hair of trying to link an X program!
30478  for ac_extension in a so sl dylib la dll; do
30479    if test -r "$ac_dir/libX11.$ac_extension"; then
30480      ac_x_libraries=$ac_dir
30481      break 2
30482    fi
30483  done
30484done
30485fi
30486rm -f core conftest.err conftest.$ac_objext \
30487    conftest$ac_exeext conftest.$ac_ext
30488fi # $ac_x_libraries = no
30489
30490case $ac_x_includes,$ac_x_libraries in #(
30491  no,* | *,no | *\'*)
30492    # Didn't find X, or a directory has "'" in its name.
30493    ac_cv_have_x="have_x=no";; #(
30494  *)
30495    # Record where we found X for the cache.
30496    ac_cv_have_x="have_x=yes\
30497	ac_x_includes='$ac_x_includes'\
30498	ac_x_libraries='$ac_x_libraries'"
30499esac
30500fi
30501;; #(
30502    *) have_x=yes;;
30503  esac
30504  eval "$ac_cv_have_x"
30505fi # $with_x != no
30506
30507if test "$have_x" != yes; then
30508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
30509$as_echo "$have_x" >&6; }
30510  no_x=yes
30511else
30512  # If each of the values was on the command line, it overrides each guess.
30513  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
30514  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
30515  # Update the cache value to reflect the command line values.
30516  ac_cv_have_x="have_x=yes\
30517	ac_x_includes='$x_includes'\
30518	ac_x_libraries='$x_libraries'"
30519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
30520$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
30521fi
30522
30523if test "$no_x" = yes; then
30524  # Not all programs may use this symbol, but it does not hurt to define it.
30525
30526$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
30527
30528  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
30529else
30530  if test -n "$x_includes"; then
30531    X_CFLAGS="$X_CFLAGS -I$x_includes"
30532  fi
30533
30534  # It would also be nice to do this for all -L options, not just this one.
30535  if test -n "$x_libraries"; then
30536    X_LIBS="$X_LIBS -L$x_libraries"
30537    # For Solaris; some versions of Sun CC require a space after -R and
30538    # others require no space.  Words are not sufficient . . . .
30539    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
30540$as_echo_n "checking whether -R must be followed by a space... " >&6; }
30541    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
30542    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
30543    ac_cxx_werror_flag=yes
30544    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30545/* end confdefs.h.  */
30546
30547int
30548main ()
30549{
30550
30551  ;
30552  return 0;
30553}
30554_ACEOF
30555if ac_fn_cxx_try_link "$LINENO"; then :
30556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30557$as_echo "no" >&6; }
30558       X_LIBS="$X_LIBS -R$x_libraries"
30559else
30560  LIBS="$ac_xsave_LIBS -R $x_libraries"
30561       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30562/* end confdefs.h.  */
30563
30564int
30565main ()
30566{
30567
30568  ;
30569  return 0;
30570}
30571_ACEOF
30572if ac_fn_cxx_try_link "$LINENO"; then :
30573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30574$as_echo "yes" >&6; }
30575	  X_LIBS="$X_LIBS -R $x_libraries"
30576else
30577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
30578$as_echo "neither works" >&6; }
30579fi
30580rm -f core conftest.err conftest.$ac_objext \
30581    conftest$ac_exeext conftest.$ac_ext
30582fi
30583rm -f core conftest.err conftest.$ac_objext \
30584    conftest$ac_exeext conftest.$ac_ext
30585    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
30586    LIBS=$ac_xsave_LIBS
30587  fi
30588
30589  # Check for system-dependent libraries X programs must link with.
30590  # Do this before checking for the system-independent R6 libraries
30591  # (-lICE), since we may need -lsocket or whatever for X linking.
30592
30593  if test "$ISC" = yes; then
30594    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
30595  else
30596    # Martyn Johnson says this is needed for Ultrix, if the X
30597    # libraries were built with DECnet support.  And Karl Berry says
30598    # the Alpha needs dnet_stub (dnet does not exist).
30599    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
30600    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30601/* end confdefs.h.  */
30602
30603/* Override any GCC internal prototype to avoid an error.
30604   Use char because int might match the return type of a GCC
30605   builtin and then its argument prototype would still apply.  */
30606#ifdef __cplusplus
30607extern "C"
30608#endif
30609char XOpenDisplay ();
30610int
30611main ()
30612{
30613return XOpenDisplay ();
30614  ;
30615  return 0;
30616}
30617_ACEOF
30618if ac_fn_cxx_try_link "$LINENO"; then :
30619
30620else
30621  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
30622$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
30623if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
30624  $as_echo_n "(cached) " >&6
30625else
30626  ac_check_lib_save_LIBS=$LIBS
30627LIBS="-ldnet  $LIBS"
30628cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30629/* end confdefs.h.  */
30630
30631/* Override any GCC internal prototype to avoid an error.
30632   Use char because int might match the return type of a GCC
30633   builtin and then its argument prototype would still apply.  */
30634#ifdef __cplusplus
30635extern "C"
30636#endif
30637char dnet_ntoa ();
30638int
30639main ()
30640{
30641return dnet_ntoa ();
30642  ;
30643  return 0;
30644}
30645_ACEOF
30646if ac_fn_cxx_try_link "$LINENO"; then :
30647  ac_cv_lib_dnet_dnet_ntoa=yes
30648else
30649  ac_cv_lib_dnet_dnet_ntoa=no
30650fi
30651rm -f core conftest.err conftest.$ac_objext \
30652    conftest$ac_exeext conftest.$ac_ext
30653LIBS=$ac_check_lib_save_LIBS
30654fi
30655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
30656$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
30657if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
30658  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
30659fi
30660
30661    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
30662      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
30663$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
30664if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
30665  $as_echo_n "(cached) " >&6
30666else
30667  ac_check_lib_save_LIBS=$LIBS
30668LIBS="-ldnet_stub  $LIBS"
30669cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30670/* end confdefs.h.  */
30671
30672/* Override any GCC internal prototype to avoid an error.
30673   Use char because int might match the return type of a GCC
30674   builtin and then its argument prototype would still apply.  */
30675#ifdef __cplusplus
30676extern "C"
30677#endif
30678char dnet_ntoa ();
30679int
30680main ()
30681{
30682return dnet_ntoa ();
30683  ;
30684  return 0;
30685}
30686_ACEOF
30687if ac_fn_cxx_try_link "$LINENO"; then :
30688  ac_cv_lib_dnet_stub_dnet_ntoa=yes
30689else
30690  ac_cv_lib_dnet_stub_dnet_ntoa=no
30691fi
30692rm -f core conftest.err conftest.$ac_objext \
30693    conftest$ac_exeext conftest.$ac_ext
30694LIBS=$ac_check_lib_save_LIBS
30695fi
30696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
30697$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
30698if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
30699  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
30700fi
30701
30702    fi
30703fi
30704rm -f core conftest.err conftest.$ac_objext \
30705    conftest$ac_exeext conftest.$ac_ext
30706    LIBS="$ac_xsave_LIBS"
30707
30708    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
30709    # to get the SysV transport functions.
30710    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
30711    # needs -lnsl.
30712    # The nsl library prevents programs from opening the X display
30713    # on Irix 5.2, according to T.E. Dickey.
30714    # The functions gethostbyname, getservbyname, and inet_addr are
30715    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
30716    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
30717if test "x$ac_cv_func_gethostbyname" = xyes; then :
30718
30719fi
30720
30721    if test $ac_cv_func_gethostbyname = no; then
30722      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
30723$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
30724if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
30725  $as_echo_n "(cached) " >&6
30726else
30727  ac_check_lib_save_LIBS=$LIBS
30728LIBS="-lnsl  $LIBS"
30729cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30730/* end confdefs.h.  */
30731
30732/* Override any GCC internal prototype to avoid an error.
30733   Use char because int might match the return type of a GCC
30734   builtin and then its argument prototype would still apply.  */
30735#ifdef __cplusplus
30736extern "C"
30737#endif
30738char gethostbyname ();
30739int
30740main ()
30741{
30742return gethostbyname ();
30743  ;
30744  return 0;
30745}
30746_ACEOF
30747if ac_fn_cxx_try_link "$LINENO"; then :
30748  ac_cv_lib_nsl_gethostbyname=yes
30749else
30750  ac_cv_lib_nsl_gethostbyname=no
30751fi
30752rm -f core conftest.err conftest.$ac_objext \
30753    conftest$ac_exeext conftest.$ac_ext
30754LIBS=$ac_check_lib_save_LIBS
30755fi
30756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
30757$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
30758if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
30759  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
30760fi
30761
30762      if test $ac_cv_lib_nsl_gethostbyname = no; then
30763	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
30764$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
30765if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
30766  $as_echo_n "(cached) " >&6
30767else
30768  ac_check_lib_save_LIBS=$LIBS
30769LIBS="-lbsd  $LIBS"
30770cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30771/* end confdefs.h.  */
30772
30773/* Override any GCC internal prototype to avoid an error.
30774   Use char because int might match the return type of a GCC
30775   builtin and then its argument prototype would still apply.  */
30776#ifdef __cplusplus
30777extern "C"
30778#endif
30779char gethostbyname ();
30780int
30781main ()
30782{
30783return gethostbyname ();
30784  ;
30785  return 0;
30786}
30787_ACEOF
30788if ac_fn_cxx_try_link "$LINENO"; then :
30789  ac_cv_lib_bsd_gethostbyname=yes
30790else
30791  ac_cv_lib_bsd_gethostbyname=no
30792fi
30793rm -f core conftest.err conftest.$ac_objext \
30794    conftest$ac_exeext conftest.$ac_ext
30795LIBS=$ac_check_lib_save_LIBS
30796fi
30797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
30798$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
30799if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
30800  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
30801fi
30802
30803      fi
30804    fi
30805
30806    # lieder@skyler.mavd.honeywell.com says without -lsocket,
30807    # socket/setsockopt and other routines are undefined under SCO ODT
30808    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
30809    # on later versions), says Simon Leinen: it contains gethostby*
30810    # variants that don't use the name server (or something).  -lsocket
30811    # must be given before -lnsl if both are needed.  We assume that
30812    # if connect needs -lnsl, so does gethostbyname.
30813    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
30814if test "x$ac_cv_func_connect" = xyes; then :
30815
30816fi
30817
30818    if test $ac_cv_func_connect = no; then
30819      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
30820$as_echo_n "checking for connect in -lsocket... " >&6; }
30821if ${ac_cv_lib_socket_connect+:} false; then :
30822  $as_echo_n "(cached) " >&6
30823else
30824  ac_check_lib_save_LIBS=$LIBS
30825LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
30826cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30827/* end confdefs.h.  */
30828
30829/* Override any GCC internal prototype to avoid an error.
30830   Use char because int might match the return type of a GCC
30831   builtin and then its argument prototype would still apply.  */
30832#ifdef __cplusplus
30833extern "C"
30834#endif
30835char connect ();
30836int
30837main ()
30838{
30839return connect ();
30840  ;
30841  return 0;
30842}
30843_ACEOF
30844if ac_fn_cxx_try_link "$LINENO"; then :
30845  ac_cv_lib_socket_connect=yes
30846else
30847  ac_cv_lib_socket_connect=no
30848fi
30849rm -f core conftest.err conftest.$ac_objext \
30850    conftest$ac_exeext conftest.$ac_ext
30851LIBS=$ac_check_lib_save_LIBS
30852fi
30853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
30854$as_echo "$ac_cv_lib_socket_connect" >&6; }
30855if test "x$ac_cv_lib_socket_connect" = xyes; then :
30856  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
30857fi
30858
30859    fi
30860
30861    # Guillermo Gomez says -lposix is necessary on A/UX.
30862    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
30863if test "x$ac_cv_func_remove" = xyes; then :
30864
30865fi
30866
30867    if test $ac_cv_func_remove = no; then
30868      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
30869$as_echo_n "checking for remove in -lposix... " >&6; }
30870if ${ac_cv_lib_posix_remove+:} false; then :
30871  $as_echo_n "(cached) " >&6
30872else
30873  ac_check_lib_save_LIBS=$LIBS
30874LIBS="-lposix  $LIBS"
30875cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30876/* end confdefs.h.  */
30877
30878/* Override any GCC internal prototype to avoid an error.
30879   Use char because int might match the return type of a GCC
30880   builtin and then its argument prototype would still apply.  */
30881#ifdef __cplusplus
30882extern "C"
30883#endif
30884char remove ();
30885int
30886main ()
30887{
30888return remove ();
30889  ;
30890  return 0;
30891}
30892_ACEOF
30893if ac_fn_cxx_try_link "$LINENO"; then :
30894  ac_cv_lib_posix_remove=yes
30895else
30896  ac_cv_lib_posix_remove=no
30897fi
30898rm -f core conftest.err conftest.$ac_objext \
30899    conftest$ac_exeext conftest.$ac_ext
30900LIBS=$ac_check_lib_save_LIBS
30901fi
30902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
30903$as_echo "$ac_cv_lib_posix_remove" >&6; }
30904if test "x$ac_cv_lib_posix_remove" = xyes; then :
30905  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
30906fi
30907
30908    fi
30909
30910    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
30911    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
30912if test "x$ac_cv_func_shmat" = xyes; then :
30913
30914fi
30915
30916    if test $ac_cv_func_shmat = no; then
30917      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
30918$as_echo_n "checking for shmat in -lipc... " >&6; }
30919if ${ac_cv_lib_ipc_shmat+:} false; then :
30920  $as_echo_n "(cached) " >&6
30921else
30922  ac_check_lib_save_LIBS=$LIBS
30923LIBS="-lipc  $LIBS"
30924cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30925/* end confdefs.h.  */
30926
30927/* Override any GCC internal prototype to avoid an error.
30928   Use char because int might match the return type of a GCC
30929   builtin and then its argument prototype would still apply.  */
30930#ifdef __cplusplus
30931extern "C"
30932#endif
30933char shmat ();
30934int
30935main ()
30936{
30937return shmat ();
30938  ;
30939  return 0;
30940}
30941_ACEOF
30942if ac_fn_cxx_try_link "$LINENO"; then :
30943  ac_cv_lib_ipc_shmat=yes
30944else
30945  ac_cv_lib_ipc_shmat=no
30946fi
30947rm -f core conftest.err conftest.$ac_objext \
30948    conftest$ac_exeext conftest.$ac_ext
30949LIBS=$ac_check_lib_save_LIBS
30950fi
30951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
30952$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
30953if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
30954  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
30955fi
30956
30957    fi
30958  fi
30959
30960  # Check for libraries that X11R6 Xt/Xaw programs need.
30961  ac_save_LDFLAGS=$LDFLAGS
30962  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
30963  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
30964  # check for ICE first), but we must link in the order -lSM -lICE or
30965  # we get undefined symbols.  So assume we have SM if we have ICE.
30966  # These have to be linked with before -lX11, unlike the other
30967  # libraries we check for below, so use a different variable.
30968  # John Interrante, Karl Berry
30969  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
30970$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
30971if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
30972  $as_echo_n "(cached) " >&6
30973else
30974  ac_check_lib_save_LIBS=$LIBS
30975LIBS="-lICE $X_EXTRA_LIBS $LIBS"
30976cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30977/* end confdefs.h.  */
30978
30979/* Override any GCC internal prototype to avoid an error.
30980   Use char because int might match the return type of a GCC
30981   builtin and then its argument prototype would still apply.  */
30982#ifdef __cplusplus
30983extern "C"
30984#endif
30985char IceConnectionNumber ();
30986int
30987main ()
30988{
30989return IceConnectionNumber ();
30990  ;
30991  return 0;
30992}
30993_ACEOF
30994if ac_fn_cxx_try_link "$LINENO"; then :
30995  ac_cv_lib_ICE_IceConnectionNumber=yes
30996else
30997  ac_cv_lib_ICE_IceConnectionNumber=no
30998fi
30999rm -f core conftest.err conftest.$ac_objext \
31000    conftest$ac_exeext conftest.$ac_ext
31001LIBS=$ac_check_lib_save_LIBS
31002fi
31003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
31004$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
31005if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
31006  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
31007fi
31008
31009  LDFLAGS=$ac_save_LDFLAGS
31010
31011fi
31012
31013
31014# AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
31015# this doesn't make sense so we remove it.
31016if test "x$COMPILE_TYPE" = xcross; then
31017  X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
31018fi
31019
31020if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
31021
31022    # Print a helpful message on how to acquire the necessary build dependency.
31023    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
31024    MISSING_DEPENDENCY=x11
31025    PKGHANDLER_COMMAND=
31026
31027    case $PKGHANDLER in
31028	apt-get)
31029                apt_help     $MISSING_DEPENDENCY ;;
31030	yum)
31031                yum_help     $MISSING_DEPENDENCY ;;
31032	port)
31033                port_help    $MISSING_DEPENDENCY ;;
31034	pkgutil)
31035                pkgutil_help $MISSING_DEPENDENCY ;;
31036	pkgadd)
31037                pkgadd_help  $MISSING_DEPENDENCY ;;
31038    esac
31039
31040    if test "x$PKGHANDLER_COMMAND" != x; then
31041        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31042    fi
31043
31044    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
31045fi
31046
31047# Some of the old makefiles require a setting of OPENWIN_HOME
31048# Since the X11R6 directory has disappeared on later Linuxes,
31049# we need to probe for it.
31050if test "x$OPENJDK_TARGET_OS" = xlinux; then
31051    if test -d "$SYS_ROOT/usr/X11R6"; then
31052        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
31053    elif test -d "$SYS_ROOT/usr/include/X11"; then
31054        OPENWIN_HOME="$SYS_ROOT/usr"
31055    fi
31056fi
31057if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31058    OPENWIN_HOME="/usr/openwin"
31059fi
31060
31061
31062
31063#
31064# Weird Sol10 something check...TODO change to try compile
31065#
31066if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
31067  if test "`uname -r`" = "5.10"; then
31068     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
31069     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
31070     fi
31071  fi
31072fi
31073
31074ac_ext=c
31075ac_cpp='$CPP $CPPFLAGS'
31076ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31077ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31078ac_compiler_gnu=$ac_cv_c_compiler_gnu
31079
31080OLD_CFLAGS="$CFLAGS"
31081CFLAGS="$CFLAGS $X_CFLAGS"
31082
31083# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
31084for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
31085do :
31086  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
31087ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
31088                   # include <X11/Xutil.h>
31089
31090"
31091if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
31092  cat >>confdefs.h <<_ACEOF
31093#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
31094_ACEOF
31095 X11_A_OK=yes
31096else
31097  X11_A_OK=no; break
31098fi
31099
31100done
31101
31102
31103CFLAGS="$OLD_CFLAGS"
31104ac_ext=cpp
31105ac_cpp='$CXXCPP $CPPFLAGS'
31106ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31107ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31108ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31109
31110
31111if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
31112
31113    # Print a helpful message on how to acquire the necessary build dependency.
31114    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
31115    MISSING_DEPENDENCY=x11
31116    PKGHANDLER_COMMAND=
31117
31118    case $PKGHANDLER in
31119	apt-get)
31120                apt_help     $MISSING_DEPENDENCY ;;
31121	yum)
31122                yum_help     $MISSING_DEPENDENCY ;;
31123	port)
31124                port_help    $MISSING_DEPENDENCY ;;
31125	pkgutil)
31126                pkgutil_help $MISSING_DEPENDENCY ;;
31127	pkgadd)
31128                pkgadd_help  $MISSING_DEPENDENCY ;;
31129    esac
31130
31131    if test "x$PKGHANDLER_COMMAND" != x; then
31132        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31133    fi
31134
31135    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
31136fi
31137
31138
31139
31140
31141
31142
31143###############################################################################
31144#
31145# The common unix printing system cups is used to print from java.
31146#
31147
31148# Check whether --with-cups was given.
31149if test "${with_cups+set}" = set; then :
31150  withval=$with_cups;
31151fi
31152
31153
31154# Check whether --with-cups-include was given.
31155if test "${with_cups_include+set}" = set; then :
31156  withval=$with_cups_include;
31157fi
31158
31159
31160if test "x$CUPS_NOT_NEEDED" = xyes; then
31161	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
31162		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
31163$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
31164	fi
31165	CUPS_CFLAGS=
31166else
31167	CUPS_FOUND=no
31168
31169	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
31170	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
31171	fi
31172
31173	if test "x${with_cups}" != x; then
31174	    CUPS_CFLAGS="-I${with_cups}/include"
31175	    CUPS_FOUND=yes
31176	fi
31177	if test "x${with_cups_include}" != x; then
31178	    CUPS_CFLAGS="-I${with_cups_include}"
31179	    CUPS_FOUND=yes
31180	fi
31181	if test "x$CUPS_FOUND" = xno; then
31182
31183
31184    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31185        # Source the builddeps file again, to make sure it uses the latest variables!
31186        . $builddepsfile
31187        # Look for a target and build machine specific resource!
31188        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31189        if test "x$resource" = x; then
31190            # Ok, lets instead look for a target specific resource
31191            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
31192        fi
31193        if test "x$resource" = x; then
31194            # Ok, lets instead look for a build specific resource
31195            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
31196        fi
31197        if test "x$resource" = x; then
31198            # Ok, lets instead look for a generic resource
31199            # (The cups comes from M4 and not the shell, thus no need for eval here.)
31200            resource=${builddep_cups}
31201        fi
31202        if test "x$resource" != x; then
31203            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
31204$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
31205	    # If the resource in the builddeps.conf file is an existing directory,
31206	    # for example /java/linux/cups
31207	    if test -d ${resource}; then
31208	       depdir=${resource}
31209	    else
31210
31211# cups is for example mymodule
31212# $resource is for example libs/general/libmymod_1_2_3.zip
31213# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31214# $with_builddeps_dir is for example /localhome/builddeps
31215# depdir is the name of the variable into which we store the depdir, eg MYMOD
31216# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31217# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31218    filename=`basename $resource`
31219    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31220    filebase=${filename%%.*}
31221    extension=${filename#*.}
31222    installdir=$with_builddeps_dir/$filebase
31223    if test ! -f $installdir/$filename.unpacked; then
31224        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
31225$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31226        if test ! -d $installdir; then
31227            mkdir -p $installdir
31228        fi
31229        if test ! -d $installdir; then
31230            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31231        fi
31232        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
31233        touch $tmpfile
31234        if test ! -f $tmpfile; then
31235            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31236        fi
31237
31238    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31239    # $tmpfile is the local file name for the downloaded file.
31240    VALID_TOOL=no
31241    if test "x$BDEPS_FTP" = xwget; then
31242       VALID_TOOL=yes
31243       wget -O $tmpfile $with_builddeps_server/$resource
31244    fi
31245    if test "x$BDEPS_FTP" = xlftp; then
31246       VALID_TOOL=yes
31247       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31248    fi
31249    if test "x$BDEPS_FTP" = xftp; then
31250        VALID_TOOL=yes
31251        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31252        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31253        FTPUSERPWD=${FTPSERVER%%@*}
31254        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31255            FTPUSER=${userpwd%%:*}
31256            FTPPWD=${userpwd#*@}
31257            FTPSERVER=${FTPSERVER#*@}
31258        else
31259            FTPUSER=ftp
31260            FTPPWD=ftp
31261        fi
31262        # the "pass" command does not work on some
31263        # ftp clients (read ftp.exe) but if it works,
31264        # passive mode is better!
31265        (\
31266            echo "user $FTPUSER $FTPPWD"        ;\
31267            echo "pass"                         ;\
31268            echo "bin"                          ;\
31269            echo "get $FTPPATH $tmpfile"              ;\
31270        ) | ftp -in $FTPSERVER
31271    fi
31272    if test "x$VALID_TOOL" != xyes; then
31273       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31274    fi
31275
31276        mv $tmpfile $installdir/$filename
31277        if test ! -s $installdir/$filename; then
31278            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31279        fi
31280        case "$extension" in
31281            zip)  echo "Unzipping $installdir/$filename..."
31282               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31283            ;;
31284            tar.gz) echo "Untaring $installdir/$filename..."
31285               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31286            ;;
31287            tgz) echo "Untaring $installdir/$filename..."
31288               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31289            ;;
31290            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31291            ;;
31292        esac
31293    fi
31294    if test -f $installdir/$filename.unpacked; then
31295        depdir=$installdir
31296    fi
31297
31298	    fi
31299            # Source the builddeps file again, because in the previous command, the depdir
31300            # was updated to point at the current build dependency install directory.
31301            . $builddepsfile
31302            # Now extract variables from the builddeps.conf files.
31303            theroot=${builddep_cups_ROOT}
31304            thecflags=${builddep_cups_CFLAGS}
31305            thelibs=${builddep_cups_LIBS}
31306            if test "x$depdir" = x; then
31307                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
31308            fi
31309            CUPS=$depdir
31310            if test "x$theroot" != x; then
31311               CUPS="$theroot"
31312            fi
31313            if test "x$thecflags" != x; then
31314               CUPS_CFLAGS="$thecflags"
31315            fi
31316            if test "x$thelibs" != x; then
31317               CUPS_LIBS="$thelibs"
31318            fi
31319            CUPS_FOUND=yes
31320
31321        fi
31322
31323    fi
31324
31325	fi
31326	if test "x$CUPS_FOUND" = xno; then
31327	    # Are the cups headers installed in the default /usr/include location?
31328	    for ac_header in cups/cups.h cups/ppd.h
31329do :
31330  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
31331ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
31332if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
31333  cat >>confdefs.h <<_ACEOF
31334#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
31335_ACEOF
31336 CUPS_FOUND=yes
31337	                      CUPS_CFLAGS=
31338	                      DEFAULT_CUPS=yes
31339fi
31340
31341done
31342
31343	fi
31344	if test "x$CUPS_FOUND" = xno; then
31345	    # Getting nervous now? Lets poke around for standard Solaris third-party
31346	    # package installation locations.
31347	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
31348$as_echo_n "checking for cups headers... " >&6; }
31349	    if test -s /opt/sfw/cups/include/cups/cups.h; then
31350	       # An SFW package seems to be installed!
31351	       CUPS_FOUND=yes
31352	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
31353	    elif test -s /opt/csw/include/cups/cups.h; then
31354	       # A CSW package seems to be installed!
31355	       CUPS_FOUND=yes
31356	       CUPS_CFLAGS="-I/opt/csw/include"
31357	    fi
31358	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
31359$as_echo "$CUPS_FOUND" >&6; }
31360	fi
31361	if test "x$CUPS_FOUND" = xno; then
31362
31363    # Print a helpful message on how to acquire the necessary build dependency.
31364    # cups is the help tag: freetyp2, cups, pulse, alsa etc
31365    MISSING_DEPENDENCY=cups
31366    PKGHANDLER_COMMAND=
31367
31368    case $PKGHANDLER in
31369	apt-get)
31370                apt_help     $MISSING_DEPENDENCY ;;
31371	yum)
31372                yum_help     $MISSING_DEPENDENCY ;;
31373	port)
31374                port_help    $MISSING_DEPENDENCY ;;
31375	pkgutil)
31376                pkgutil_help $MISSING_DEPENDENCY ;;
31377	pkgadd)
31378                pkgadd_help  $MISSING_DEPENDENCY ;;
31379    esac
31380
31381    if test "x$PKGHANDLER_COMMAND" != x; then
31382        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31383    fi
31384
31385	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
31386	fi
31387fi
31388
31389
31390
31391
31392
31393
31394###############################################################################
31395#
31396# The ubiquitous freetype2 library is used to render fonts.
31397#
31398
31399# Check whether --with-freetype was given.
31400if test "${with_freetype+set}" = set; then :
31401  withval=$with_freetype;
31402fi
31403
31404
31405# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
31406USING_SYSTEM_FT_LIB=false
31407
31408if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
31409	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
31410		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
31411$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
31412	fi
31413	FREETYPE2_CFLAGS=
31414	FREETYPE2_LIBS=
31415        FREETYPE2_LIB_PATH=
31416else
31417	FREETYPE2_FOUND=no
31418
31419	if test "x$with_freetype" != x; then
31420
31421  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31422
31423  # Input might be given as Windows format, start by converting to
31424  # unix format.
31425  path="$with_freetype"
31426  new_path=`$CYGPATH -u "$path"`
31427
31428  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31429  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31430  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31431  # "foo.exe" is OK but "foo" is an error.
31432  #
31433  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31434  # It is also a way to make sure we got the proper file name for the real test later on.
31435  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31436  if test "x$test_shortpath" = x; then
31437    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
31438$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
31439    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
31440  fi
31441
31442  # Call helper function which possibly converts this using DOS-style short mode.
31443  # If so, the updated path is stored in $new_path.
31444
31445  input_path="$new_path"
31446  # Check if we need to convert this using DOS-style short mode. If the path
31447  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31448  # take no chances and rewrite it.
31449  # Note: m4 eats our [], so we need to use [ and ] instead.
31450  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31451  if test "x$has_forbidden_chars" != x; then
31452    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31453    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31454    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31455    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31456      # Going to short mode and back again did indeed matter. Since short mode is
31457      # case insensitive, let's make it lowercase to improve readability.
31458      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31459      # Now convert it back to Unix-stile (cygpath)
31460      input_path=`$CYGPATH -u "$shortmode_path"`
31461      new_path="$input_path"
31462    fi
31463  fi
31464
31465  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31466  if test "x$test_cygdrive_prefix" = x; then
31467    # As a simple fix, exclude /usr/bin since it's not a real path.
31468    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31469      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31470      # a path prefixed by /cygdrive for fixpath to work.
31471      new_path="$CYGWIN_ROOT_PATH$input_path"
31472    fi
31473  fi
31474
31475
31476  if test "x$path" != "x$new_path"; then
31477    with_freetype="$new_path"
31478    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
31479$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
31480  fi
31481
31482  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31483
31484  path="$with_freetype"
31485  has_colon=`$ECHO $path | $GREP ^.:`
31486  new_path="$path"
31487  if test "x$has_colon" = x; then
31488    # Not in mixed or Windows style, start by that.
31489    new_path=`cmd //c echo $path`
31490  fi
31491
31492
31493  input_path="$new_path"
31494  # Check if we need to convert this using DOS-style short mode. If the path
31495  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31496  # take no chances and rewrite it.
31497  # Note: m4 eats our [], so we need to use [ and ] instead.
31498  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31499  if test "x$has_forbidden_chars" != x; then
31500    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31501    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31502  fi
31503
31504
31505  windows_path="$new_path"
31506  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31507    unix_path=`$CYGPATH -u "$windows_path"`
31508    new_path="$unix_path"
31509  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31510    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31511    new_path="$unix_path"
31512  fi
31513
31514  if test "x$path" != "x$new_path"; then
31515    with_freetype="$new_path"
31516    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
31517$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
31518  fi
31519
31520  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31521  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31522
31523  else
31524    # We're on a posix platform. Hooray! :)
31525    path="$with_freetype"
31526    has_space=`$ECHO "$path" | $GREP " "`
31527    if test "x$has_space" != x; then
31528      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
31529$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
31530      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31531    fi
31532
31533    # Use eval to expand a potential ~
31534    eval path="$path"
31535    if test ! -f "$path" && test ! -d "$path"; then
31536      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
31537    fi
31538
31539    with_freetype="`cd "$path"; $THEPWDCMD -L`"
31540  fi
31541
31542	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
31543            FREETYPE2_LIB_PATH="$with_freetype/lib"
31544            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
31545                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
31546                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
31547            fi
31548            if test "x$OPENJDK_TARGET_OS" = xwindows; then
31549                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
31550            fi
31551	    FREETYPE2_CFLAGS="-I$with_freetype/include"
31552            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
31553                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
31554            fi
31555 	    FREETYPE2_FOUND=yes
31556   	    if test "x$FREETYPE2_FOUND" = xyes; then
31557	        # Verify that the directories exist
31558                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
31559		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
31560		fi
31561	        # List the contents of the lib.
31562		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
31563                if test "x$FREETYPELIB" = x; then
31564		   as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
31565		fi
31566	        # Check one h-file
31567                if ! test -s "$with_freetype/include/ft2build.h"; then
31568		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
31569		fi
31570            fi
31571        fi
31572	if test "x$FREETYPE2_FOUND" = xno; then
31573
31574
31575    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31576        # Source the builddeps file again, to make sure it uses the latest variables!
31577        . $builddepsfile
31578        # Look for a target and build machine specific resource!
31579        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31580        if test "x$resource" = x; then
31581            # Ok, lets instead look for a target specific resource
31582            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
31583        fi
31584        if test "x$resource" = x; then
31585            # Ok, lets instead look for a build specific resource
31586            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
31587        fi
31588        if test "x$resource" = x; then
31589            # Ok, lets instead look for a generic resource
31590            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
31591            resource=${builddep_freetype2}
31592        fi
31593        if test "x$resource" != x; then
31594            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
31595$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
31596	    # If the resource in the builddeps.conf file is an existing directory,
31597	    # for example /java/linux/cups
31598	    if test -d ${resource}; then
31599	       depdir=${resource}
31600	    else
31601
31602# freetype2 is for example mymodule
31603# $resource is for example libs/general/libmymod_1_2_3.zip
31604# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31605# $with_builddeps_dir is for example /localhome/builddeps
31606# depdir is the name of the variable into which we store the depdir, eg MYMOD
31607# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31608# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31609    filename=`basename $resource`
31610    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31611    filebase=${filename%%.*}
31612    extension=${filename#*.}
31613    installdir=$with_builddeps_dir/$filebase
31614    if test ! -f $installdir/$filename.unpacked; then
31615        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
31616$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31617        if test ! -d $installdir; then
31618            mkdir -p $installdir
31619        fi
31620        if test ! -d $installdir; then
31621            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31622        fi
31623        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
31624        touch $tmpfile
31625        if test ! -f $tmpfile; then
31626            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31627        fi
31628
31629    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31630    # $tmpfile is the local file name for the downloaded file.
31631    VALID_TOOL=no
31632    if test "x$BDEPS_FTP" = xwget; then
31633       VALID_TOOL=yes
31634       wget -O $tmpfile $with_builddeps_server/$resource
31635    fi
31636    if test "x$BDEPS_FTP" = xlftp; then
31637       VALID_TOOL=yes
31638       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31639    fi
31640    if test "x$BDEPS_FTP" = xftp; then
31641        VALID_TOOL=yes
31642        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31643        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31644        FTPUSERPWD=${FTPSERVER%%@*}
31645        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31646            FTPUSER=${userpwd%%:*}
31647            FTPPWD=${userpwd#*@}
31648            FTPSERVER=${FTPSERVER#*@}
31649        else
31650            FTPUSER=ftp
31651            FTPPWD=ftp
31652        fi
31653        # the "pass" command does not work on some
31654        # ftp clients (read ftp.exe) but if it works,
31655        # passive mode is better!
31656        (\
31657            echo "user $FTPUSER $FTPPWD"        ;\
31658            echo "pass"                         ;\
31659            echo "bin"                          ;\
31660            echo "get $FTPPATH $tmpfile"              ;\
31661        ) | ftp -in $FTPSERVER
31662    fi
31663    if test "x$VALID_TOOL" != xyes; then
31664       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31665    fi
31666
31667        mv $tmpfile $installdir/$filename
31668        if test ! -s $installdir/$filename; then
31669            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31670        fi
31671        case "$extension" in
31672            zip)  echo "Unzipping $installdir/$filename..."
31673               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31674            ;;
31675            tar.gz) echo "Untaring $installdir/$filename..."
31676               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31677            ;;
31678            tgz) echo "Untaring $installdir/$filename..."
31679               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31680            ;;
31681            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31682            ;;
31683        esac
31684    fi
31685    if test -f $installdir/$filename.unpacked; then
31686        depdir=$installdir
31687    fi
31688
31689	    fi
31690            # Source the builddeps file again, because in the previous command, the depdir
31691            # was updated to point at the current build dependency install directory.
31692            . $builddepsfile
31693            # Now extract variables from the builddeps.conf files.
31694            theroot=${builddep_freetype2_ROOT}
31695            thecflags=${builddep_freetype2_CFLAGS}
31696            thelibs=${builddep_freetype2_LIBS}
31697            if test "x$depdir" = x; then
31698                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
31699            fi
31700            FREETYPE2=$depdir
31701            if test "x$theroot" != x; then
31702               FREETYPE2="$theroot"
31703            fi
31704            if test "x$thecflags" != x; then
31705               FREETYPE2_CFLAGS="$thecflags"
31706            fi
31707            if test "x$thelibs" != x; then
31708               FREETYPE2_LIBS="$thelibs"
31709            fi
31710            FREETYPE2_FOUND=yes
31711            else FREETYPE2_FOUND=no
31712
31713        fi
31714        else FREETYPE2_FOUND=no
31715
31716    fi
31717
31718            USING_SYSTEM_FT_LIB=true
31719	fi
31720	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
31721            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
31722
31723  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31724
31725  # Input might be given as Windows format, start by converting to
31726  # unix format.
31727  path="$FREETYPELOCATION"
31728  new_path=`$CYGPATH -u "$path"`
31729
31730  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31731  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31732  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31733  # "foo.exe" is OK but "foo" is an error.
31734  #
31735  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31736  # It is also a way to make sure we got the proper file name for the real test later on.
31737  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31738  if test "x$test_shortpath" = x; then
31739    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31740$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31741    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
31742  fi
31743
31744  # Call helper function which possibly converts this using DOS-style short mode.
31745  # If so, the updated path is stored in $new_path.
31746
31747  input_path="$new_path"
31748  # Check if we need to convert this using DOS-style short mode. If the path
31749  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31750  # take no chances and rewrite it.
31751  # Note: m4 eats our [], so we need to use [ and ] instead.
31752  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31753  if test "x$has_forbidden_chars" != x; then
31754    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31755    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31756    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31757    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31758      # Going to short mode and back again did indeed matter. Since short mode is
31759      # case insensitive, let's make it lowercase to improve readability.
31760      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31761      # Now convert it back to Unix-stile (cygpath)
31762      input_path=`$CYGPATH -u "$shortmode_path"`
31763      new_path="$input_path"
31764    fi
31765  fi
31766
31767  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31768  if test "x$test_cygdrive_prefix" = x; then
31769    # As a simple fix, exclude /usr/bin since it's not a real path.
31770    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31771      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31772      # a path prefixed by /cygdrive for fixpath to work.
31773      new_path="$CYGWIN_ROOT_PATH$input_path"
31774    fi
31775  fi
31776
31777
31778  if test "x$path" != "x$new_path"; then
31779    FREETYPELOCATION="$new_path"
31780    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31781$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31782  fi
31783
31784  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31785
31786  path="$FREETYPELOCATION"
31787  has_colon=`$ECHO $path | $GREP ^.:`
31788  new_path="$path"
31789  if test "x$has_colon" = x; then
31790    # Not in mixed or Windows style, start by that.
31791    new_path=`cmd //c echo $path`
31792  fi
31793
31794
31795  input_path="$new_path"
31796  # Check if we need to convert this using DOS-style short mode. If the path
31797  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31798  # take no chances and rewrite it.
31799  # Note: m4 eats our [], so we need to use [ and ] instead.
31800  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31801  if test "x$has_forbidden_chars" != x; then
31802    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31803    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31804  fi
31805
31806
31807  windows_path="$new_path"
31808  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31809    unix_path=`$CYGPATH -u "$windows_path"`
31810    new_path="$unix_path"
31811  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31812    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31813    new_path="$unix_path"
31814  fi
31815
31816  if test "x$path" != "x$new_path"; then
31817    FREETYPELOCATION="$new_path"
31818    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31819$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31820  fi
31821
31822  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31823  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31824
31825  else
31826    # We're on a posix platform. Hooray! :)
31827    path="$FREETYPELOCATION"
31828    has_space=`$ECHO "$path" | $GREP " "`
31829    if test "x$has_space" != x; then
31830      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31831$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31832      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31833    fi
31834
31835    # Use eval to expand a potential ~
31836    eval path="$path"
31837    if test ! -f "$path" && test ! -d "$path"; then
31838      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
31839    fi
31840
31841    FREETYPELOCATION="`cd "$path"; $THEPWDCMD -L`"
31842  fi
31843
31844	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
31845$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
31846	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
31847	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
31848	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
31849 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
31850                if ! test -s "$FREETYPE2_LIBS"; then
31851		   as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
31852		fi
31853                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
31854		   as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
31855		fi
31856                USING_SYSTEM_FT_LIB=true
31857                FREETYPE2_FOUND=yes
31858	    fi
31859	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31860$as_echo "$FREETYPE2_FOUND" >&6; }
31861        fi
31862	if test "x$FREETYPE2_FOUND" = xno; then
31863
31864pkg_failed=no
31865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
31866$as_echo_n "checking for FREETYPE2... " >&6; }
31867
31868if test -n "$FREETYPE2_CFLAGS"; then
31869    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
31870 elif test -n "$PKG_CONFIG"; then
31871    if test -n "$PKG_CONFIG" && \
31872    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31873  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31874  ac_status=$?
31875  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31876  test $ac_status = 0; }; then
31877  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
31878else
31879  pkg_failed=yes
31880fi
31881 else
31882    pkg_failed=untried
31883fi
31884if test -n "$FREETYPE2_LIBS"; then
31885    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
31886 elif test -n "$PKG_CONFIG"; then
31887    if test -n "$PKG_CONFIG" && \
31888    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31889  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31890  ac_status=$?
31891  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31892  test $ac_status = 0; }; then
31893  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
31894else
31895  pkg_failed=yes
31896fi
31897 else
31898    pkg_failed=untried
31899fi
31900
31901
31902
31903if test $pkg_failed = yes; then
31904
31905if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31906        _pkg_short_errors_supported=yes
31907else
31908        _pkg_short_errors_supported=no
31909fi
31910        if test $_pkg_short_errors_supported = yes; then
31911	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
31912        else
31913	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
31914        fi
31915	# Put the nasty error message in config.log where it belongs
31916	echo "$FREETYPE2_PKG_ERRORS" >&5
31917
31918	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31919$as_echo "no" >&6; }
31920                FREETYPE2_FOUND=no
31921elif test $pkg_failed = untried; then
31922	FREETYPE2_FOUND=no
31923else
31924	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
31925	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
31926        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31927$as_echo "yes" >&6; }
31928	FREETYPE2_FOUND=yes
31929fi
31930            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
31931            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
31932            USING_SYSTEM_FT_LIB=true
31933            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
31934            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
31935              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
31936            fi
31937	fi
31938	if test "x$FREETYPE2_FOUND" = xno; then
31939	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
31940$as_echo_n "checking for freetype in some standard locations... " >&6; }
31941
31942	    if test -s $SYS_ROOT/usr/X11/include/ft2build.h && test -d $SYS_ROOT/usr/X11/include/freetype2/freetype; then
31943	        DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/X11/include/freetype2 -I$SYS_ROOT/usr/X11/include"
31944	        DEFAULT_FREETYPE_LIBS="-L$SYS_ROOT/usr/X11/lib -lfreetype"
31945	    fi
31946	    if test -s $SYS_ROOT/usr/include/ft2build.h && test -d $SYS_ROOT/usr/include/freetype2/freetype; then
31947	        DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/include/freetype2"
31948	        DEFAULT_FREETYPE_LIBS="-lfreetype"
31949	    fi
31950
31951	    PREV_CXXCFLAGS="$CXXFLAGS"
31952	    PREV_LDFLAGS="$LDFLAGS"
31953	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
31954	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
31955	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31956/* end confdefs.h.  */
31957#include<ft2build.h>
31958	                    #include FT_FREETYPE_H
31959	                   int main() { return 0; }
31960
31961_ACEOF
31962if ac_fn_cxx_try_link "$LINENO"; then :
31963
31964	                      # Yes, the default cflags and libs did the trick.
31965	                      FREETYPE2_FOUND=yes
31966	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
31967	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
31968
31969else
31970
31971	                      FREETYPE2_FOUND=no
31972
31973fi
31974rm -f core conftest.err conftest.$ac_objext \
31975    conftest$ac_exeext conftest.$ac_ext
31976            CXXCFLAGS="$PREV_CXXFLAGS"
31977	    LDFLAGS="$PREV_LDFLAGS"
31978	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31979$as_echo "$FREETYPE2_FOUND" >&6; }
31980            USING_SYSTEM_FT_LIB=true
31981	fi
31982	if test "x$FREETYPE2_FOUND" = xno; then
31983
31984    # Print a helpful message on how to acquire the necessary build dependency.
31985    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
31986    MISSING_DEPENDENCY=freetype2
31987    PKGHANDLER_COMMAND=
31988
31989    case $PKGHANDLER in
31990	apt-get)
31991                apt_help     $MISSING_DEPENDENCY ;;
31992	yum)
31993                yum_help     $MISSING_DEPENDENCY ;;
31994	port)
31995                port_help    $MISSING_DEPENDENCY ;;
31996	pkgutil)
31997                pkgutil_help $MISSING_DEPENDENCY ;;
31998	pkgadd)
31999                pkgadd_help  $MISSING_DEPENDENCY ;;
32000    esac
32001
32002    if test "x$PKGHANDLER_COMMAND" != x; then
32003        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
32004    fi
32005
32006		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
32007	fi
32008
32009        if test "x$OPENJDK_TARGET_OS" != xwindows; then
32010            # AC_CHECK_LIB does not support use of cl.exe
32011            PREV_LDFLAGS="$LDFLAGS"
32012            LDFLAGS="$FREETYPE2_LIBS"
32013            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
32014$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
32015if ${ac_cv_lib_freetype_FT_Init_FreeType+:} false; then :
32016  $as_echo_n "(cached) " >&6
32017else
32018  ac_check_lib_save_LIBS=$LIBS
32019LIBS="-lfreetype  $LIBS"
32020cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32021/* end confdefs.h.  */
32022
32023/* Override any GCC internal prototype to avoid an error.
32024   Use char because int might match the return type of a GCC
32025   builtin and then its argument prototype would still apply.  */
32026#ifdef __cplusplus
32027extern "C"
32028#endif
32029char FT_Init_FreeType ();
32030int
32031main ()
32032{
32033return FT_Init_FreeType ();
32034  ;
32035  return 0;
32036}
32037_ACEOF
32038if ac_fn_cxx_try_link "$LINENO"; then :
32039  ac_cv_lib_freetype_FT_Init_FreeType=yes
32040else
32041  ac_cv_lib_freetype_FT_Init_FreeType=no
32042fi
32043rm -f core conftest.err conftest.$ac_objext \
32044    conftest$ac_exeext conftest.$ac_ext
32045LIBS=$ac_check_lib_save_LIBS
32046fi
32047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
32048$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
32049if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = xyes; then :
32050  FREETYPE2_FOUND=true
32051else
32052  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
32053fi
32054
32055            LDFLAGS="$PREV_LDFLAGS"
32056        fi
32057fi
32058
32059
32060
32061
32062
32063
32064
32065
32066
32067###############################################################################
32068#
32069# Check for alsa headers and libraries. Used on Linux/GNU systems.
32070#
32071
32072# Check whether --with-alsa was given.
32073if test "${with_alsa+set}" = set; then :
32074  withval=$with_alsa;
32075fi
32076
32077
32078# Check whether --with-alsa-include was given.
32079if test "${with_alsa_include+set}" = set; then :
32080  withval=$with_alsa_include;
32081fi
32082
32083
32084# Check whether --with-alsa-lib was given.
32085if test "${with_alsa_lib+set}" = set; then :
32086  withval=$with_alsa_lib;
32087fi
32088
32089
32090if test "x$ALSA_NOT_NEEDED" = xyes; then
32091	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
32092		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
32093$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
32094	fi
32095	ALSA_CFLAGS=
32096	ALSA_LIBS=
32097else
32098	ALSA_FOUND=no
32099
32100	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
32101	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
32102	fi
32103
32104	if test "x${with_alsa}" != x; then
32105	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
32106	    ALSA_CFLAGS="-I${with_alsa}/include"
32107	    ALSA_FOUND=yes
32108	fi
32109	if test "x${with_alsa_include}" != x; then
32110	    ALSA_CFLAGS="-I${with_alsa_include}"
32111	    ALSA_FOUND=yes
32112	fi
32113	if test "x${with_alsa_lib}" != x; then
32114	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
32115	    ALSA_FOUND=yes
32116	fi
32117	if test "x$ALSA_FOUND" = xno; then
32118
32119
32120    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
32121        # Source the builddeps file again, to make sure it uses the latest variables!
32122        . $builddepsfile
32123        # Look for a target and build machine specific resource!
32124        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
32125        if test "x$resource" = x; then
32126            # Ok, lets instead look for a target specific resource
32127            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
32128        fi
32129        if test "x$resource" = x; then
32130            # Ok, lets instead look for a build specific resource
32131            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
32132        fi
32133        if test "x$resource" = x; then
32134            # Ok, lets instead look for a generic resource
32135            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
32136            resource=${builddep_alsa}
32137        fi
32138        if test "x$resource" != x; then
32139            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
32140$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
32141	    # If the resource in the builddeps.conf file is an existing directory,
32142	    # for example /java/linux/cups
32143	    if test -d ${resource}; then
32144	       depdir=${resource}
32145	    else
32146
32147# alsa is for example mymodule
32148# $resource is for example libs/general/libmymod_1_2_3.zip
32149# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
32150# $with_builddeps_dir is for example /localhome/builddeps
32151# depdir is the name of the variable into which we store the depdir, eg MYMOD
32152# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
32153# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
32154    filename=`basename $resource`
32155    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
32156    filebase=${filename%%.*}
32157    extension=${filename#*.}
32158    installdir=$with_builddeps_dir/$filebase
32159    if test ! -f $installdir/$filename.unpacked; then
32160        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
32161$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
32162        if test ! -d $installdir; then
32163            mkdir -p $installdir
32164        fi
32165        if test ! -d $installdir; then
32166            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
32167        fi
32168        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
32169        touch $tmpfile
32170        if test ! -f $tmpfile; then
32171            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
32172        fi
32173
32174    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
32175    # $tmpfile is the local file name for the downloaded file.
32176    VALID_TOOL=no
32177    if test "x$BDEPS_FTP" = xwget; then
32178       VALID_TOOL=yes
32179       wget -O $tmpfile $with_builddeps_server/$resource
32180    fi
32181    if test "x$BDEPS_FTP" = xlftp; then
32182       VALID_TOOL=yes
32183       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
32184    fi
32185    if test "x$BDEPS_FTP" = xftp; then
32186        VALID_TOOL=yes
32187        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
32188        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
32189        FTPUSERPWD=${FTPSERVER%%@*}
32190        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
32191            FTPUSER=${userpwd%%:*}
32192            FTPPWD=${userpwd#*@}
32193            FTPSERVER=${FTPSERVER#*@}
32194        else
32195            FTPUSER=ftp
32196            FTPPWD=ftp
32197        fi
32198        # the "pass" command does not work on some
32199        # ftp clients (read ftp.exe) but if it works,
32200        # passive mode is better!
32201        (\
32202            echo "user $FTPUSER $FTPPWD"        ;\
32203            echo "pass"                         ;\
32204            echo "bin"                          ;\
32205            echo "get $FTPPATH $tmpfile"              ;\
32206        ) | ftp -in $FTPSERVER
32207    fi
32208    if test "x$VALID_TOOL" != xyes; then
32209       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
32210    fi
32211
32212        mv $tmpfile $installdir/$filename
32213        if test ! -s $installdir/$filename; then
32214            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
32215        fi
32216        case "$extension" in
32217            zip)  echo "Unzipping $installdir/$filename..."
32218               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
32219            ;;
32220            tar.gz) echo "Untaring $installdir/$filename..."
32221               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
32222            ;;
32223            tgz) echo "Untaring $installdir/$filename..."
32224               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
32225            ;;
32226            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
32227            ;;
32228        esac
32229    fi
32230    if test -f $installdir/$filename.unpacked; then
32231        depdir=$installdir
32232    fi
32233
32234	    fi
32235            # Source the builddeps file again, because in the previous command, the depdir
32236            # was updated to point at the current build dependency install directory.
32237            . $builddepsfile
32238            # Now extract variables from the builddeps.conf files.
32239            theroot=${builddep_alsa_ROOT}
32240            thecflags=${builddep_alsa_CFLAGS}
32241            thelibs=${builddep_alsa_LIBS}
32242            if test "x$depdir" = x; then
32243                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
32244            fi
32245            ALSA=$depdir
32246            if test "x$theroot" != x; then
32247               ALSA="$theroot"
32248            fi
32249            if test "x$thecflags" != x; then
32250               ALSA_CFLAGS="$thecflags"
32251            fi
32252            if test "x$thelibs" != x; then
32253               ALSA_LIBS="$thelibs"
32254            fi
32255            ALSA_FOUND=yes
32256            else ALSA_FOUND=no
32257
32258        fi
32259        else ALSA_FOUND=no
32260
32261    fi
32262
32263	fi
32264	if test "x$ALSA_FOUND" = xno; then
32265
32266pkg_failed=no
32267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
32268$as_echo_n "checking for ALSA... " >&6; }
32269
32270if test -n "$ALSA_CFLAGS"; then
32271    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
32272 elif test -n "$PKG_CONFIG"; then
32273    if test -n "$PKG_CONFIG" && \
32274    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
32275  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
32276  ac_status=$?
32277  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32278  test $ac_status = 0; }; then
32279  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
32280else
32281  pkg_failed=yes
32282fi
32283 else
32284    pkg_failed=untried
32285fi
32286if test -n "$ALSA_LIBS"; then
32287    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
32288 elif test -n "$PKG_CONFIG"; then
32289    if test -n "$PKG_CONFIG" && \
32290    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
32291  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
32292  ac_status=$?
32293  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32294  test $ac_status = 0; }; then
32295  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
32296else
32297  pkg_failed=yes
32298fi
32299 else
32300    pkg_failed=untried
32301fi
32302
32303
32304
32305if test $pkg_failed = yes; then
32306
32307if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32308        _pkg_short_errors_supported=yes
32309else
32310        _pkg_short_errors_supported=no
32311fi
32312        if test $_pkg_short_errors_supported = yes; then
32313	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
32314        else
32315	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
32316        fi
32317	# Put the nasty error message in config.log where it belongs
32318	echo "$ALSA_PKG_ERRORS" >&5
32319
32320	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32321$as_echo "no" >&6; }
32322                ALSA_FOUND=no
32323elif test $pkg_failed = untried; then
32324	ALSA_FOUND=no
32325else
32326	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
32327	ALSA_LIBS=$pkg_cv_ALSA_LIBS
32328        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32329$as_echo "yes" >&6; }
32330	ALSA_FOUND=yes
32331fi
32332	fi
32333	if test "x$ALSA_FOUND" = xno; then
32334	    for ac_header in alsa/asoundlib.h
32335do :
32336  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
32337if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
32338  cat >>confdefs.h <<_ACEOF
32339#define HAVE_ALSA_ASOUNDLIB_H 1
32340_ACEOF
32341 ALSA_FOUND=yes
32342	                      ALSA_CFLAGS=-Iignoreme
32343	                      ALSA_LIBS=-lasound
32344	                      DEFAULT_ALSA=yes
32345else
32346  ALSA_FOUND=no
32347fi
32348
32349done
32350
32351	fi
32352	if test "x$ALSA_FOUND" = xno; then
32353
32354    # Print a helpful message on how to acquire the necessary build dependency.
32355    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
32356    MISSING_DEPENDENCY=alsa
32357    PKGHANDLER_COMMAND=
32358
32359    case $PKGHANDLER in
32360	apt-get)
32361                apt_help     $MISSING_DEPENDENCY ;;
32362	yum)
32363                yum_help     $MISSING_DEPENDENCY ;;
32364	port)
32365                port_help    $MISSING_DEPENDENCY ;;
32366	pkgutil)
32367                pkgutil_help $MISSING_DEPENDENCY ;;
32368	pkgadd)
32369                pkgadd_help  $MISSING_DEPENDENCY ;;
32370    esac
32371
32372    if test "x$PKGHANDLER_COMMAND" != x; then
32373        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
32374    fi
32375
32376	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
32377	fi
32378fi
32379
32380
32381
32382
32383
32384
32385
32386###############################################################################
32387#
32388# Check for the jpeg library
32389#
32390
32391USE_EXTERNAL_LIBJPEG=true
32392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
32393$as_echo_n "checking for main in -ljpeg... " >&6; }
32394if ${ac_cv_lib_jpeg_main+:} false; then :
32395  $as_echo_n "(cached) " >&6
32396else
32397  ac_check_lib_save_LIBS=$LIBS
32398LIBS="-ljpeg  $LIBS"
32399cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32400/* end confdefs.h.  */
32401
32402
32403int
32404main ()
32405{
32406return main ();
32407  ;
32408  return 0;
32409}
32410_ACEOF
32411if ac_fn_cxx_try_link "$LINENO"; then :
32412  ac_cv_lib_jpeg_main=yes
32413else
32414  ac_cv_lib_jpeg_main=no
32415fi
32416rm -f core conftest.err conftest.$ac_objext \
32417    conftest$ac_exeext conftest.$ac_ext
32418LIBS=$ac_check_lib_save_LIBS
32419fi
32420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
32421$as_echo "$ac_cv_lib_jpeg_main" >&6; }
32422if test "x$ac_cv_lib_jpeg_main" = xyes; then :
32423  cat >>confdefs.h <<_ACEOF
32424#define HAVE_LIBJPEG 1
32425_ACEOF
32426
32427  LIBS="-ljpeg $LIBS"
32428
32429else
32430   USE_EXTERNAL_LIBJPEG=false
32431               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
32432$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
32433
32434fi
32435
32436
32437
32438###############################################################################
32439#
32440# Check for the gif library
32441#
32442
32443
32444# Check whether --with-giflib was given.
32445if test "${with_giflib+set}" = set; then :
32446  withval=$with_giflib;
32447fi
32448
32449
32450
32451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
32452$as_echo_n "checking for which giflib to use... " >&6; }
32453
32454# default is bundled
32455DEFAULT_GIFLIB=bundled
32456
32457#
32458# if user didn't specify, use DEFAULT_GIFLIB
32459#
32460if test "x${with_giflib}" = "x"; then
32461    with_giflib=${DEFAULT_GIFLIB}
32462fi
32463
32464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
32465$as_echo "${with_giflib}" >&6; }
32466
32467if test "x${with_giflib}" = "xbundled"; then
32468    USE_EXTERNAL_LIBGIF=false
32469elif test "x${with_giflib}" = "xsystem"; then
32470    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
32471if test "x$ac_cv_header_gif_lib_h" = xyes; then :
32472
32473else
32474   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
32475fi
32476
32477
32478    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
32479$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
32480if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
32481  $as_echo_n "(cached) " >&6
32482else
32483  ac_check_lib_save_LIBS=$LIBS
32484LIBS="-lgif  $LIBS"
32485cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32486/* end confdefs.h.  */
32487
32488/* Override any GCC internal prototype to avoid an error.
32489   Use char because int might match the return type of a GCC
32490   builtin and then its argument prototype would still apply.  */
32491#ifdef __cplusplus
32492extern "C"
32493#endif
32494char DGifGetCode ();
32495int
32496main ()
32497{
32498return DGifGetCode ();
32499  ;
32500  return 0;
32501}
32502_ACEOF
32503if ac_fn_cxx_try_link "$LINENO"; then :
32504  ac_cv_lib_gif_DGifGetCode=yes
32505else
32506  ac_cv_lib_gif_DGifGetCode=no
32507fi
32508rm -f core conftest.err conftest.$ac_objext \
32509    conftest$ac_exeext conftest.$ac_ext
32510LIBS=$ac_check_lib_save_LIBS
32511fi
32512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
32513$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
32514if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
32515  cat >>confdefs.h <<_ACEOF
32516#define HAVE_LIBGIF 1
32517_ACEOF
32518
32519  LIBS="-lgif $LIBS"
32520
32521else
32522   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
32523fi
32524
32525
32526    USE_EXTERNAL_LIBGIF=true
32527else
32528    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
32529fi
32530
32531
32532###############################################################################
32533#
32534# Check for the zlib library
32535#
32536
32537
32538# Check whether --with-zlib was given.
32539if test "${with_zlib+set}" = set; then :
32540  withval=$with_zlib;
32541fi
32542
32543
32544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
32545$as_echo_n "checking for compress in -lz... " >&6; }
32546if ${ac_cv_lib_z_compress+:} false; then :
32547  $as_echo_n "(cached) " >&6
32548else
32549  ac_check_lib_save_LIBS=$LIBS
32550LIBS="-lz  $LIBS"
32551cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32552/* end confdefs.h.  */
32553
32554/* Override any GCC internal prototype to avoid an error.
32555   Use char because int might match the return type of a GCC
32556   builtin and then its argument prototype would still apply.  */
32557#ifdef __cplusplus
32558extern "C"
32559#endif
32560char compress ();
32561int
32562main ()
32563{
32564return compress ();
32565  ;
32566  return 0;
32567}
32568_ACEOF
32569if ac_fn_cxx_try_link "$LINENO"; then :
32570  ac_cv_lib_z_compress=yes
32571else
32572  ac_cv_lib_z_compress=no
32573fi
32574rm -f core conftest.err conftest.$ac_objext \
32575    conftest$ac_exeext conftest.$ac_ext
32576LIBS=$ac_check_lib_save_LIBS
32577fi
32578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
32579$as_echo "$ac_cv_lib_z_compress" >&6; }
32580if test "x$ac_cv_lib_z_compress" = xyes; then :
32581   ZLIB_FOUND=yes
32582else
32583   ZLIB_FOUND=no
32584fi
32585
32586
32587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
32588$as_echo_n "checking for which zlib to use... " >&6; }
32589
32590DEFAULT_ZLIB=bundled
32591if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32592#
32593# On macosx default is system...on others default is
32594#
32595    DEFAULT_ZLIB=system
32596fi
32597
32598if test "x${ZLIB_FOUND}" != "xyes"; then
32599#
32600# If we don't find any system...set default to bundled
32601#
32602    DEFAULT_ZLIB=bundled
32603fi
32604
32605#
32606# If user didn't specify, use DEFAULT_ZLIB
32607#
32608if test "x${with_zlib}" = "x"; then
32609    with_zlib=${DEFAULT_ZLIB}
32610fi
32611
32612if test "x${with_zlib}" = "xbundled"; then
32613    USE_EXTERNAL_LIBZ=false
32614    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
32615$as_echo "bundled" >&6; }
32616elif test "x${with_zlib}" = "xsystem"; then
32617    if test "x${ZLIB_FOUND}" = "xyes"; then
32618        USE_EXTERNAL_LIBZ=true
32619        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
32620$as_echo "system" >&6; }
32621    else
32622        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
32623$as_echo "system not found" >&6; }
32624        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
32625    fi
32626else
32627    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
32628fi
32629
32630
32631
32632###############################################################################
32633LIBZIP_CAN_USE_MMAP=true
32634
32635
32636
32637###############################################################################
32638#
32639# Check if altzone exists in time.h
32640#
32641
32642cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32643/* end confdefs.h.  */
32644#include <time.h>
32645int
32646main ()
32647{
32648return (int)altzone;
32649  ;
32650  return 0;
32651}
32652_ACEOF
32653if ac_fn_cxx_try_link "$LINENO"; then :
32654  has_altzone=yes
32655else
32656  has_altzone=no
32657fi
32658rm -f core conftest.err conftest.$ac_objext \
32659    conftest$ac_exeext conftest.$ac_ext
32660if test "x$has_altzone" = xyes; then
32661
32662$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
32663
32664fi
32665
32666###############################################################################
32667#
32668# Check the maths library
32669#
32670
32671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
32672$as_echo_n "checking for cos in -lm... " >&6; }
32673if ${ac_cv_lib_m_cos+:} false; then :
32674  $as_echo_n "(cached) " >&6
32675else
32676  ac_check_lib_save_LIBS=$LIBS
32677LIBS="-lm  $LIBS"
32678cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32679/* end confdefs.h.  */
32680
32681/* Override any GCC internal prototype to avoid an error.
32682   Use char because int might match the return type of a GCC
32683   builtin and then its argument prototype would still apply.  */
32684#ifdef __cplusplus
32685extern "C"
32686#endif
32687char cos ();
32688int
32689main ()
32690{
32691return cos ();
32692  ;
32693  return 0;
32694}
32695_ACEOF
32696if ac_fn_cxx_try_link "$LINENO"; then :
32697  ac_cv_lib_m_cos=yes
32698else
32699  ac_cv_lib_m_cos=no
32700fi
32701rm -f core conftest.err conftest.$ac_objext \
32702    conftest$ac_exeext conftest.$ac_ext
32703LIBS=$ac_check_lib_save_LIBS
32704fi
32705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
32706$as_echo "$ac_cv_lib_m_cos" >&6; }
32707if test "x$ac_cv_lib_m_cos" = xyes; then :
32708  cat >>confdefs.h <<_ACEOF
32709#define HAVE_LIBM 1
32710_ACEOF
32711
32712  LIBS="-lm $LIBS"
32713
32714else
32715
32716                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
32717$as_echo "$as_me: Maths library was not found" >&6;}
32718
32719fi
32720
32721
32722
32723###############################################################################
32724#
32725# Check for libdl.so
32726
32727save_LIBS="$LIBS"
32728LIBS=""
32729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
32730$as_echo_n "checking for dlopen in -ldl... " >&6; }
32731if ${ac_cv_lib_dl_dlopen+:} false; then :
32732  $as_echo_n "(cached) " >&6
32733else
32734  ac_check_lib_save_LIBS=$LIBS
32735LIBS="-ldl  $LIBS"
32736cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32737/* end confdefs.h.  */
32738
32739/* Override any GCC internal prototype to avoid an error.
32740   Use char because int might match the return type of a GCC
32741   builtin and then its argument prototype would still apply.  */
32742#ifdef __cplusplus
32743extern "C"
32744#endif
32745char dlopen ();
32746int
32747main ()
32748{
32749return dlopen ();
32750  ;
32751  return 0;
32752}
32753_ACEOF
32754if ac_fn_cxx_try_link "$LINENO"; then :
32755  ac_cv_lib_dl_dlopen=yes
32756else
32757  ac_cv_lib_dl_dlopen=no
32758fi
32759rm -f core conftest.err conftest.$ac_objext \
32760    conftest$ac_exeext conftest.$ac_ext
32761LIBS=$ac_check_lib_save_LIBS
32762fi
32763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
32764$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
32765if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
32766  cat >>confdefs.h <<_ACEOF
32767#define HAVE_LIBDL 1
32768_ACEOF
32769
32770  LIBS="-ldl $LIBS"
32771
32772fi
32773
32774LIBDL="$LIBS"
32775
32776LIBS="$save_LIBS"
32777
32778
32779
32780###############################################################################
32781#
32782# statically link libstdc++ before C++ ABI is stablized on Linux unless
32783# dynamic build is configured on command line.
32784#
32785
32786# Check whether --with-stdc++lib was given.
32787if test "${with_stdc__lib+set}" = set; then :
32788  withval=$with_stdc__lib;
32789    if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
32790        && test "x$with_stdc__lib" != xdefault; then
32791      as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
32792    fi
32793
32794else
32795  with_stdc__lib=default
32796
32797fi
32798
32799
32800if test "x$OPENJDK_TARGET_OS" = xlinux; then
32801    # Test if -lstdc++ works.
32802    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
32803$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
32804    ac_ext=cpp
32805ac_cpp='$CXXCPP $CPPFLAGS'
32806ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32807ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32808ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32809
32810    OLD_CXXFLAGS="$CXXFLAGS"
32811    CXXFLAGS="$CXXFLAGS -lstdc++"
32812    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32813/* end confdefs.h.  */
32814
32815int
32816main ()
32817{
32818return 0;
32819  ;
32820  return 0;
32821}
32822_ACEOF
32823if ac_fn_cxx_try_link "$LINENO"; then :
32824  has_dynamic_libstdcxx=yes
32825else
32826  has_dynamic_libstdcxx=no
32827fi
32828rm -f core conftest.err conftest.$ac_objext \
32829    conftest$ac_exeext conftest.$ac_ext
32830    CXXFLAGS="$OLD_CXXFLAGS"
32831    ac_ext=cpp
32832ac_cpp='$CXXCPP $CPPFLAGS'
32833ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32834ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32835ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32836
32837    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
32838$as_echo "$has_dynamic_libstdcxx" >&6; }
32839
32840    # Test if stdc++ can be linked statically.
32841    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
32842$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
32843    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
32844    ac_ext=cpp
32845ac_cpp='$CXXCPP $CPPFLAGS'
32846ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32847ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32848ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32849
32850    OLD_LIBS="$LIBS"
32851    OLD_CXX="$CXX"
32852    LIBS="$STATIC_STDCXX_FLAGS"
32853    CXX="$CC"
32854    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32855/* end confdefs.h.  */
32856
32857int
32858main ()
32859{
32860return 0;
32861  ;
32862  return 0;
32863}
32864_ACEOF
32865if ac_fn_cxx_try_link "$LINENO"; then :
32866  has_static_libstdcxx=yes
32867else
32868  has_static_libstdcxx=no
32869fi
32870rm -f core conftest.err conftest.$ac_objext \
32871    conftest$ac_exeext conftest.$ac_ext
32872    LIBS="$OLD_LIBS"
32873    CXX="$OLD_CXX"
32874    ac_ext=cpp
32875ac_cpp='$CXXCPP $CPPFLAGS'
32876ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32877ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32878ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32879
32880    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
32881$as_echo "$has_static_libstdcxx" >&6; }
32882
32883    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
32884        as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
32885    fi
32886
32887    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
32888        as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
32889    fi
32890
32891    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
32892        as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
32893    fi
32894
32895    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
32896$as_echo_n "checking how to link with libstdc++... " >&6; }
32897    # If dynamic was requested, it's available since it would fail above otherwise.
32898    # If dynamic wasn't requested, go with static unless it isn't available.
32899    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32900        LIBCXX="$LIBCXX -lstdc++"
32901        LDCXX="$CXX"
32902        STATIC_CXX_SETTING="STATIC_CXX=false"
32903        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
32904$as_echo "dynamic" >&6; }
32905    else
32906        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
32907        LDCXX="$CC"
32908        STATIC_CXX_SETTING="STATIC_CXX=true"
32909        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
32910$as_echo "static" >&6; }
32911    fi
32912fi
32913
32914
32915if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32916    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
32917
32918pkg_failed=no
32919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
32920$as_echo_n "checking for LIBFFI... " >&6; }
32921
32922if test -n "$LIBFFI_CFLAGS"; then
32923    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
32924 elif test -n "$PKG_CONFIG"; then
32925    if test -n "$PKG_CONFIG" && \
32926    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32927  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32928  ac_status=$?
32929  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32930  test $ac_status = 0; }; then
32931  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
32932else
32933  pkg_failed=yes
32934fi
32935 else
32936    pkg_failed=untried
32937fi
32938if test -n "$LIBFFI_LIBS"; then
32939    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
32940 elif test -n "$PKG_CONFIG"; then
32941    if test -n "$PKG_CONFIG" && \
32942    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32943  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32944  ac_status=$?
32945  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32946  test $ac_status = 0; }; then
32947  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
32948else
32949  pkg_failed=yes
32950fi
32951 else
32952    pkg_failed=untried
32953fi
32954
32955
32956
32957if test $pkg_failed = yes; then
32958
32959if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32960        _pkg_short_errors_supported=yes
32961else
32962        _pkg_short_errors_supported=no
32963fi
32964        if test $_pkg_short_errors_supported = yes; then
32965	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
32966        else
32967	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
32968        fi
32969	# Put the nasty error message in config.log where it belongs
32970	echo "$LIBFFI_PKG_ERRORS" >&5
32971
32972	as_fn_error $? "Package requirements (libffi) were not met:
32973
32974$LIBFFI_PKG_ERRORS
32975
32976Consider adjusting the PKG_CONFIG_PATH environment variable if you
32977installed software in a non-standard prefix.
32978
32979Alternatively, you may set the environment variables LIBFFI_CFLAGS
32980and LIBFFI_LIBS to avoid the need to call pkg-config.
32981See the pkg-config man page for more details.
32982" "$LINENO" 5
32983elif test $pkg_failed = untried; then
32984	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32985$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32986as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
32987is in your PATH or set the PKG_CONFIG environment variable to the full
32988path to pkg-config.
32989
32990Alternatively, you may set the environment variables LIBFFI_CFLAGS
32991and LIBFFI_LIBS to avoid the need to call pkg-config.
32992See the pkg-config man page for more details.
32993
32994To get pkg-config, see <http://pkg-config.freedesktop.org/>.
32995See \`config.log' for more details" "$LINENO" 5; }
32996else
32997	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
32998	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
32999        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33000$as_echo "yes" >&6; }
33001	:
33002fi
33003
33004fi
33005
33006if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
33007    # Extract the first word of "llvm-config", so it can be a program name with args.
33008set dummy llvm-config; ac_word=$2
33009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33010$as_echo_n "checking for $ac_word... " >&6; }
33011if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
33012  $as_echo_n "(cached) " >&6
33013else
33014  if test -n "$LLVM_CONFIG"; then
33015  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
33016else
33017as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33018for as_dir in $PATH
33019do
33020  IFS=$as_save_IFS
33021  test -z "$as_dir" && as_dir=.
33022    for ac_exec_ext in '' $ac_executable_extensions; do
33023  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33024    ac_cv_prog_LLVM_CONFIG="llvm-config"
33025    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33026    break 2
33027  fi
33028done
33029  done
33030IFS=$as_save_IFS
33031
33032fi
33033fi
33034LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
33035if test -n "$LLVM_CONFIG"; then
33036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
33037$as_echo "$LLVM_CONFIG" >&6; }
33038else
33039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33040$as_echo "no" >&6; }
33041fi
33042
33043
33044
33045    if test "x$LLVM_CONFIG" != xllvm-config; then
33046        as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
33047    fi
33048
33049    llvm_components="jit mcjit engine nativecodegen native"
33050    unset LLVM_CFLAGS
33051    for flag in $("$LLVM_CONFIG" --cxxflags); do
33052      if echo "${flag}" | grep -q '^-[ID]'; then
33053        if test "${flag}" != "-D_DEBUG" ; then
33054          if test "${LLVM_CFLAGS}" != "" ; then
33055            LLVM_CFLAGS="${LLVM_CFLAGS} "
33056          fi
33057          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
33058        fi
33059      fi
33060    done
33061    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
33062    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
33063
33064    unset LLVM_LDFLAGS
33065    for flag in $("${LLVM_CONFIG}" --ldflags); do
33066      if echo "${flag}" | grep -q '^-L'; then
33067        if test "${LLVM_LDFLAGS}" != ""; then
33068          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
33069        fi
33070        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
33071      fi
33072    done
33073
33074    unset LLVM_LIBS
33075    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
33076      if echo "${flag}" | grep -q '^-l'; then
33077        if test "${LLVM_LIBS}" != ""; then
33078          LLVM_LIBS="${LLVM_LIBS} "
33079        fi
33080        LLVM_LIBS="${LLVM_LIBS}${flag}"
33081      fi
33082    done
33083
33084
33085
33086
33087fi
33088
33089# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
33090if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
33091    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
33092fi
33093
33094# TODO better (platform agnostic) test
33095if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
33096    LIBCXX="-lstdc++"
33097fi
33098
33099
33100
33101
33102
33103# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
33104
33105# When using cygwin or msys, we need a wrapper binary that renames
33106# /cygdrive/c/ arguments into c:/ arguments and peeks into
33107# @files and rewrites these too! This wrapper binary is
33108# called fixpath.
33109FIXPATH=
33110if test "x$OPENJDK_BUILD_OS" = xwindows; then
33111    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
33112$as_echo_n "checking if fixpath can be created... " >&6; }
33113    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
33114    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
33115    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
33116      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
33117      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
33118      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
33119      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
33120    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
33121      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
33122      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
33123
33124      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
33125      # @ was chosen as separator to minimize risk of other tools messing around with it
33126      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
33127      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
33128
33129      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
33130    fi
33131    rm -f $OUTPUT_ROOT/fixpath*
33132    cd $OUTPUT_ROOT
33133    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
33134    cd $CURDIR
33135
33136    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
33137        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33138$as_echo "no" >&6; }
33139        cat $OUTPUT_ROOT/fixpath1.log
33140        as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
33141    fi
33142    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33143$as_echo "yes" >&6; }
33144    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
33145$as_echo_n "checking if fixpath.exe works... " >&6; }
33146    cd $OUTPUT_ROOT
33147    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
33148    cd $CURDIR
33149    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
33150        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33151$as_echo "no" >&6; }
33152        cat $OUTPUT_ROOT/fixpath2.log
33153        as_fn_error $? "fixpath did not work!" "$LINENO" 5
33154    fi
33155    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33156$as_echo "yes" >&6; }
33157    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
33158fi
33159
33160
33161
33162
33163###############################################################################
33164#
33165# We need to do some final tweaking, when everything else is done.
33166#
33167###############################################################################
33168
33169
33170HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
33171
33172
33173# The name of the Service Agent jar.
33174SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
33175if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
33176  SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
33177fi
33178
33179
33180
33181
33182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
33183$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
33184
33185if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
33186    ENABLE_INTREE_EC=yes
33187    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33188$as_echo "yes" >&6; }
33189else
33190    ENABLE_INTREE_EC=no
33191    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33192$as_echo "no" >&6; }
33193fi
33194
33195
33196
33197
33198###############################################################################
33199#
33200# Configure parts of the build that only affect the build performance,
33201# not the result.
33202#
33203###############################################################################
33204
33205
33206  # How many cores do we have on this build system?
33207
33208# Check whether --with-num-cores was given.
33209if test "${with_num_cores+set}" = set; then :
33210  withval=$with_num_cores;
33211fi
33212
33213  if test "x$with_num_cores" = x; then
33214    # The number of cores were not specified, try to probe them.
33215
33216    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
33217$as_echo_n "checking for number of cores... " >&6; }
33218    NUM_CORES=1
33219    FOUND_CORES=no
33220
33221    if test -f /proc/cpuinfo; then
33222        # Looks like a Linux (or cygwin) system
33223        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
33224        FOUND_CORES=yes
33225    elif test -x /usr/sbin/psrinfo; then
33226        # Looks like a Solaris system
33227        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
33228        FOUND_CORES=yes
33229    elif test -x /usr/sbin/system_profiler; then
33230        # Looks like a MacOSX system
33231        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
33232        FOUND_CORES=yes
33233    elif test "x$OPENJDK_BUILD_OS" = xaix ; then
33234        NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
33235        FOUND_CORES=yes
33236    elif test -n "$NUMBER_OF_PROCESSORS"; then
33237        # On windows, look in the env
33238        NUM_CORES=$NUMBER_OF_PROCESSORS
33239        FOUND_CORES=yes
33240    fi
33241
33242    if test "x$FOUND_CORES" = xyes; then
33243        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
33244$as_echo "$NUM_CORES" >&6; }
33245    else
33246        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
33247$as_echo "could not detect number of cores, defaulting to 1" >&6; }
33248        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
33249$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
33250    fi
33251
33252
33253  else
33254    NUM_CORES=$with_num_cores
33255  fi
33256
33257
33258
33259  # How much memory do we have on this build system?
33260
33261# Check whether --with-memory-size was given.
33262if test "${with_memory_size+set}" = set; then :
33263  withval=$with_memory_size;
33264fi
33265
33266  if test "x$with_memory_size" = x; then
33267    # The memory size was not specified, try to probe it.
33268
33269    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
33270$as_echo_n "checking for memory size... " >&6; }
33271    # Default to 1024 MB
33272    MEMORY_SIZE=1024
33273    FOUND_MEM=no
33274
33275    if test -f /proc/meminfo; then
33276        # Looks like a Linux (or cygwin) system
33277        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
33278        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
33279        FOUND_MEM=yes
33280    elif test -x /usr/sbin/prtconf; then
33281        # Looks like a Solaris or AIX system
33282        MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
33283        FOUND_MEM=yes
33284    elif test -x /usr/sbin/system_profiler; then
33285        # Looks like a MacOSX system
33286        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
33287        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
33288        FOUND_MEM=yes
33289    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
33290        # Windows, but without cygwin
33291        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
33292        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
33293        FOUND_MEM=yes
33294    fi
33295
33296    if test "x$FOUND_MEM" = xyes; then
33297        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
33298$as_echo "$MEMORY_SIZE MB" >&6; }
33299    else
33300        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
33301$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
33302        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
33303$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
33304    fi
33305
33306  else
33307    MEMORY_SIZE=$with_memory_size
33308  fi
33309
33310
33311
33312  # Provide a decent default number of parallel jobs for make depending on
33313  # number of cores, amount of memory and machine architecture.
33314
33315# Check whether --with-jobs was given.
33316if test "${with_jobs+set}" = set; then :
33317  withval=$with_jobs;
33318fi
33319
33320  if test "x$with_jobs" = x; then
33321    # Number of jobs was not specified, calculate.
33322    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
33323$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
33324    # Approximate memory in GB, rounding up a bit.
33325    memory_gb=`expr $MEMORY_SIZE / 1100`
33326    # Pick the lowest of memory in gb and number of cores.
33327    if test "$memory_gb" -lt "$NUM_CORES"; then
33328      JOBS="$memory_gb"
33329    else
33330      JOBS="$NUM_CORES"
33331      # On bigger machines, leave some room for other processes to run
33332      if test "$JOBS" -gt "4"; then
33333        JOBS=`expr $JOBS '*' 90 / 100`
33334      fi
33335    fi
33336    # Cap number of jobs to 16
33337    if test "$JOBS" -gt "16"; then
33338      JOBS=16
33339    fi
33340    if test "$JOBS" -eq "0"; then
33341      JOBS=1
33342    fi
33343    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
33344$as_echo "$JOBS" >&6; }
33345  else
33346    JOBS=$with_jobs
33347  fi
33348
33349
33350
33351# Setup smart javac (after cores and memory have been setup)
33352
33353
33354# Check whether --with-sjavac-server-java was given.
33355if test "${with_sjavac_server_java+set}" = set; then :
33356  withval=$with_sjavac_server_java;
33357fi
33358
33359
33360if test "x$with_sjavac_server_java" != x; then
33361    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
33362    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
33363    if test "x$FOUND_VERSION" = x; then
33364        as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
33365    fi
33366else
33367    SJAVAC_SERVER_JAVA=""
33368    # Hotspot specific options.
33369
33370    $ECHO "Check if jvm arg is ok: -verbosegc" >&5
33371    $ECHO "Command: $JAVA -verbosegc -version" >&5
33372    OUTPUT=`$JAVA -verbosegc -version 2>&1`
33373    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33374    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33375    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33376        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
33377	JVM_ARG_OK=true
33378    else
33379	$ECHO "Arg failed:" >&5
33380	$ECHO "$OUTPUT" >&5
33381	JVM_ARG_OK=false
33382    fi
33383
33384    # JRockit specific options.
33385
33386    $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
33387    $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
33388    OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
33389    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33390    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33391    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33392        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
33393	JVM_ARG_OK=true
33394    else
33395	$ECHO "Arg failed:" >&5
33396	$ECHO "$OUTPUT" >&5
33397	JVM_ARG_OK=false
33398    fi
33399
33400    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
33401fi
33402
33403
33404if test "$MEMORY_SIZE" -gt "2500"; then
33405
33406    $ECHO "Check if jvm arg is ok: -d64" >&5
33407    $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
33408    OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
33409    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33410    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33411    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33412        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
33413	JVM_ARG_OK=true
33414    else
33415	$ECHO "Arg failed:" >&5
33416	$ECHO "$OUTPUT" >&5
33417	JVM_ARG_OK=false
33418    fi
33419
33420    if test "$JVM_ARG_OK" = true; then
33421        JVM_64BIT=true
33422	JVM_ARG_OK=false
33423    fi
33424    fi
33425
33426if test "$JVM_64BIT" = true; then
33427    if test "$MEMORY_SIZE" -gt "17000"; then
33428
33429    $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
33430    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
33431    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
33432    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33433    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33434    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33435        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
33436	JVM_ARG_OK=true
33437    else
33438	$ECHO "Arg failed:" >&5
33439	$ECHO "$OUTPUT" >&5
33440	JVM_ARG_OK=false
33441    fi
33442
33443    fi
33444    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
33445
33446    $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
33447    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
33448    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
33449    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33450    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33451    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33452        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
33453	JVM_ARG_OK=true
33454    else
33455	$ECHO "Arg failed:" >&5
33456	$ECHO "$OUTPUT" >&5
33457	JVM_ARG_OK=false
33458    fi
33459
33460    fi
33461    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
33462
33463    $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
33464    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
33465    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
33466    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33467    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33468    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33469        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
33470	JVM_ARG_OK=true
33471    else
33472	$ECHO "Arg failed:" >&5
33473	$ECHO "$OUTPUT" >&5
33474	JVM_ARG_OK=false
33475    fi
33476
33477    fi
33478    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
33479
33480    $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
33481    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
33482    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
33483    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33484    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33485    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33486        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
33487	JVM_ARG_OK=true
33488    else
33489	$ECHO "Arg failed:" >&5
33490	$ECHO "$OUTPUT" >&5
33491	JVM_ARG_OK=false
33492    fi
33493
33494    fi
33495fi
33496if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
33497
33498    $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
33499    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
33500    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
33501    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33502    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33503    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33504        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
33505	JVM_ARG_OK=true
33506    else
33507	$ECHO "Arg failed:" >&5
33508	$ECHO "$OUTPUT" >&5
33509	JVM_ARG_OK=false
33510    fi
33511
33512fi
33513if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
33514
33515    $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
33516    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
33517    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
33518    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33519    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33520    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33521        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
33522	JVM_ARG_OK=true
33523    else
33524	$ECHO "Arg failed:" >&5
33525	$ECHO "$OUTPUT" >&5
33526	JVM_ARG_OK=false
33527    fi
33528
33529fi
33530if test "$JVM_ARG_OK" = false; then
33531
33532    $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
33533    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
33534    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
33535    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33536    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33537    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33538        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
33539	JVM_ARG_OK=true
33540    else
33541	$ECHO "Arg failed:" >&5
33542	$ECHO "$OUTPUT" >&5
33543	JVM_ARG_OK=false
33544    fi
33545
33546fi
33547
33548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
33549$as_echo_n "checking whether to use sjavac... " >&6; }
33550# Check whether --enable-sjavac was given.
33551if test "${enable_sjavac+set}" = set; then :
33552  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
33553else
33554  ENABLE_SJAVAC='no'
33555fi
33556
33557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
33558$as_echo "$ENABLE_SJAVAC" >&6; }
33559
33560
33561if test "x$ENABLE_SJAVAC" = xyes; then
33562    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
33563else
33564    SJAVAC_SERVER_DIR=
33565fi
33566
33567
33568
33569
33570# Can the C/C++ compiler use precompiled headers?
33571
33572
33573###############################################################################
33574#
33575# Can the C/C++ compiler use precompiled headers?
33576#
33577# Check whether --enable-precompiled-headers was given.
33578if test "${enable_precompiled_headers+set}" = set; then :
33579  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
33580else
33581  ENABLE_PRECOMPH=yes
33582fi
33583
33584
33585USE_PRECOMPILED_HEADER=1
33586if test "x$ENABLE_PRECOMPH" = xno; then
33587    USE_PRECOMPILED_HEADER=0
33588fi
33589
33590if test "x$ENABLE_PRECOMPH" = xyes; then
33591    # Check that the compiler actually supports precomp headers.
33592    if test "x$GCC" = xyes; then
33593         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
33594$as_echo_n "checking that precompiled headers work... " >&6; }
33595         echo "int alfa();" > conftest.h
33596         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
33597         if test ! -f conftest.hpp.gch; then
33598             USE_PRECOMPILED_HEADER=0
33599             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33600$as_echo "no" >&6; }
33601         else
33602             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33603$as_echo "yes" >&6; }
33604         fi
33605         rm -f conftest.h conftest.hpp.gch
33606    fi
33607fi
33608
33609
33610
33611
33612# Setup use of ccache, if available
33613
33614    # Check whether --enable-ccache was given.
33615if test "${enable_ccache+set}" = set; then :
33616  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
33617else
33618  ENABLE_CCACHE=yes
33619fi
33620
33621    if test "x$ENABLE_CCACHE" = xyes; then
33622        OLD_PATH="$PATH"
33623        if test "x$TOOLS_DIR" != x; then
33624          PATH=$TOOLS_DIR:$PATH
33625        fi
33626        # Extract the first word of "ccache", so it can be a program name with args.
33627set dummy ccache; ac_word=$2
33628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33629$as_echo_n "checking for $ac_word... " >&6; }
33630if ${ac_cv_path_CCACHE+:} false; then :
33631  $as_echo_n "(cached) " >&6
33632else
33633  case $CCACHE in
33634  [\\/]* | ?:[\\/]*)
33635  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
33636  ;;
33637  *)
33638  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33639for as_dir in $PATH
33640do
33641  IFS=$as_save_IFS
33642  test -z "$as_dir" && as_dir=.
33643    for ac_exec_ext in '' $ac_executable_extensions; do
33644  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33645    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
33646    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33647    break 2
33648  fi
33649done
33650  done
33651IFS=$as_save_IFS
33652
33653  ;;
33654esac
33655fi
33656CCACHE=$ac_cv_path_CCACHE
33657if test -n "$CCACHE"; then
33658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
33659$as_echo "$CCACHE" >&6; }
33660else
33661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33662$as_echo "no" >&6; }
33663fi
33664
33665
33666        PATH="$OLD_PATH"
33667    else
33668        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
33669$as_echo_n "checking for ccache... " >&6; }
33670        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
33671$as_echo "explicitly disabled" >&6; }
33672        CCACHE=
33673    fi
33674
33675
33676
33677# Check whether --with-ccache-dir was given.
33678if test "${with_ccache_dir+set}" = set; then :
33679  withval=$with_ccache_dir;
33680fi
33681
33682
33683    if test "x$with_ccache_dir" != x; then
33684        # When using a non home ccache directory, assume the use is to share ccache files
33685        # with other users. Thus change the umask.
33686        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
33687    fi
33688    CCACHE_FOUND=""
33689    if test "x$CCACHE" != x; then
33690
33691    if test "x$CCACHE" != x; then
33692        CCACHE_FOUND="true"
33693        # Only use ccache if it is 3.1.4 or later, which supports
33694        # precompiled headers.
33695        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
33696$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
33697        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
33698        if test "x$HAS_GOOD_CCACHE" = x; then
33699            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
33700$as_echo "no, disabling ccache" >&6; }
33701            CCACHE=
33702        else
33703            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33704$as_echo "yes" >&6; }
33705            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
33706$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
33707            PUSHED_FLAGS="$CXXFLAGS"
33708            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
33709            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33710/* end confdefs.h.  */
33711
33712int
33713main ()
33714{
33715
33716  ;
33717  return 0;
33718}
33719_ACEOF
33720if ac_fn_cxx_try_compile "$LINENO"; then :
33721  CC_KNOWS_CCACHE_TRICK=yes
33722else
33723  CC_KNOWS_CCACHE_TRICK=no
33724fi
33725rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33726            CXXFLAGS="$PUSHED_FLAGS"
33727            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
33728                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33729$as_echo "yes" >&6; }
33730            else
33731                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
33732$as_echo "no, disabling ccaching of precompiled headers" >&6; }
33733                CCACHE=
33734            fi
33735        fi
33736    fi
33737
33738    if test "x$CCACHE" != x; then
33739        CCACHE_SLOPPINESS=time_macros
33740        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
33741        CCACHE_FLAGS=-fpch-preprocess
33742
33743        if test "x$SET_CCACHE_DIR" != x; then
33744            mkdir -p $CCACHE_DIR > /dev/null 2>&1
33745	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
33746        fi
33747    fi
33748
33749    fi
33750
33751
33752###############################################################################
33753#
33754# And now the finish...
33755#
33756###############################################################################
33757
33758# Check for some common pitfalls
33759
33760  if test x"$OPENJDK_BUILD_OS" = xwindows; then
33761    file_to_test="$SRC_ROOT/LICENSE"
33762    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
33763      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
33764    fi
33765  fi
33766
33767
33768
33769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
33770$as_echo_n "checking if build directory is on local disk... " >&6; }
33771
33772	# df -l lists only local disks; if the given directory is not found then
33773	# a non-zero exit code is given
33774  if test "x$DF" = x; then
33775    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33776      # msys does not have df; use Windows "net use" instead.
33777      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
33778      if test "x$IS_NETWORK_DISK" = x; then
33779        OUTPUT_DIR_IS_LOCAL="yes"
33780      else
33781        OUTPUT_DIR_IS_LOCAL="no"
33782      fi
33783    else
33784      # No df here, say it's local
33785      OUTPUT_DIR_IS_LOCAL="yes"
33786    fi
33787  else
33788    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
33789      OUTPUT_DIR_IS_LOCAL="yes"
33790    else
33791      OUTPUT_DIR_IS_LOCAL="no"
33792    fi
33793  fi
33794
33795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
33796$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
33797
33798
33799
33800# Check if the user has any old-style ALT_ variables set.
33801FOUND_ALT_VARIABLES=`env | grep ^ALT_`
33802
33803# Before generating output files, test if they exist. If they do, this is a reconfigure.
33804# Since we can't properly handle the dependencies for this, warn the user about the situation
33805if test -e $OUTPUT_ROOT/spec.gmk; then
33806  IS_RECONFIGURE=yes
33807else
33808  IS_RECONFIGURE=no
33809fi
33810
33811if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
33812  HIDE_PERFORMANCE_HINTS=yes
33813else
33814  HIDE_PERFORMANCE_HINTS=no
33815  # Hide it the next time around...
33816  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
33817fi
33818
33819
33820
33821# At the end, call the custom hook. (Dummy macro if no custom sources available)
33822
33823
33824# We're messing a bit with internal autoconf variables to put the config.status
33825# in the output directory instead of the current directory.
33826CONFIG_STATUS="$OUTPUT_ROOT/config.status"
33827# Create the actual output files. Now the main work of configure is done.
33828cat >confcache <<\_ACEOF
33829# This file is a shell script that caches the results of configure
33830# tests run on this system so they can be shared between configure
33831# scripts and configure runs, see configure's option --config-cache.
33832# It is not useful on other systems.  If it contains results you don't
33833# want to keep, you may remove or edit it.
33834#
33835# config.status only pays attention to the cache file if you give it
33836# the --recheck option to rerun configure.
33837#
33838# `ac_cv_env_foo' variables (set or unset) will be overridden when
33839# loading this file, other *unset* `ac_cv_foo' will be assigned the
33840# following values.
33841
33842_ACEOF
33843
33844# The following way of writing the cache mishandles newlines in values,
33845# but we know of no workaround that is simple, portable, and efficient.
33846# So, we kill variables containing newlines.
33847# Ultrix sh set writes to stderr and can't be redirected directly,
33848# and sets the high bit in the cache file unless we assign to the vars.
33849(
33850  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
33851    eval ac_val=\$$ac_var
33852    case $ac_val in #(
33853    *${as_nl}*)
33854      case $ac_var in #(
33855      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
33856$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
33857      esac
33858      case $ac_var in #(
33859      _ | IFS | as_nl) ;; #(
33860      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
33861      *) { eval $ac_var=; unset $ac_var;} ;;
33862      esac ;;
33863    esac
33864  done
33865
33866  (set) 2>&1 |
33867    case $as_nl`(ac_space=' '; set) 2>&1` in #(
33868    *${as_nl}ac_space=\ *)
33869      # `set' does not quote correctly, so add quotes: double-quote
33870      # substitution turns \\\\ into \\, and sed turns \\ into \.
33871      sed -n \
33872	"s/'/'\\\\''/g;
33873	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
33874      ;; #(
33875    *)
33876      # `set' quotes correctly as required by POSIX, so do not add quotes.
33877      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
33878      ;;
33879    esac |
33880    sort
33881) |
33882  sed '
33883     /^ac_cv_env_/b end
33884     t clear
33885     :clear
33886     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
33887     t end
33888     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
33889     :end' >>confcache
33890if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
33891  if test -w "$cache_file"; then
33892    if test "x$cache_file" != "x/dev/null"; then
33893      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
33894$as_echo "$as_me: updating cache $cache_file" >&6;}
33895      if test ! -f "$cache_file" || test -h "$cache_file"; then
33896	cat confcache >"$cache_file"
33897      else
33898        case $cache_file in #(
33899        */* | ?:*)
33900	  mv -f confcache "$cache_file"$$ &&
33901	  mv -f "$cache_file"$$ "$cache_file" ;; #(
33902        *)
33903	  mv -f confcache "$cache_file" ;;
33904	esac
33905      fi
33906    fi
33907  else
33908    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
33909$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
33910  fi
33911fi
33912rm -f confcache
33913
33914test "x$prefix" = xNONE && prefix=$ac_default_prefix
33915# Let make expand exec_prefix.
33916test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
33917
33918DEFS=-DHAVE_CONFIG_H
33919
33920ac_libobjs=
33921ac_ltlibobjs=
33922U=
33923for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
33924  # 1. Remove the extension, and $U if already installed.
33925  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
33926  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
33927  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
33928  #    will be set to the directory where LIBOBJS objects are built.
33929  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
33930  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
33931done
33932LIBOBJS=$ac_libobjs
33933
33934LTLIBOBJS=$ac_ltlibobjs
33935
33936
33937
33938: "${CONFIG_STATUS=./config.status}"
33939ac_write_fail=0
33940ac_clean_files_save=$ac_clean_files
33941ac_clean_files="$ac_clean_files $CONFIG_STATUS"
33942{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
33943$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
33944as_write_fail=0
33945cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
33946#! $SHELL
33947# Generated by $as_me.
33948# Run this file to recreate the current configuration.
33949# Compiler output produced by configure, useful for debugging
33950# configure, is in config.log if it exists.
33951
33952debug=false
33953ac_cs_recheck=false
33954ac_cs_silent=false
33955
33956SHELL=\${CONFIG_SHELL-$SHELL}
33957export SHELL
33958_ASEOF
33959cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
33960## -------------------- ##
33961## M4sh Initialization. ##
33962## -------------------- ##
33963
33964# Be more Bourne compatible
33965DUALCASE=1; export DUALCASE # for MKS sh
33966if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
33967  emulate sh
33968  NULLCMD=:
33969  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
33970  # is contrary to our usage.  Disable this feature.
33971  alias -g '${1+"$@"}'='"$@"'
33972  setopt NO_GLOB_SUBST
33973else
33974  case `(set -o) 2>/dev/null` in #(
33975  *posix*) :
33976    set -o posix ;; #(
33977  *) :
33978     ;;
33979esac
33980fi
33981
33982
33983as_nl='
33984'
33985export as_nl
33986# Printing a long string crashes Solaris 7 /usr/bin/printf.
33987as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
33988as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
33989as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
33990# Prefer a ksh shell builtin over an external printf program on Solaris,
33991# but without wasting forks for bash or zsh.
33992if test -z "$BASH_VERSION$ZSH_VERSION" \
33993    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
33994  as_echo='print -r --'
33995  as_echo_n='print -rn --'
33996elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
33997  as_echo='printf %s\n'
33998  as_echo_n='printf %s'
33999else
34000  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
34001    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
34002    as_echo_n='/usr/ucb/echo -n'
34003  else
34004    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
34005    as_echo_n_body='eval
34006      arg=$1;
34007      case $arg in #(
34008      *"$as_nl"*)
34009	expr "X$arg" : "X\\(.*\\)$as_nl";
34010	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
34011      esac;
34012      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
34013    '
34014    export as_echo_n_body
34015    as_echo_n='sh -c $as_echo_n_body as_echo'
34016  fi
34017  export as_echo_body
34018  as_echo='sh -c $as_echo_body as_echo'
34019fi
34020
34021# The user is always right.
34022if test "${PATH_SEPARATOR+set}" != set; then
34023  PATH_SEPARATOR=:
34024  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
34025    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
34026      PATH_SEPARATOR=';'
34027  }
34028fi
34029
34030
34031# IFS
34032# We need space, tab and new line, in precisely that order.  Quoting is
34033# there to prevent editors from complaining about space-tab.
34034# (If _AS_PATH_WALK were called with IFS unset, it would disable word
34035# splitting by setting IFS to empty value.)
34036IFS=" ""	$as_nl"
34037
34038# Find who we are.  Look in the path if we contain no directory separator.
34039as_myself=
34040case $0 in #((
34041  *[\\/]* ) as_myself=$0 ;;
34042  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34043for as_dir in $PATH
34044do
34045  IFS=$as_save_IFS
34046  test -z "$as_dir" && as_dir=.
34047    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
34048  done
34049IFS=$as_save_IFS
34050
34051     ;;
34052esac
34053# We did not find ourselves, most probably we were run as `sh COMMAND'
34054# in which case we are not to be found in the path.
34055if test "x$as_myself" = x; then
34056  as_myself=$0
34057fi
34058if test ! -f "$as_myself"; then
34059  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
34060  exit 1
34061fi
34062
34063# Unset variables that we do not need and which cause bugs (e.g. in
34064# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
34065# suppresses any "Segmentation fault" message there.  '((' could
34066# trigger a bug in pdksh 5.2.14.
34067for as_var in BASH_ENV ENV MAIL MAILPATH
34068do eval test x\${$as_var+set} = xset \
34069  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
34070done
34071PS1='$ '
34072PS2='> '
34073PS4='+ '
34074
34075# NLS nuisances.
34076LC_ALL=C
34077export LC_ALL
34078LANGUAGE=C
34079export LANGUAGE
34080
34081# CDPATH.
34082(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
34083
34084
34085# as_fn_error STATUS ERROR [LINENO LOG_FD]
34086# ----------------------------------------
34087# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
34088# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
34089# script with STATUS, using 1 if that was 0.
34090as_fn_error ()
34091{
34092  as_status=$1; test $as_status -eq 0 && as_status=1
34093  if test "$4"; then
34094    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
34095    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
34096  fi
34097  $as_echo "$as_me: error: $2" >&2
34098  as_fn_exit $as_status
34099} # as_fn_error
34100
34101
34102# as_fn_set_status STATUS
34103# -----------------------
34104# Set $? to STATUS, without forking.
34105as_fn_set_status ()
34106{
34107  return $1
34108} # as_fn_set_status
34109
34110# as_fn_exit STATUS
34111# -----------------
34112# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
34113as_fn_exit ()
34114{
34115  set +e
34116  as_fn_set_status $1
34117  exit $1
34118} # as_fn_exit
34119
34120# as_fn_unset VAR
34121# ---------------
34122# Portably unset VAR.
34123as_fn_unset ()
34124{
34125  { eval $1=; unset $1;}
34126}
34127as_unset=as_fn_unset
34128# as_fn_append VAR VALUE
34129# ----------------------
34130# Append the text in VALUE to the end of the definition contained in VAR. Take
34131# advantage of any shell optimizations that allow amortized linear growth over
34132# repeated appends, instead of the typical quadratic growth present in naive
34133# implementations.
34134if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
34135  eval 'as_fn_append ()
34136  {
34137    eval $1+=\$2
34138  }'
34139else
34140  as_fn_append ()
34141  {
34142    eval $1=\$$1\$2
34143  }
34144fi # as_fn_append
34145
34146# as_fn_arith ARG...
34147# ------------------
34148# Perform arithmetic evaluation on the ARGs, and store the result in the
34149# global $as_val. Take advantage of shells that can avoid forks. The arguments
34150# must be portable across $(()) and expr.
34151if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
34152  eval 'as_fn_arith ()
34153  {
34154    as_val=$(( $* ))
34155  }'
34156else
34157  as_fn_arith ()
34158  {
34159    as_val=`expr "$@" || test $? -eq 1`
34160  }
34161fi # as_fn_arith
34162
34163
34164if expr a : '\(a\)' >/dev/null 2>&1 &&
34165   test "X`expr 00001 : '.*\(...\)'`" = X001; then
34166  as_expr=expr
34167else
34168  as_expr=false
34169fi
34170
34171if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
34172  as_basename=basename
34173else
34174  as_basename=false
34175fi
34176
34177if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
34178  as_dirname=dirname
34179else
34180  as_dirname=false
34181fi
34182
34183as_me=`$as_basename -- "$0" ||
34184$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
34185	 X"$0" : 'X\(//\)$' \| \
34186	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
34187$as_echo X/"$0" |
34188    sed '/^.*\/\([^/][^/]*\)\/*$/{
34189	    s//\1/
34190	    q
34191	  }
34192	  /^X\/\(\/\/\)$/{
34193	    s//\1/
34194	    q
34195	  }
34196	  /^X\/\(\/\).*/{
34197	    s//\1/
34198	    q
34199	  }
34200	  s/.*/./; q'`
34201
34202# Avoid depending upon Character Ranges.
34203as_cr_letters='abcdefghijklmnopqrstuvwxyz'
34204as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
34205as_cr_Letters=$as_cr_letters$as_cr_LETTERS
34206as_cr_digits='0123456789'
34207as_cr_alnum=$as_cr_Letters$as_cr_digits
34208
34209ECHO_C= ECHO_N= ECHO_T=
34210case `echo -n x` in #(((((
34211-n*)
34212  case `echo 'xy\c'` in
34213  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
34214  xy)  ECHO_C='\c';;
34215  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
34216       ECHO_T='	';;
34217  esac;;
34218*)
34219  ECHO_N='-n';;
34220esac
34221
34222rm -f conf$$ conf$$.exe conf$$.file
34223if test -d conf$$.dir; then
34224  rm -f conf$$.dir/conf$$.file
34225else
34226  rm -f conf$$.dir
34227  mkdir conf$$.dir 2>/dev/null
34228fi
34229if (echo >conf$$.file) 2>/dev/null; then
34230  if ln -s conf$$.file conf$$ 2>/dev/null; then
34231    as_ln_s='ln -s'
34232    # ... but there are two gotchas:
34233    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
34234    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
34235    # In both cases, we have to default to `cp -pR'.
34236    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
34237      as_ln_s='cp -pR'
34238  elif ln conf$$.file conf$$ 2>/dev/null; then
34239    as_ln_s=ln
34240  else
34241    as_ln_s='cp -pR'
34242  fi
34243else
34244  as_ln_s='cp -pR'
34245fi
34246rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
34247rmdir conf$$.dir 2>/dev/null
34248
34249
34250# as_fn_mkdir_p
34251# -------------
34252# Create "$as_dir" as a directory, including parents if necessary.
34253as_fn_mkdir_p ()
34254{
34255
34256  case $as_dir in #(
34257  -*) as_dir=./$as_dir;;
34258  esac
34259  test -d "$as_dir" || eval $as_mkdir_p || {
34260    as_dirs=
34261    while :; do
34262      case $as_dir in #(
34263      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
34264      *) as_qdir=$as_dir;;
34265      esac
34266      as_dirs="'$as_qdir' $as_dirs"
34267      as_dir=`$as_dirname -- "$as_dir" ||
34268$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34269	 X"$as_dir" : 'X\(//\)[^/]' \| \
34270	 X"$as_dir" : 'X\(//\)$' \| \
34271	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
34272$as_echo X"$as_dir" |
34273    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34274	    s//\1/
34275	    q
34276	  }
34277	  /^X\(\/\/\)[^/].*/{
34278	    s//\1/
34279	    q
34280	  }
34281	  /^X\(\/\/\)$/{
34282	    s//\1/
34283	    q
34284	  }
34285	  /^X\(\/\).*/{
34286	    s//\1/
34287	    q
34288	  }
34289	  s/.*/./; q'`
34290      test -d "$as_dir" && break
34291    done
34292    test -z "$as_dirs" || eval "mkdir $as_dirs"
34293  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
34294
34295
34296} # as_fn_mkdir_p
34297if mkdir -p . 2>/dev/null; then
34298  as_mkdir_p='mkdir -p "$as_dir"'
34299else
34300  test -d ./-p && rmdir ./-p
34301  as_mkdir_p=false
34302fi
34303
34304
34305# as_fn_executable_p FILE
34306# -----------------------
34307# Test if FILE is an executable regular file.
34308as_fn_executable_p ()
34309{
34310  test -f "$1" && test -x "$1"
34311} # as_fn_executable_p
34312as_test_x='test -x'
34313as_executable_p=as_fn_executable_p
34314
34315# Sed expression to map a string onto a valid CPP name.
34316as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
34317
34318# Sed expression to map a string onto a valid variable name.
34319as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
34320
34321
34322exec 6>&1
34323## ----------------------------------- ##
34324## Main body of $CONFIG_STATUS script. ##
34325## ----------------------------------- ##
34326_ASEOF
34327test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
34328
34329cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34330# Save the log message, to keep $0 and so on meaningful, and to
34331# report actual input values of CONFIG_FILES etc. instead of their
34332# values after options handling.
34333ac_log="
34334This file was extended by OpenJDK $as_me jdk8, which was
34335generated by GNU Autoconf 2.69.  Invocation command line was
34336
34337  CONFIG_FILES    = $CONFIG_FILES
34338  CONFIG_HEADERS  = $CONFIG_HEADERS
34339  CONFIG_LINKS    = $CONFIG_LINKS
34340  CONFIG_COMMANDS = $CONFIG_COMMANDS
34341  $ $0 $@
34342
34343on `(hostname || uname -n) 2>/dev/null | sed 1q`
34344"
34345
34346_ACEOF
34347
34348case $ac_config_files in *"
34349"*) set x $ac_config_files; shift; ac_config_files=$*;;
34350esac
34351
34352case $ac_config_headers in *"
34353"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
34354esac
34355
34356
34357cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34358# Files that config.status was made for.
34359config_files="$ac_config_files"
34360config_headers="$ac_config_headers"
34361
34362_ACEOF
34363
34364cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34365ac_cs_usage="\
34366\`$as_me' instantiates files and other configuration actions
34367from templates according to the current configuration.  Unless the files
34368and actions are specified as TAGs, all are instantiated by default.
34369
34370Usage: $0 [OPTION]... [TAG]...
34371
34372  -h, --help       print this help, then exit
34373  -V, --version    print version number and configuration settings, then exit
34374      --config     print configuration, then exit
34375  -q, --quiet, --silent
34376                   do not print progress messages
34377  -d, --debug      don't remove temporary files
34378      --recheck    update $as_me by reconfiguring in the same conditions
34379      --file=FILE[:TEMPLATE]
34380                   instantiate the configuration file FILE
34381      --header=FILE[:TEMPLATE]
34382                   instantiate the configuration header FILE
34383
34384Configuration files:
34385$config_files
34386
34387Configuration headers:
34388$config_headers
34389
34390Report bugs to <build-dev@openjdk.java.net>.
34391OpenJDK home page: <http://openjdk.java.net>."
34392
34393_ACEOF
34394cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34395ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
34396ac_cs_version="\\
34397OpenJDK config.status jdk8
34398configured by $0, generated by GNU Autoconf 2.69,
34399  with options \\"\$ac_cs_config\\"
34400
34401Copyright (C) 2012 Free Software Foundation, Inc.
34402This config.status script is free software; the Free Software Foundation
34403gives unlimited permission to copy, distribute and modify it."
34404
34405ac_pwd='$ac_pwd'
34406srcdir='$srcdir'
34407AWK='$AWK'
34408test -n "\$AWK" || AWK=awk
34409_ACEOF
34410
34411cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34412# The default lists apply if the user does not specify any file.
34413ac_need_defaults=:
34414while test $# != 0
34415do
34416  case $1 in
34417  --*=?*)
34418    ac_option=`expr "X$1" : 'X\([^=]*\)='`
34419    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
34420    ac_shift=:
34421    ;;
34422  --*=)
34423    ac_option=`expr "X$1" : 'X\([^=]*\)='`
34424    ac_optarg=
34425    ac_shift=:
34426    ;;
34427  *)
34428    ac_option=$1
34429    ac_optarg=$2
34430    ac_shift=shift
34431    ;;
34432  esac
34433
34434  case $ac_option in
34435  # Handling of the options.
34436  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
34437    ac_cs_recheck=: ;;
34438  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
34439    $as_echo "$ac_cs_version"; exit ;;
34440  --config | --confi | --conf | --con | --co | --c )
34441    $as_echo "$ac_cs_config"; exit ;;
34442  --debug | --debu | --deb | --de | --d | -d )
34443    debug=: ;;
34444  --file | --fil | --fi | --f )
34445    $ac_shift
34446    case $ac_optarg in
34447    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
34448    '') as_fn_error $? "missing file argument" ;;
34449    esac
34450    as_fn_append CONFIG_FILES " '$ac_optarg'"
34451    ac_need_defaults=false;;
34452  --header | --heade | --head | --hea )
34453    $ac_shift
34454    case $ac_optarg in
34455    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
34456    esac
34457    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
34458    ac_need_defaults=false;;
34459  --he | --h)
34460    # Conflict between --help and --header
34461    as_fn_error $? "ambiguous option: \`$1'
34462Try \`$0 --help' for more information.";;
34463  --help | --hel | -h )
34464    $as_echo "$ac_cs_usage"; exit ;;
34465  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
34466  | -silent | --silent | --silen | --sile | --sil | --si | --s)
34467    ac_cs_silent=: ;;
34468
34469  # This is an error.
34470  -*) as_fn_error $? "unrecognized option: \`$1'
34471Try \`$0 --help' for more information." ;;
34472
34473  *) as_fn_append ac_config_targets " $1"
34474     ac_need_defaults=false ;;
34475
34476  esac
34477  shift
34478done
34479
34480ac_configure_extra_args=
34481
34482if $ac_cs_silent; then
34483  exec 6>/dev/null
34484  ac_configure_extra_args="$ac_configure_extra_args --silent"
34485fi
34486
34487_ACEOF
34488cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34489if \$ac_cs_recheck; then
34490  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
34491  shift
34492  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
34493  CONFIG_SHELL='$SHELL'
34494  export CONFIG_SHELL
34495  exec "\$@"
34496fi
34497
34498_ACEOF
34499cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34500exec 5>>config.log
34501{
34502  echo
34503  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
34504## Running $as_me. ##
34505_ASBOX
34506  $as_echo "$ac_log"
34507} >&5
34508
34509_ACEOF
34510cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34511_ACEOF
34512
34513cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34514
34515# Handling of arguments.
34516for ac_config_target in $ac_config_targets
34517do
34518  case $ac_config_target in
34519    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
34520    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
34521    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
34522    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
34523    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
34524    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
34525    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
34526
34527  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
34528  esac
34529done
34530
34531
34532# If the user did not use the arguments to specify the items to instantiate,
34533# then the envvar interface is used.  Set only those that are not.
34534# We use the long form for the default assignment because of an extremely
34535# bizarre bug on SunOS 4.1.3.
34536if $ac_need_defaults; then
34537  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
34538  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
34539fi
34540
34541# Have a temporary directory for convenience.  Make it in the build tree
34542# simply because there is no reason against having it here, and in addition,
34543# creating and moving files from /tmp can sometimes cause problems.
34544# Hook for its removal unless debugging.
34545# Note that there is a small window in which the directory will not be cleaned:
34546# after its creation but before its name has been assigned to `$tmp'.
34547$debug ||
34548{
34549  tmp= ac_tmp=
34550  trap 'exit_status=$?
34551  : "${ac_tmp:=$tmp}"
34552  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
34553' 0
34554  trap 'as_fn_exit 1' 1 2 13 15
34555}
34556# Create a (secure) tmp directory for tmp files.
34557
34558{
34559  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
34560  test -d "$tmp"
34561}  ||
34562{
34563  tmp=./conf$$-$RANDOM
34564  (umask 077 && mkdir "$tmp")
34565} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
34566ac_tmp=$tmp
34567
34568# Set up the scripts for CONFIG_FILES section.
34569# No need to generate them if there are no CONFIG_FILES.
34570# This happens for instance with `./config.status config.h'.
34571if test -n "$CONFIG_FILES"; then
34572
34573
34574ac_cr=`echo X | tr X '\015'`
34575# On cygwin, bash can eat \r inside `` if the user requested igncr.
34576# But we know of no other shell where ac_cr would be empty at this
34577# point, so we can use a bashism as a fallback.
34578if test "x$ac_cr" = x; then
34579  eval ac_cr=\$\'\\r\'
34580fi
34581ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
34582if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
34583  ac_cs_awk_cr='\\r'
34584else
34585  ac_cs_awk_cr=$ac_cr
34586fi
34587
34588echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
34589_ACEOF
34590
34591
34592{
34593  echo "cat >conf$$subs.awk <<_ACEOF" &&
34594  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
34595  echo "_ACEOF"
34596} >conf$$subs.sh ||
34597  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34598ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
34599ac_delim='%!_!# '
34600for ac_last_try in false false false false false :; do
34601  . ./conf$$subs.sh ||
34602    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34603
34604  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
34605  if test $ac_delim_n = $ac_delim_num; then
34606    break
34607  elif $ac_last_try; then
34608    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34609  else
34610    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34611  fi
34612done
34613rm -f conf$$subs.sh
34614
34615cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34616cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
34617_ACEOF
34618sed -n '
34619h
34620s/^/S["/; s/!.*/"]=/
34621p
34622g
34623s/^[^!]*!//
34624:repl
34625t repl
34626s/'"$ac_delim"'$//
34627t delim
34628:nl
34629h
34630s/\(.\{148\}\)..*/\1/
34631t more1
34632s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
34633p
34634n
34635b repl
34636:more1
34637s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34638p
34639g
34640s/.\{148\}//
34641t nl
34642:delim
34643h
34644s/\(.\{148\}\)..*/\1/
34645t more2
34646s/["\\]/\\&/g; s/^/"/; s/$/"/
34647p
34648b
34649:more2
34650s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34651p
34652g
34653s/.\{148\}//
34654t delim
34655' <conf$$subs.awk | sed '
34656/^[^""]/{
34657  N
34658  s/\n//
34659}
34660' >>$CONFIG_STATUS || ac_write_fail=1
34661rm -f conf$$subs.awk
34662cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34663_ACAWK
34664cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
34665  for (key in S) S_is_set[key] = 1
34666  FS = ""
34667
34668}
34669{
34670  line = $ 0
34671  nfields = split(line, field, "@")
34672  substed = 0
34673  len = length(field[1])
34674  for (i = 2; i < nfields; i++) {
34675    key = field[i]
34676    keylen = length(key)
34677    if (S_is_set[key]) {
34678      value = S[key]
34679      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
34680      len += length(value) + length(field[++i])
34681      substed = 1
34682    } else
34683      len += 1 + keylen
34684  }
34685
34686  print line
34687}
34688
34689_ACAWK
34690_ACEOF
34691cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34692if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
34693  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
34694else
34695  cat
34696fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
34697  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
34698_ACEOF
34699
34700# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
34701# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
34702# trailing colons and then remove the whole line if VPATH becomes empty
34703# (actually we leave an empty line to preserve line numbers).
34704if test "x$srcdir" = x.; then
34705  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
34706h
34707s///
34708s/^/:/
34709s/[	 ]*$/:/
34710s/:\$(srcdir):/:/g
34711s/:\${srcdir}:/:/g
34712s/:@srcdir@:/:/g
34713s/^:*//
34714s/:*$//
34715x
34716s/\(=[	 ]*\).*/\1/
34717G
34718s/\n//
34719s/^[^=]*=[	 ]*$//
34720}'
34721fi
34722
34723cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34724fi # test -n "$CONFIG_FILES"
34725
34726# Set up the scripts for CONFIG_HEADERS section.
34727# No need to generate them if there are no CONFIG_HEADERS.
34728# This happens for instance with `./config.status Makefile'.
34729if test -n "$CONFIG_HEADERS"; then
34730cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
34731BEGIN {
34732_ACEOF
34733
34734# Transform confdefs.h into an awk script `defines.awk', embedded as
34735# here-document in config.status, that substitutes the proper values into
34736# config.h.in to produce config.h.
34737
34738# Create a delimiter string that does not exist in confdefs.h, to ease
34739# handling of long lines.
34740ac_delim='%!_!# '
34741for ac_last_try in false false :; do
34742  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
34743  if test -z "$ac_tt"; then
34744    break
34745  elif $ac_last_try; then
34746    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
34747  else
34748    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34749  fi
34750done
34751
34752# For the awk script, D is an array of macro values keyed by name,
34753# likewise P contains macro parameters if any.  Preserve backslash
34754# newline sequences.
34755
34756ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
34757sed -n '
34758s/.\{148\}/&'"$ac_delim"'/g
34759t rset
34760:rset
34761s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
34762t def
34763d
34764:def
34765s/\\$//
34766t bsnl
34767s/["\\]/\\&/g
34768s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34769D["\1"]=" \3"/p
34770s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
34771d
34772:bsnl
34773s/["\\]/\\&/g
34774s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34775D["\1"]=" \3\\\\\\n"\\/p
34776t cont
34777s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
34778t cont
34779d
34780:cont
34781n
34782s/.\{148\}/&'"$ac_delim"'/g
34783t clear
34784:clear
34785s/\\$//
34786t bsnlc
34787s/["\\]/\\&/g; s/^/"/; s/$/"/p
34788d
34789:bsnlc
34790s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
34791b cont
34792' <confdefs.h | sed '
34793s/'"$ac_delim"'/"\\\
34794"/g' >>$CONFIG_STATUS || ac_write_fail=1
34795
34796cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34797  for (key in D) D_is_set[key] = 1
34798  FS = ""
34799}
34800/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
34801  line = \$ 0
34802  split(line, arg, " ")
34803  if (arg[1] == "#") {
34804    defundef = arg[2]
34805    mac1 = arg[3]
34806  } else {
34807    defundef = substr(arg[1], 2)
34808    mac1 = arg[2]
34809  }
34810  split(mac1, mac2, "(") #)
34811  macro = mac2[1]
34812  prefix = substr(line, 1, index(line, defundef) - 1)
34813  if (D_is_set[macro]) {
34814    # Preserve the white space surrounding the "#".
34815    print prefix "define", macro P[macro] D[macro]
34816    next
34817  } else {
34818    # Replace #undef with comments.  This is necessary, for example,
34819    # in the case of _POSIX_SOURCE, which is predefined and required
34820    # on some systems where configure will not decide to define it.
34821    if (defundef == "undef") {
34822      print "/*", prefix defundef, macro, "*/"
34823      next
34824    }
34825  }
34826}
34827{ print }
34828_ACAWK
34829_ACEOF
34830cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34831  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
34832fi # test -n "$CONFIG_HEADERS"
34833
34834
34835eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
34836shift
34837for ac_tag
34838do
34839  case $ac_tag in
34840  :[FHLC]) ac_mode=$ac_tag; continue;;
34841  esac
34842  case $ac_mode$ac_tag in
34843  :[FHL]*:*);;
34844  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
34845  :[FH]-) ac_tag=-:-;;
34846  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
34847  esac
34848  ac_save_IFS=$IFS
34849  IFS=:
34850  set x $ac_tag
34851  IFS=$ac_save_IFS
34852  shift
34853  ac_file=$1
34854  shift
34855
34856  case $ac_mode in
34857  :L) ac_source=$1;;
34858  :[FH])
34859    ac_file_inputs=
34860    for ac_f
34861    do
34862      case $ac_f in
34863      -) ac_f="$ac_tmp/stdin";;
34864      *) # Look for the file first in the build tree, then in the source tree
34865	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
34866	 # because $ac_f cannot contain `:'.
34867	 test -f "$ac_f" ||
34868	   case $ac_f in
34869	   [\\/$]*) false;;
34870	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
34871	   esac ||
34872	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
34873      esac
34874      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
34875      as_fn_append ac_file_inputs " '$ac_f'"
34876    done
34877
34878    # Let's still pretend it is `configure' which instantiates (i.e., don't
34879    # use $as_me), people would be surprised to read:
34880    #    /* config.h.  Generated by config.status.  */
34881    configure_input='Generated from '`
34882	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
34883	`' by configure.'
34884    if test x"$ac_file" != x-; then
34885      configure_input="$ac_file.  $configure_input"
34886      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
34887$as_echo "$as_me: creating $ac_file" >&6;}
34888    fi
34889    # Neutralize special characters interpreted by sed in replacement strings.
34890    case $configure_input in #(
34891    *\&* | *\|* | *\\* )
34892       ac_sed_conf_input=`$as_echo "$configure_input" |
34893       sed 's/[\\\\&|]/\\\\&/g'`;; #(
34894    *) ac_sed_conf_input=$configure_input;;
34895    esac
34896
34897    case $ac_tag in
34898    *:-:* | *:-) cat >"$ac_tmp/stdin" \
34899      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
34900    esac
34901    ;;
34902  esac
34903
34904  ac_dir=`$as_dirname -- "$ac_file" ||
34905$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34906	 X"$ac_file" : 'X\(//\)[^/]' \| \
34907	 X"$ac_file" : 'X\(//\)$' \| \
34908	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
34909$as_echo X"$ac_file" |
34910    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34911	    s//\1/
34912	    q
34913	  }
34914	  /^X\(\/\/\)[^/].*/{
34915	    s//\1/
34916	    q
34917	  }
34918	  /^X\(\/\/\)$/{
34919	    s//\1/
34920	    q
34921	  }
34922	  /^X\(\/\).*/{
34923	    s//\1/
34924	    q
34925	  }
34926	  s/.*/./; q'`
34927  as_dir="$ac_dir"; as_fn_mkdir_p
34928  ac_builddir=.
34929
34930case "$ac_dir" in
34931.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
34932*)
34933  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
34934  # A ".." for each directory in $ac_dir_suffix.
34935  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
34936  case $ac_top_builddir_sub in
34937  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
34938  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
34939  esac ;;
34940esac
34941ac_abs_top_builddir=$ac_pwd
34942ac_abs_builddir=$ac_pwd$ac_dir_suffix
34943# for backward compatibility:
34944ac_top_builddir=$ac_top_build_prefix
34945
34946case $srcdir in
34947  .)  # We are building in place.
34948    ac_srcdir=.
34949    ac_top_srcdir=$ac_top_builddir_sub
34950    ac_abs_top_srcdir=$ac_pwd ;;
34951  [\\/]* | ?:[\\/]* )  # Absolute name.
34952    ac_srcdir=$srcdir$ac_dir_suffix;
34953    ac_top_srcdir=$srcdir
34954    ac_abs_top_srcdir=$srcdir ;;
34955  *) # Relative name.
34956    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
34957    ac_top_srcdir=$ac_top_build_prefix$srcdir
34958    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
34959esac
34960ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
34961
34962
34963  case $ac_mode in
34964  :F)
34965  #
34966  # CONFIG_FILE
34967  #
34968
34969_ACEOF
34970
34971cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34972# If the template does not know about datarootdir, expand it.
34973# FIXME: This hack should be removed a few years after 2.60.
34974ac_datarootdir_hack=; ac_datarootdir_seen=
34975ac_sed_dataroot='
34976/datarootdir/ {
34977  p
34978  q
34979}
34980/@datadir@/p
34981/@docdir@/p
34982/@infodir@/p
34983/@localedir@/p
34984/@mandir@/p'
34985case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
34986*datarootdir*) ac_datarootdir_seen=yes;;
34987*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
34988  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
34989$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
34990_ACEOF
34991cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34992  ac_datarootdir_hack='
34993  s&@datadir@&$datadir&g
34994  s&@docdir@&$docdir&g
34995  s&@infodir@&$infodir&g
34996  s&@localedir@&$localedir&g
34997  s&@mandir@&$mandir&g
34998  s&\\\${datarootdir}&$datarootdir&g' ;;
34999esac
35000_ACEOF
35001
35002# Neutralize VPATH when `$srcdir' = `.'.
35003# Shell code in configure.ac might set extrasub.
35004# FIXME: do we really want to maintain this feature?
35005cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
35006ac_sed_extra="$ac_vpsub
35007$extrasub
35008_ACEOF
35009cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
35010:t
35011/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
35012s|@configure_input@|$ac_sed_conf_input|;t t
35013s&@top_builddir@&$ac_top_builddir_sub&;t t
35014s&@top_build_prefix@&$ac_top_build_prefix&;t t
35015s&@srcdir@&$ac_srcdir&;t t
35016s&@abs_srcdir@&$ac_abs_srcdir&;t t
35017s&@top_srcdir@&$ac_top_srcdir&;t t
35018s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
35019s&@builddir@&$ac_builddir&;t t
35020s&@abs_builddir@&$ac_abs_builddir&;t t
35021s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
35022$ac_datarootdir_hack
35023"
35024eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
35025  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
35026
35027test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
35028  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
35029  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
35030      "$ac_tmp/out"`; test -z "$ac_out"; } &&
35031  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
35032which seems to be undefined.  Please make sure it is defined" >&5
35033$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
35034which seems to be undefined.  Please make sure it is defined" >&2;}
35035
35036  rm -f "$ac_tmp/stdin"
35037  case $ac_file in
35038  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
35039  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
35040  esac \
35041  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
35042 ;;
35043  :H)
35044  #
35045  # CONFIG_HEADER
35046  #
35047  if test x"$ac_file" != x-; then
35048    {
35049      $as_echo "/* $configure_input  */" \
35050      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
35051    } >"$ac_tmp/config.h" \
35052      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
35053    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
35054      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
35055$as_echo "$as_me: $ac_file is unchanged" >&6;}
35056    else
35057      rm -f "$ac_file"
35058      mv "$ac_tmp/config.h" "$ac_file" \
35059	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
35060    fi
35061  else
35062    $as_echo "/* $configure_input  */" \
35063      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
35064      || as_fn_error $? "could not create -" "$LINENO" 5
35065  fi
35066 ;;
35067
35068
35069  esac
35070
35071done # for ac_tag
35072
35073
35074as_fn_exit 0
35075_ACEOF
35076ac_clean_files=$ac_clean_files_save
35077
35078test $ac_write_fail = 0 ||
35079  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
35080
35081
35082# configure is writing to config.log, and then calls config.status.
35083# config.status does its own redirection, appending to config.log.
35084# Unfortunately, on DOS this fails, as config.log is still kept open
35085# by configure, so config.status won't be able to write to it; its
35086# output is simply discarded.  So we exec the FD to /dev/null,
35087# effectively closing config.log, so it can be properly (re)opened and
35088# appended to by config.status.  When coming back to configure, we
35089# need to make the FD available again.
35090if test "$no_create" != yes; then
35091  ac_cs_success=:
35092  ac_config_status_args=
35093  test "$silent" = yes &&
35094    ac_config_status_args="$ac_config_status_args --quiet"
35095  exec 5>/dev/null
35096  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
35097  exec 5>>config.log
35098  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
35099  # would make configure fail if this is the last instruction.
35100  $ac_cs_success || as_fn_exit 1
35101fi
35102if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
35103  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
35104$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
35105fi
35106
35107
35108# Make the compare script executable
35109$CHMOD +x $OUTPUT_ROOT/compare.sh
35110
35111# Finally output some useful information to the user
35112
35113# Finally output some useful information to the user
35114
35115if test "x$CCACHE_FOUND" != x; then
35116	if  test "x$HAS_GOOD_CCACHE" = x; then
35117		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
35118		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
35119	else
35120		CCACHE_STATUS="installed and in use"
35121	fi
35122else
35123	if test "x$GCC" = xyes; then
35124		CCACHE_STATUS="not installed (consider installing)"
35125		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
35126	else
35127		CCACHE_STATUS="not available for your system"
35128	fi
35129fi
35130
35131printf "\n"
35132printf "====================================================\n"
35133printf "A new configuration has been successfully created in\n"
35134printf "$OUTPUT_ROOT\n"
35135if test "x$CONFIGURE_COMMAND_LINE" != x; then
35136	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
35137else
35138	printf "using default settings.\n"
35139fi
35140
35141printf "\n"
35142printf "Configuration summary:\n"
35143printf "* Debug level:    $DEBUG_LEVEL\n"
35144printf "* JDK variant:    $JDK_VARIANT\n"
35145printf "* JVM variants:   $with_jvm_variants\n"
35146printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
35147
35148printf "\n"
35149printf "Tools summary:\n"
35150if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
35151  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
35152fi
35153printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
35154printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
35155printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
35156
35157printf "\n"
35158printf "Build performance summary:\n"
35159printf "* Cores to use:   $JOBS\n"
35160printf "* Memory limit:   $MEMORY_SIZE MB\n"
35161printf "* ccache status:  $CCACHE_STATUS\n"
35162printf "\n"
35163
35164if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
35165	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
35166	printf "$CCACHE_HELP_MSG\n"
35167
35168    # Print a helpful message on how to acquire the necessary build dependency.
35169    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
35170    MISSING_DEPENDENCY=ccache
35171    PKGHANDLER_COMMAND=
35172
35173    case $PKGHANDLER in
35174	apt-get)
35175                apt_help     $MISSING_DEPENDENCY ;;
35176	yum)
35177                yum_help     $MISSING_DEPENDENCY ;;
35178	port)
35179                port_help    $MISSING_DEPENDENCY ;;
35180	pkgutil)
35181                pkgutil_help $MISSING_DEPENDENCY ;;
35182	pkgadd)
35183                pkgadd_help  $MISSING_DEPENDENCY ;;
35184    esac
35185
35186    if test "x$PKGHANDLER_COMMAND" != x; then
35187        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
35188    fi
35189
35190	printf "$HELP_MSG\n"
35191	printf "\n"
35192fi
35193
35194if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
35195	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
35196	printf "will result in longer build times.\n"
35197	printf "\n"
35198fi
35199
35200if test "x$FOUND_ALT_VARIABLES" != "x"; then
35201	printf "WARNING: You have old-style ALT_ environment variables set.\n"
35202	printf "These are not respected, and will be ignored. It is recommended\n"
35203	printf "that you clean your environment. The following variables are set:\n"
35204	printf "$FOUND_ALT_VARIABLES\n"
35205	printf "\n"
35206fi
35207
35208if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
35209	printf "WARNING: Your build output directory is not on a local disk.\n"
35210	printf "This will severely degrade build performance!\n"
35211	printf "It is recommended that you create an output directory on a local disk,\n"
35212	printf "and run the configure script again from that directory.\n"
35213	printf "\n"
35214fi
35215
35216if test "x$IS_RECONFIGURE" = "xyes"; then
35217	printf "WARNING: The result of this configuration has overridden an older\n"
35218	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
35219	printf "proper build. Failure to do so might result in strange build problems.\n"
35220	printf "\n"
35221fi
35222
35223